Home » SQL & PL/SQL » SQL & PL/SQL » What is the best tool for generating DDL of entire database?
What is the best tool for generating DDL of entire database? [message #358257] Mon, 10 November 2008 06:25 Go to next message
Andre1
Messages: 4
Registered: November 2008
Location: London
Junior Member
Hello, I've developed a database using Oracle's free tool 'SQL Developer'. My DBA has asked for a DDL script which he can use to recreate the entire database (excluding data) in a new database (he wants a script rather than a dump-file so that he can examine the script before running it).

SQL Developer has a tool for generating such a script, but it doesn't seem to pay much attention to the order in which the DDL statements are generated: this means that when you try to run the script as-is in another database you get error messages due to things like Views referring to Functions which haven't been created yet.

So far, I've been manually editing these scripts to put the DDL in the right order, but this is tedious and I'm wondering if there's a better way! I'd appreciate any ideas.
Re: What is the best tool for generating DDL of entire database? [message #358262 is a reply to message #358257] Mon, 10 November 2008 06:32 Go to previous messageGo to next message
S.Rajaram
Messages: 1027
Registered: October 2006
Location: United Kingdom
Senior Member
Check this link and search for content parameter.

http://download.oracle.com/docs/cd/B19306_01/server.102/b14215/dp_export.htm#sthref62

I didn't realise you don't need a .dmp file. You can get that information by calling dbms_metadata.get_ddl function. Just make sure you set the long value parameter to a high value.

Hope this helps

Regards

Raj

[Edit:] Link corrected

[Updated on: Mon, 10 November 2008 06:42]

Report message to a moderator

Re: What is the best tool for generating DDL of entire database? [message #358269 is a reply to message #358262] Mon, 10 November 2008 07:42 Go to previous message
Andre1
Messages: 4
Registered: November 2008
Location: London
Junior Member
Many thanks Smile
Previous Topic: Inline query with not exists clause
Next Topic: Date with suffix in top
Goto Forum:
  


Current Time: Fri Feb 07 18:54:00 CST 2025