Generate trigger ddl statements
                                                 Last update (2008-04-01 11:27:45)
                                                                                                                   Date added (2008-02-25 11:04:37)

Summary
To generate the creation statements for one table's triggers use the following query. For example to create all trigger ddl statements for table AP.AP_INVOICES_ALL login as system to sqlplus.

SQL> set heading off;
SQL> spool /oracle/app/oracle/product/9.2/ddl.sql

Execute the script
SELECT 'create or replace trigger ' || owner || '.' || description, trigger_body,'/' SQL
FROM   dba_triggers 
WHERE table_name = 'AP_INVOICES_ALL' 
AND table_owner = 'AP';

spool off;


Tip:Another way to get ddl for any type of object is dbms_metadata.get_ddl function.

Other links
Generate index ddl statements
Reviews
Categories
Oracle DBA-> (147)
  Alertlog (3)
  Archivelog (5)
  Auditing (1)
  Backup - Recovery (19)
  Database files (6)
  Database options (2)
  DB links (2)
  Dependencies (1)
  Dictionary (2)
  Exp-Imp Datapump (6)
  Jobs (2)
  Mview (2)
  Networking (3)
  Objects (7)
  Parameters (2)
  Redologs (6)
  Roles - Grants (2)
  Rollback - Undo (8)
  Segments (3)
  Sequences (2)
  Sessions (14)
  SGA (14)
  Tables (10)
  Tablespaces (10)
  Temp (4)
  Toad (5)
  Transactions (1)
  Upgrade (2)
  Users (3)
Oracle APPS DBA-> (66)
Exadata (1)
Performance Tuning-> (59)
Oracle Real Cases (24)
Oracle Errors (23)
Oracle SQL tricks (32)
Oracle RAC (3)
Oracle Security (8)
Filters
Search