Re: Extracting full DDL from

From: Terry Dykstra <tddykstra_at_forestoil.ca>
Date: Thu, 15 May 2008 21:15:05 GMT
Message-ID: <tJ1Xj.2922$KB3.1028@edtnps91>


<sybrandb_at_hccnet.nl> wrote in message
news:mc7p24tja3s0vfitjoehmtuiqijhcguimt_at_4ax.com...
> On Thu, 15 May 2008 10:04:30 -0700 (PDT), Altus
> <silverback_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.)
>
>
> In my experience it boils down the classical settings for single
> column output
>
> set heading off newpage 0 pagesize 0 feedback off
> -- for dbms_metadata
> set long 100000000000000 (whatever big number)
> set linesize 132
>
>
> hth
> --
> Sybrand Bakker
> Senior Oracle DBA

A great tool to generate this kind of stuff is the freeware DDLWizard, which uses an export file created with rows=n. http://www.ddlwizard.com/

-- 
Terry Dykstra 
Received on Thu May 15 2008 - 16:15:05 CDT

Original text of this message