How does the Data Pump generate DDL scripts for Exported Files and export ddl scripts?
When using exp/imp, it is very easy to generate the DDL script corresponding to the dumpfile file. When using the command imp, add the show, show = y parameter to display the imp import, output related DDL statements (excluding insert statements) without actually executing them in the database. in fact, the Data Pump (expdp/impdp) can also generate the DDL statement corresponding to the export dumpfile, the parameter is sqlfile. If the sqlfile parameter is added, the SQL DDL script corresponding to the dumpfile is generated, and impdp does not actually execute data import.
SQLFILE Write all the SQL DDL to a specified file.
If you use sqlfile parameter, impdp will not actulally perform the import process, rather it will generate all DDL that are supposed to be executed by impdp in the sqlfile you specified.
You can use a script similar to the following to generate the corresponding SQL DDL script:
Nohup impdp 'userid = "/as sysdba" 'directory = dump_dir full = y dumpfile = full_20160501.dmp logfile = test. log sqlfile = db_ddl. SQL &