Friday, 9 November 2012

Export DDL of SCHEMA Through IMPDP SQLFILE OPTION

I want to Get  SUNIL Schema DDL only. But Unfortunately In datapump we can get this but while importing only. SQLFILE option only available in impdp .

Export:-  ( exporting metadata only )

 expdp DIRECTORY=EXPPUMP SCHEMAS=SUNIL DUMPFILE=SUNIL1.dmp LOGFILE=SUNIL1.log CONTENT=METADATA_ONLY

Import :-

impdp DIRECTORY=EXP_DP SCHEMA=SUNILDUMPFILE=SUNIL1.dmp LOGFILE=SUNIL.log full=y sqlfile=script.sql

since its metadata only and It will write all data into sqlfile.

No comments:

Post a Comment