Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Sequence Resetting Oracle
  • Oracle 11g RAC on OEL 5 and Vmware 2 Oracle
  • ORA-8031 issue and solution if it is occuring due to truncate. Oracle
  • Find Stale DR Physical Standby Oracle
  • scp with ssh2 Linux/Unix
  • Generating XML from SQLPLUS Oracle
  • kill all processes from specific user in solaris. Linux/Unix
  • on IBM-AIX for display Linux/Unix
  • How to specify 2 arch location to avoid any kind of DB hanging. Oracle
  • V$transaction notes for finding XID composition. Oracle
  • find the files that are 1 day old. Linux/Unix
  • Zip and unzip with tar Linux/Unix
  • DBMS_JOB all example Oracle
  • changing kernel parameter in Oracle Enterpise Linux Linux/Unix
  • Oracle Identifiers Oracle

crtgr.sql /* For creating trigger from data dictionary */

Posted on 02-Aug-2005 By Admin No Comments on crtgr.sql /* For creating trigger from data dictionary */

SET LONG 1000000

UNDEFINE trigger_name

SET PAGES 0

SET FEEDBACK OFF

SET LINES 132

set echo off

set numwidth 9

Set head off

set verify off

set time off

set timing off

COLUMN text FORMAT A302 word_wrapped

COLUMN spool_name NEW_VALUE spool_name NOPRINT

SELECT lower(trigger_name||’.ctr’) spool_name

FROM dba_triggers

WHERE trigger_NAME = UPPER(‘&&trigger_name’);

SPOOL &spool_name

select ‘CREATE OR REPLACE TRIGGER ‘

||DESCRIPTION

from dba_triggers

where trigger_NAME = UPPER(‘&&trigger_name’);

set lines 95

SELECT trigger_body text

FROM DBA_TRIGGERS

WHERE TRIGGER_NAME = UPPER(‘&&trigger_name’);

PROMPT /

SPOOL OFF

SET PAGES 80

SET FEEDBACK 1

set LINES 132

set echo on

Set head on

set feedback 1

set verify on

set time on

set timing on

Oracle, SQL scripts

Post navigation

Previous Post: eplan9i.sql
Next Post: Wait time tuning research

Related Posts

  • sid_wise_cursor.sql find open cursor basis on username or SID Oracle
  • Check Oracle installed products using one command Oracle
  • Remove duplicate rows from table Oracle
  • online_bkup.sql Oracle
  • find_log_switch.sql Find log switches in graphical manner Oracle
  • Distributed Transaction Troubleshooting. Oracle

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Categories

  • Ansible (0)
  • AWS (2)
  • Azure (1)
  • Linux/Unix (149)
  • MYSQL (5)
  • Oracle (392)
  • PHP/MYSQL/Wordpress (10)
  • POSTGRESQL (0)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (17)
  • rman-dataguard (26)
  • shell (149)
  • SQL scripts (341)
  • SQL Server (6)
  • Uncategorized (0)
  • Videos (0)

Recent Posts

  • SQL Server Vs Oracle Architecture difference25-Jul-2025
  • SQL Server: How to see historical transactions25-Jul-2025
  • SQL Server: How to see current transactions or requests25-Jul-2025
  • T-SQL Vs PL/SQL Syntax25-Jul-2025
  • Check SQL Server edition25-Jul-2025
  • Checking SQL Server Version25-Jul-2025
  • Oracle vs MYSQL Architecture differences (For DBAs)24-Jul-2025
  • V$INSTANCE of Oracle in MYSQL24-Jul-2025
  • Day to day MYSQL DBA operations (Compared with Oracle DBA)24-Jul-2025
  • MYSQL and Oracle Comparison for Oracle DBA24-Jul-2025

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • S3 Basic info AWS
  • All About oracle password and security from metalink Oracle
  • How can I tell if ASO is installed ? Oracle
  • Small sample shell program Linux/Unix
  • send attachment from unix-shell script Linux/Unix
  • Good RAC & Standby Notes Oracle
  • Adding Datafile on Primary Server and Impact on Standby Server Oracle
  • checking connectivity between two servers Linux/Unix

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme