Message-Id: <10585.114303@fatcity.com> From: "Lucia DeMeester" Date: Thu, 10 Aug 2000 14:07:10 -0700 Subject: RE: How to find PL/SQL code I don't know whether there is a quick way to get the whole trigger script from the database. I think you need to go through several steps to recreate the trigger. Here is what I did: 1) first get the trigger_body from sys.dba_triggers (before you query the trigger_body you need to set long 2000) 2) select the rest of the columns such as trigger_type, triggering_event, table_name, when_clause etc. From these column information then you can sandwich the trigger body with the trigger_type etc. Hope this help. Lucia -----Original Message----- From: geeta.iyer@sprintparanet.com [mailto:geeta.iyer@sprintparanet.com] Sent: Thursday, August 10, 2000 12:44 PM To: ORACLE-L@fatcity.com Subject: RE: How to find PL/SQL code y.com [mailto:root@fatcity.com]On Behalf Of Jeff Wiegand Sent: Thursday, August 10, 2000 9:45 AM To: Multiple recipients of list ORACLE-L Subject: How to find PL/SQL code Hello 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. Jeff How to find PL/SQL code
Jeff,
 

set heading off

set feedback off

set linesize 100

set pagesize 0

break on name skip 10

spool exportStoredProceduresOnly.txt

select decode (line,1,'create or replace '||text,text)

from sys.dba_source

where owner='&Owner'

order by owner,name,type,line;

spool off

 

Hope this helps..

 

Geeta Iyer
Sprint Enterprise Network Services
Work:  (303)220-4788
Pager:  888-632-2718
E-Mail: Geeta.Iyer@SprintParanet.com

-----Original Message-----
From: root@fatcity.com [mailto:root@fatcity.com]On Behalf Of Jeff Wiegand
Sent: Thursday, August 10, 2000 9:45 AM
To: Multiple recipients of list ORACLE-L
Subject: How to find PL/SQL code

Hello

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.

Jeff

--- Internet Message Header Follows --- Received: from newsfeed.cts.com (209.68.192.199) by prophet.com (FirstClass Mail Server v5.11) transient id 791; 12:57:51 PM -0800 Received: from fatcity.UUCP (uucp@localhost) by newsfeed.cts.com (8.9.3/8.9.3) with UUCP id MAA15076; Thu, 10 Aug 2000 12:57:07 -0700 (PDT) Received: by fatcity.com (04-May-2000/v1.0f-b69/bab) via UUCP id 001A6DF8; Thu, 10 Aug 2000 11:44:06 -0800 Message-ID: Date: Thu, 10 Aug 2000 11:44:06 -0800 To: Multiple recipients of list ORACLE-L X-Comment: Oracle RDBMS Community Forum X-Sender: "Geeta Iyer" Sender: root@fatcity.com Reply-To: ORACLE-L@fatcity.com Errors-To: ML-ERRORS@fatcity.com From: "Geeta Iyer" Subject: RE: How to find PL/SQL code Organization: Fat City Network Services, San Diego, California X-ListServer: v1.0f, build 69; ListGuru (c) 1996-2000 Bruce A. Bergman Precedence: bulk