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: Update invalid trigger_text in DBA_TRIGGERS?

RE: Update invalid trigger_text in DBA_TRIGGERS?

From: Khedr, Waleed <Waleed.Khedr_at_FMR.COM>
Date: Thu, 25 Oct 2001 11:35:19 -0700
Message-ID: <F001.003B4D0C.20011025114027@fatcity.com>

Or use
dynamic SQL like execute immedite 'create or replace trigger.....'

  <FONT face=Tahoma
  size=2>-----Original Message-----From: Koivu, Lisa   [mailto:lisa.koivu_at_efairfield.com]Sent: Thursday, October 25, 2001   3:28 PMTo: Multiple recipients of list ORACLE-LSubject:   RE: Update invalid trigger_text in DBA_TRIGGERS?   David I may be the only one to say this   but updating the code directly in the database like that gives me the   willies.  Again you may be a database god....  and me, the pawn   afraid of God Oracle.
  Guess I'd take the strategy of yanking the   code out, doing the replace on the code, storing the code in a file somewhere   and then running the code with the create or replace trigger   statements...
  Heck try it and share your results with   us. 
  Lisa Koivu Oracle Database
  Monkey and Major Couch Potato. Fairfield   Resorts, Inc. 954-935-4117   

    -----Original Message----- <FONT
    face=Arial size=1>From:   <FONT face=Arial     size=1>DBarbour_at_austin.isd.tenet.edu     [SMTP:DBarbour_at_austin.isd.tenet.edu] <FONT face=Arial     size=1>Sent:   Thursday,
    October 25, 2001 3:12 PM <FONT face=Arial

    size=1>To:     <FONT face=Arial 
    size=1>Multiple recipients of list ORACLE-L <FONT face=Arial 
    size=1>Subject:        <FONT 
    face=Arial size=1>Update invalid trigger_text in DBA_TRIGGERS? 
    

    I've got 885 triggers with hard-coded fully     qualified table names in <FONT face=Arial     size=2>DBA_TRIGGERS.  Problem is, the vendor changed the ownership on     these tables, and now I've got 885
    invalid triggers.  I'd just like to run my <FONT face=Arial     size=2>grand scheme (not to be confused with schema) past you folks,      give you the chance to realize just what     an idiot I am, and offer brilliant alternatives <FONT face=Arial     size=2>that'll cause lasting envy, jealousy, and self-pity - mostly because     the suggestions will be simpler, and     might actually work.
    So much for the introduction.  I thought I'd     just go into DBA_TRIGGERS and run a     replace against the trigger_text.  Since trigger_text is a long     data type, I don't believe I can use a     straight update ..  set ... replace() in <FONT face=Arial     size=2>SQL PLUS.  My plan therefore is to write a quick PL/SQL piece     that will select the long column into a     varchar2, do the replace, then update the <FONT face=Arial     size=2>long column with the edited varchar2 variable.     Is this a realistic strategy?
    David A. Barbour <FONT face=Arial
    size=2>Oracle DBA, OCP AISD
    512-414-1002

Received on Thu Oct 25 2001 - 13:35:19 CDT

Original text of this message

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