dbTalk Databases Forums  

how to display a trigger programatically

comp.databases.oracle.misc comp.databases.oracle.misc


Discuss how to display a trigger programatically in the comp.databases.oracle.misc forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Sean Nakasone
 
Posts: n/a

Default how to display a trigger programatically - 12-14-2007 , 07:31 PM






Is there a way to display a trigger programatically, or via commandline,
or via sql code? The only way I know how to display a trigger is to use
toad's gui, but i want to loop through all triggers and dump trigger
contents to a file using a batch procedure.

Reply With Quote
  #2  
Old   
DA Morgan
 
Posts: n/a

Default Re: how to display a trigger programatically - 12-14-2007 , 11:53 PM






Sean Nakasone wrote:
Quote:
Is there a way to display a trigger programatically, or via commandline,
or via sql code? The only way I know how to display a trigger is to use
toad's gui, but i want to loop through all triggers and dump trigger
contents to a file using a batch procedure.
SELECT dbms_metadata.get_ddl('TRIGGER', <trigger_name>) FROM dual;

Demos here:
http://www.psoug.org/reference/dbms_metadata.html
--
Daniel A. Morgan
Oracle Ace Director & Instructor
University of Washington
damorgan@x.washington.edu (replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org


Reply With Quote
  #3  
Old   
Thomas Kellerer
 
Posts: n/a

Default Re: how to display a trigger programatically - 12-15-2007 , 02:20 AM



Sean Nakasone wrote on 15.12.2007 02:31:
Quote:
Is there a way to display a trigger programatically, or via commandline,
or via sql code? The only way I know how to display a trigger is to use
toad's gui, but i want to loop through all triggers and dump trigger
contents to a file using a batch procedure.
It's all stored in the dictionary views:

http://download.oracle.com/docs/cd/B...htm#sthref1739


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.