Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> AW: How to find PL/SQL code
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_=_NextPart_001_01C00375.7EE85670
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
try this script, it will generate two sppol-files with ddl for your
triggers:
=20
spool c:\temp\Trigger1.sql
col c1 format a79 word_wrap set long 32000 set arraysize 1 verify off feedback off echo off heading off = timing off prompt REM Generating Triggers =20 select 'create or replace trigger ' c1, description c1, 'WHEN ('||when_clause||')' c1, trigger_body , '/' c1, 'show errors;' c1, 'commit;' c1 from user_triggers where when_clause is not null
col c1 format a79 word_wrap set long 32000 set arraysize 1 verify off feedback off echo off heading off = timing off prompt REM Generating Triggers select 'create or replace trigger ' c1, description c1, trigger_body , '/' c1, 'show errors;' c1, 'commit;' c1 from user_triggers where when_clause is null
Mit freundlichen Gr=FC=DFen=20
i. V. Volker Sch=F6n=20
E-Mail: mailto:v.schoen_at_inplan.de <mailto:v.schoen_at_inplan.de> =20
http://www.inplan.de <http://www.inplan.de/> =20
-----Urspr=FCngliche Nachricht-----
Von: Jeff Wiegand [mailto:jwiegand_at_ancept.com]
Gesendet: Donnerstag, 10. August 2000 17:45
An: Multiple recipients of list ORACLE-L
Betreff: How to find PL/SQL code
Hello=20
We have several triggers that have been modified. Unfortunately, the
modifications weren't saved, but they are reflected in the database. =
How can
I get Oracle to output the code of the triggers. I select on =
user_triggers,
or all_triggers, using trigger_name and trigger_body columns, but only =
part
of the code is outputted to the screen. How can I get all of it?
Thanks for your help.=20
Jeff=20
------_=_NextPart_001_01C00375.7EE85670
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<TITLE>How to find PL/SQL code</TITLE>
<META content=3D"MSHTML 5.00.2314.1000" name=3DGENERATOR></HEAD>
<BODY>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN =
class=3D251581909-11082000>try=20
this script, it will generate two sppol-files with ddl for your=20
triggers:</SPAN></FONT></DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN=20
class=3D251581909-11082000></SPAN></FONT> </DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN =
class=3D251581909-11082000>spool=20
c:\temp\Trigger1.sql<BR> col c1 format a79=20
word_wrap<BR> set long =
32000<BR> =20
set arraysize 1 verify off feedback off echo off heading off timing=20
off<BR> prompt REM Generating=20
Triggers</SPAN></FONT></DIV>
<DIV> </DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN=20
class=3D251581909-11082000> select 'create or =
replace=20
trigger '=20
c1,<BR>  =
;=20
description =
c1,<BR> =20
'WHEN ('||when_clause||')'=20
c1,<BR> =
trigger_body=20
,<BR> =20
'/' =20
c1,<BR> =
'show=20
errors;' =20
c1,<BR> =20
'commit;' c1<BR> from=20
user_triggers<BR> where when_clause is not=20
null<BR>/<BR>spool off</SPAN></FONT></DIV>
<DIV> </DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN =
class=3D251581909-11082000>spool=20
c:\temp\Trigger2.sql<BR> col c1 format a79=20
word_wrap<BR> set long =
32000<BR> =20
set arraysize 1 verify off feedback off echo off heading off timing=20
off<BR> prompt REM Generating=20
Triggers<BR> select 'create or replace trigger =
'=20
c1,<BR>  =
;=20
description =
c1,<BR> =20
trigger_body =
,<BR> =20
'/' =20
c1,<BR> =
'show=20
errors;' =20
c1,<BR> =20
'commit;' c1<BR> from=20
user_triggers<BR> where when_clause is=20
null<BR>/</SPAN></FONT></DIV>
<DIV> </DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN =
class=3D251581909-11082000>spool=20
off<BR></SPAN></FONT></DIV>