Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Btee and Bitmap Plans in Oracle 9i and higher Oracle
  • Distributed Transaction Troubleshooting. Oracle
  • RAC 11g with vmware Oracle
  • checking redhat linux version Linux/Unix
  • Global Unique Identifier Generation in Oracle 9.2 SYS_GUID() Oracle
  • USER_TABLES.Freelists Oracle
  • How to know Number of CPUs on Sun Box Linux/Unix
  • Oracle 10g Wait Model Oracle
  • check_copy_progress.sh Linux/Unix
  • Process Map for CPU and Memory for OS processes Linux/Unix
  • moving lob object to other tablespace lob_mvmt.sql Oracle
  • How to find the real execution plan and binds used in that explain plan in Oracle 10g?? Oracle
  • restarting network in linux Linux/Unix
  • V$CONTROLFILE_RECORD_SECTION reference notes. Oracle
  • Load SPM baseline from AWR 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

  • Ports used by Oracle Software Oracle
  • SQL_PROFILE – I explaination Oracle
  • Export Oracle data and Compress at same time Oracle
  • oracle tips… from http://www.bijoos.com/oracle/douknow.htm Oracle
  • segment_wise_space.sql segspace.sql Segment wise space usage (allocated and used) Oracle
  • True Session Wait Activity in Oracle 10g Verygood 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 (393)
  • PHP/MYSQL/Wordpress (10)
  • POSTGRESQL (0)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (17)
  • rman-dataguard (26)
  • shell (149)
  • SQL scripts (342)
  • SQL Server (6)
  • Uncategorized (0)
  • Videos (0)

Recent Posts

  • Trace a SQL session from another session using ORADEBUG30-Sep-2025
  • 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

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • Removing first line Linux/Unix
  • Rename Oracle Instance Name Oracle
  • Reading config file from other folder inside class Python/PySpark
  • Sequence Resetting Oracle
  • How to know current SID Oracle
  • Transfer SQL Profiles from One database to other database. Oracle
  • Day to day MYSQL DBA operations (Compared with Oracle DBA) MYSQL
  • pvmehta.com SQL scripts
    Find which sessions is accessing object that prevent your session to have exclusive locks in Oracle Oracle

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme