开发者

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

开发者 https://www.devze.com 2023-01-02 00:13 出处:网络
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 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.


SQL Developer -> Tools -> Database Export...


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


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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消