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

Home -> Community -> Mailing Lists -> Oracle-L -> AW: How to find PL/SQL code

AW: How to find PL/SQL code

From: Schoen Volker <v.schoen_at_inplan.de>
Date: Fri, 11 Aug 2000 11:21:14 +0200
Message-Id: <10586.114336@fatcity.com>


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

/
spool off
=20
spool c:\temp\Trigger2.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
     select 'create or replace trigger ' c1,
            description c1,
           trigger_body ,
           '/'         c1,
           'show errors;'   c1,
           'commit;'   c1
     from user_triggers
     where when_clause is null

/
=20
spool off

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>&nbsp;</DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN =
class=3D251581909-11082000>spool=20
c:\temp\Trigger1.sql<BR>&nbsp;&nbsp;&nbsp;&nbsp; col c1 format a79=20 word_wrap<BR>&nbsp;&nbsp;&nbsp;&nbsp; set long = 32000<BR>&nbsp;&nbsp;&nbsp;&nbsp;=20
set arraysize 1 verify off feedback off echo off heading off timing=20 off<BR>&nbsp;&nbsp;&nbsp;&nbsp; prompt REM Generating=20 Triggers</SPAN></FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN=20
class=3D251581909-11082000>&nbsp;&nbsp;&nbsp;&nbsp; select 'create or = replace=20
trigger '=20
c1,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp= ;=20
description =
c1,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 'WHEN ('||when_clause||')'=20
c1,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = trigger_body=20
,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 '/'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 c1,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = 'show=20
errors;'&nbsp;&nbsp;=20
c1,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 'commit;'&nbsp;&nbsp; c1<BR>&nbsp;&nbsp;&nbsp;&nbsp; from=20 user_triggers<BR>&nbsp;&nbsp;&nbsp;&nbsp; where when_clause is not=20 null<BR>/<BR>spool off</SPAN></FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN =
class=3D251581909-11082000>spool=20
c:\temp\Trigger2.sql<BR>&nbsp;&nbsp;&nbsp;&nbsp; col c1 format a79=20 word_wrap<BR>&nbsp;&nbsp;&nbsp;&nbsp; set long = 32000<BR>&nbsp;&nbsp;&nbsp;&nbsp;=20
set arraysize 1 verify off feedback off echo off heading off timing=20 off<BR>&nbsp;&nbsp;&nbsp;&nbsp; prompt REM Generating=20 Triggers<BR>&nbsp;&nbsp;&nbsp;&nbsp; select 'create or replace trigger = '=20
c1,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp= ;=20
description =
c1,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 trigger_body =
,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 '/'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 c1,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = 'show=20
errors;'&nbsp;&nbsp;=20
c1,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 'commit;'&nbsp;&nbsp; c1<BR>&nbsp;&nbsp;&nbsp;&nbsp; from=20 user_triggers<BR>&nbsp;&nbsp;&nbsp;&nbsp; where when_clause is=20 null<BR>/</SPAN></FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN =
class=3D251581909-11082000>spool=20

off<BR></SPAN></FONT></DIV>

<P><FONT face=3DArial size=3D2>Mit freundlichen Gr=FC=DFen</FONT> </P>
<P><FONT color=3D#000000 face=3DArial size=3D2>i. V. Volker =
Sch=F6n</FONT> <BR><FONT=20
color=3D#000000 face=3DArial size=3D2>E-Mail:</FONT><U> <FONT = color=3D#0000ff face=3DArial=20
size=3D2><A=20
href=3D"mailto:v.schoen_at_inplan.de">mailto:v.schoen_at_inplan.de</A></FONT><= /U>=20
<BR><U><FONT color=3D#0000ff face=3DArial size=3D2><A =
href=3D"http://www.inplan.de/"=20
target=3D_blank>http://www.inplan.de</A></FONT></U> </P>
<BLOCKQUOTE style=3D"MARGIN-RIGHT: 0px">
  <DIV align=3Dleft class=3DOutlookMessageHeader dir=3Dltr><FONT = face=3DTahoma=20
  size=3D2>-----Urspr=FCngliche Nachricht-----<BR><B>Von:</B> Jeff = Wiegand=20
  [mailto:jwiegand_at_ancept.com]<BR><B>Gesendet:</B> Donnerstag, 10. = August 2000=20
  17:45<BR><B>An:</B> Multiple recipients of list = ORACLE-L<BR><B>Betreff:</B>=20
  How to find PL/SQL code<BR><BR></DIV></FONT>   <P><FONT size=3D2>Hello</FONT> </P>
  <P><FONT size=3D2>We have several triggers that have been modified.=20   Unfortunately, the modifications weren't saved, but they are = reflected in the=20
  database. How can I get Oracle to output the code of the triggers. I = select on=20
  user_triggers, or all_triggers, using trigger_name and trigger_body = columns,=20
  but only part of the code is outputted to the screen. How can I get = all of=20 Received on Fri Aug 11 2000 - 04:21:14 CDT

Original text of this message

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