How can I generate Oracle Database export script Using Oracle SQL Developer?
I need to Generate an export script of entire 开发者_JAVA百科Oracle Database using using SQL Developer.
How can I do this?
Tools-> Database Export?
For backing up the entire database, I'd recommend using expdp/impdp from the command line. If you only need the objects and not the data, you can use the METADATA_ONLY setting, see
http://download.oracle.com/docs/cd/B19306_01/server.102/b14215/dp_export.htm
If you really need to generate a SQL script for your complete database and don't want to use a commercial tool like PL/SQL Developer, TOAD etc., you'll probably have to do it yourself - e.g. iterating over all objects and extract their DDL script using dbms_metadata.get_ddl(), something like
foreach user u in all_users
foreach object o in users_u_objects
script += dbms_metadata.get_ddl(u, o)
精彩评论