Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Generate DDL from a Schema

Re: Generate DDL from a Schema

From: Mark D Powell <Mark.Powell_at_eds.com>
Date: Fri, 21 Sep 2007 06:43:40 -0700
Message-ID: <1190382220.988150.18210@y42g2000hsy.googlegroups.com>


On Sep 21, 1:45 am, nickli2..._at_gmail.com wrote:
> Hi,
>
> I am trying to generate DDL scripts for each table, view and other
> indexes under a schema. I tested using DBMS_METADATA package and its
> get_ddl procedure. However, I can only output the create table (view,
> indexes) statements for all the tables in a schema in one script, not
> in each separation script, such as create table table_1.script, create
> table table_2.script, etc.
> I have hundreds of tables, views, indexes, types and other objects
> under one schema. I would appreciate your advice on the issue.
>
> Thanks in advance.
>
> Nick Li

Nick, from your post I am not sure if you problem is that you want all the DDL in one script and you are getting separate scripts or if you want separate scripts and are getting one script file.

At the OS level at least on a UNIX platform combining separate files into one would be fairly easy.

If you generate the script to generate the DDL then you ought to be able to control the spool file statement placement.

Perhaps if you posted the actual code you are using or at least more detail on how you are generating the DDL someone could provide useful advice.

HTH -- Mark D Powell -- Received on Fri Sep 21 2007 - 08:43:40 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US