Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: how to display a trigger programatically

Re: how to display a trigger programatically

From: DA Morgan <damorgan_at_psoug.org>
Date: Fri, 14 Dec 2007 21:53:42 -0800
Message-ID: <1197698007.217634@bubbleator.drizzle.com>


Sean Nakasone wrote:
> 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_at_x.washington.edu (replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Received on Fri Dec 14 2007 - 23:53:42 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US