Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Extracting DDL statements from Export dump file

Status
Not open for further replies.

yakum0

IS-IT--Management
Jul 27, 2004
12
GB
I have an Export dump file and would like to extract all of the DDL statements from it (ie create table, create index etc).

Does anyone know if this is possible?

Your help would be much appreciated.

Regards

Yakum
 
Yakum,

Yet another method to obtain table and index DDL from a dump file is to specify as one of the import parameters, "indexfile=<some_name>". This option suppresses any actual importing to the database, and it produces a file containing the DDL for both tables and indexes. (The table DDL, however, is commented out in the "indexfile", but if you wish to "execute" the file, you can eliminate the commenting "*"s. I have used this method frequently to create tables where I must change tables' import parameters prior to importing the rows.

[santa]Mufasa
(aka Dave of Sandy, Utah, USA @ 15:09 (31Jul04) UTC (aka "GMT" and "Zulu"), 08:09 (31Jul04) Mountain Time)
 
SantaMufasa,

Could you use this to re-create the Indexs and Constraints?

 
Michael,

Since there is no penalty in producing the "indexfile", I suggest you produce it and look it over for content. You will notice that the content is "ready-to-run" code to reproduce indexes, plus code to re-create tables that has "REM" commenting in front of each line of table DDL. The table DDL contains constraint definitions.

If you do not want to re-run the table DDL, then you would need to decide if it is worth your editing trouble to extract and modify the constraint definitions to become independently runable.

[santa]Mufasa
(aka Dave of Sandy, Utah, USA @ 16:10 (10Aug04) UTC (aka "GMT" and "Zulu"), 09:10 (10Aug04) Mountain Time)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top