6

I need to Generate an export script of entire Oracle Database using using SQL Developer.

How can I do this?

Sathyajith Bhat
  • 21,321
  • 22
  • 95
  • 134
BJ Patel
  • 6,148
  • 11
  • 47
  • 81
  • Related question, how to do this scriptably i.e. that can be run from command line: http://stackoverflow.com/questions/10886450/how-to-generate-entire-ddl-of-an-oracle-schema – Andrew Spencer Jun 19 '13 at 09:26

2 Answers2

21

Tools-> Database Export?

Álvaro González
  • 142,137
  • 41
  • 261
  • 360
3

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)

Frank Schmitt
  • 30,195
  • 12
  • 73
  • 107