tags:

views:

103

answers:

2

Hi Experts,

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.

+1  A: 

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
Gary
A: 

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.

devio
Hi Devio,I am gettingD:\IhubTest\orascript\tool>oraddlscript.exe -s HYDIHUBError: The type initializer for 'Oracle.DataAccess.Client.OracleConnection' threw an exception.Error: The provider is not compatible with the version of Oracle clientwhen i use oraddlscript. Please suggest meRegardsNash
@gnash-85 did you install ODAC? http://devio.wordpress.com/2009/11/04/oraddlscript-solving-odp-net-version-conflicts/ ODAC11 claims compatibility with all Oracle databases >= 9.2
devio