Re: Extracting full DDL from

From: neil kodner <nkodner_at_gmail.com>
Date: Fri, 16 May 2008 10:18:22 -0700 (PDT)
Message-ID: <87da5b21-6567-47d6-9f5d-8fd0a45b17d3@b1g2000hsg.googlegroups.com>


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
>
> Problems:
> 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 9.2.0.8 on solaris 8. (yes, this box is old. We do
> have better for other apps.)

Have you tried using datapump?

use
INCLUDE=PACKAGE
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

Original text of this message