Re: Extract Stored Procs & Function Code Regularly

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Mon, 21 Dec 1998 21:11:03 GMT
Message-ID: <3680b927.1695037_at_192.86.155.100>


A copy of this was sent to Tom D <tdimauro_at_wesleyan.edu> (if that email address didn't require changing) On Mon, 21 Dec 1998 15:44:58 -0800, you wrote:

>I would greatly appreciate if anyone knows of a way either through
>PL/SQL Code or utility that I could extract the PL/SQL of an existing
>database. For instance on a nightly basis I would like to extract the
>DDL's of all the stored procs and functions on a given Oracle Instance.
>
>I do not want to use the Oracle Backup procedures as this will backup
>the data and code. I just want to extract the code. In SYBASE I could
>simply write T-SQL to read the system tables and extract the DDL
>necessary. I am assuming I could do the Same with Oracle, however I am
>not as familiar with the Oracle system tables. And I believe that
>someone has already figured this one OUT.
>
>Thanks For ANY Help.
>
>TOM
>D.................................................................

Well, the code is in the table *_SOURCE (all_source, user_source, dba_source) and is quite easy to read out. Perhaps though the easiest way to get the code out and somewhere else might be to exp with rows=n, this will get all of the DDL to recreate your entire instance (procedures, views, tables, indexes, constraints, etc...)  

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Service Industries
Reston, VA USA

--
http://govt.us.oracle.com/    -- downloadable utilities
 
----------------------------------------------------------------------------
Opinions are mine and do not necessarily reflect those of Oracle Corporation
 
Anti-Anti Spam Msg: if you want an answer emailed to you, 
you have to make it easy to get email to you.  Any bounced
email will be treated the same way i treat SPAM-- I delete it.
Received on Mon Dec 21 1998 - 22:11:03 CET

Original text of this message