Re: Extracting full DDL from
Date: Fri, 16 May 2008 10:18:22 -0700 (PDT)
On May 15, 11:04 am, Altus <silverb..._at_photobooks.com> wrote:
> I need to generate the DDL for all packages in one schema. It has to
> be an executable file so it can be run with one command.
> SQL> @allpackage.sql
> select from dba_source... ;
> is lacking the final “/” and the beginning “CREATE OR REPLACE”
> Using DBMS_METADATA causes failures when the output is split across
> two chunks.
> ... from XYZ where pri_key_v <end of chunk>
> <start of chunk>alue = 5;
> Does anybody have a clean way to produce this code?
> Oracle Enterprise 22.214.171.124 on solaris 8. (yes, this box is old. We do
> have better for other apps.)
Have you tried using datapump?
INCLUDE=PACKAGE_BODY in your parameter file, and then use impdp and the sqlfile parameter. It produces nicely formatted output.
doh! I just realized that you're using 9i. Hopefully someone else will find this useful :D Received on Fri May 16 2008 - 12:18:22 CDT