Re: Recompile triggers
Date: 2 Oct 2002 14:43:52 -0700
Message-ID: <4306a83.0210021343.1c6256f9_at_posting.google.com>
"Gawie Malherbe" <gawiemalherbe_at_removethisandchangenot.notmail.com> wrote in message news:<3d9ae4c0$0$18847_at_hades.is.co.za>...
> Hi All,
>
> I need an effective way to recompile ALL my triggers in a Oracle 8 DB. Can
> one use a script (without knowing the names of all the triggers)?
>
> G
Yes, you can make an sql that creates a script, or you can use a cursor in a PL/SQL procedure.
Without going into details you should use the view dba_objects or all_objects or maybe a v_$objects.
This views have a object_type field and a status field. So if you
issue an sql like
select 'alter trigger ' || object_name || ' compile ;' form
dba_objects where ....
you wil get an output of executable sql's. If you spool this to an file or have a tool like TOAD, in some way you can run the output.
In PL/SQL I think you must use the execute imediate statement.
Hope this migth be in a help.
Odd M
Received on Wed Oct 02 2002 - 23:43:52 CEST