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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Script to grab trigger source with conditions?

Re: Script to grab trigger source with conditions?

From: Igor Neyman <ineyman_at_perceptron.com>
Date: Mon, 05 May 2003 10:16:43 -0800
Message-ID: <F001.0058FD95.20030505101643@fatcity.com>


Barbara,

Did you mean "when" clause (not "where" clause)? There is "when_clause" column in all/dba/user_triggers. So, you could just add it to the script, you have.

Igor Neyman, OCP DBA
ineyman_at_perceptron.com   

> Hi, all.
> Does anyone have a script they're willing to share
> that will capture the trigger source including a
> "where" clause?
>
> I got the text below from asktom. It grabs everything
> except the where. Didn't find anything in our
> archives or google.
>
> TIA for any help!
> Barb
> Oracle 8.1.7.4
> Solaris 2.6
>
> select
> 'create or replace trigger "' ||
> trigger_name || '"' || chr(10)||
> decode( substr( trigger_type, 1, 1 ),
> 'A', 'AFTER', 'B', 'BEFORE', 'I', 'INSTEAD
> OF' ) ||
> chr(10) ||
> triggering_event || chr(10) ||
> 'ON "' || table_owner || '"."' ||
> table_name || '"' || chr(10) ||
> decode( instr( trigger_type, 'EACH ROW' ), 0, null,
> 'FOR EACH ROW' ) || chr(10) ,
> trigger_body
> from user_triggers
> where trigger_name = upper('&1')
>
>
> __________________________________
> Do you Yahoo!?
> The New Yahoo! Search - Faster. Easier. Bingo.
> http://search.yahoo.com
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.net
> --
> Author: Barbara Baker
> INET: barbarabbaker_at_yahoo.com
>
> Fat City Network Services -- 858-538-5051 http://www.fatcity.com
> San Diego, California -- Mailing list and web hosting services
> ---------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).
>
>

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Igor Neyman
  INET: ineyman_at_perceptron.com

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Mon May 05 2003 - 13:16:43 CDT

Original text of this message

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