I trying to locate a script for generating create table
 ddl for tables that have partitions.
 I want to generate the ddl for the partitions as well
 as the tables.

 Any suggestions...

 Thanks
-------------------------------------------------------------
Bret,

How have you been? I hope things are well with you.
As for your questions, I do not have any SQL that does this for
partitions. I have not seen such a thing around.

What you CAN do is use the export and import facilities to generate such a
script.

Export the table (or tables):

exp owner=partition_owner userid=username/passwd file=expdat.dmp

Import the table using the INDEXFILE option to generate a script with the
"CREATE" DDL:

imp fromuser=partition_owner indexfile=cr_table.sql file=expdat.dmp
userid=username/passwd show=y

The above will generate a file, "cr_table.sql" with the DDL for creating
indexes, partitions, and tables. Note that you should remove the REM
statements if you want to use the script.

Happy computing!

-Ari Kaplan
Independent Oracle DBA Consultant

<-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><->
<-> For 265+ Oracle tips, visit my Web Page:                      <->
<->                                                               <->
<->             www.arikaplan.com                                 <->
<->                                                               <->
<->             email: akaplan@interaccess.com                    <->
<-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><->

Back to Ari Kaplan's Home Page "> Back to Ari Kaplan's Home Page