NareshKumar
NareshKumar

Reputation: 1709

I want to generate DDL for entire schema in oracle 10 G?

I am using Oracle 10G.

I am new to oracle, I have little bit regarding dbms_metadata.get_ddl, now using this utility i want to generate a DDL for my entire schema.

I mean what ever DDL operations done on my schema (testschema).

Please help me out.

Thanks

Nash.

Upvotes: 3

Views: 10792

Answers (4)

David Atkinson
David Atkinson

Reputation: 5909

A really simple way is to create a new blank schema, compare your existing schema (testschema) against this using Schema Compare for Oracle, and click on the Deployment button to generate the DDL automatically.

Upvotes: 0

devio
devio

Reputation: 37225

Have a look at my command-line tool oraddlscript, which calls the GET_DLL() function for every object of a given user. The result can be written to one file per each object.

Upvotes: 1

Gary Myers
Gary Myers

Reputation: 35401

Suggest you look into EXPDP. That can produce a full export of all the objects (with or without data) in a schema.

If it is a fairly 'plain' schema (no exotic objects and dependencies), you could script something based on

SELECT DBMS_METADATA.GET_DDL(object_type, object_name) FROM user_objects

Upvotes: 1

Related Questions