码迷,mamicode.com
首页 > 数据库 > 详细

convert expdp dmp file to SQL DDL statements

时间:2020-05-13 12:03:46      阅读:78      评论:0      收藏:0      [点我收藏+]

标签:with   convert   apr   cto   native   nts   imp   tin   actual   

convert expdp dmp file to SQL DDL statements

Oracle Database Tips by Donald BurlesonApril 7, 2016

Question:  I want to take an export dmp file and convert it into the native SQL statements.  Can I convert a dmp file using the sqlfile option?

Answer:  You cannot convert an existing dmp file because of its internal format, but you can re-run the impdp to get the SQL DDL statements from a Data Pump dmp file with this sqlfile command:

impdp scott/tiger directory=dir_name dumpfile=myfile sqlfile=xyz.sql

This sqlfile option will create a myfile file in the dir_name directory with the DDL statements.

Here is an example of using the sqlfile parameter with impdp to display the DDL within an Data Pump Export (expdp) file named myexp.dmp:

$ impdp directory=expdir dumpfile=myexp.dmp sqlfile=ddl.sql

In this example, the impdp does not actually perform an import of the contents of the dump file.  Rather, the sqlfile parameter create a script named ddl.sql that contains all DDL from within the export dump file.

Also see how using the sqlfile parameter is useful when gathering arguments for the dbms_datapump metadata_remap procedure.

convert expdp dmp file to SQL DDL statements

标签:with   convert   apr   cto   native   nts   imp   tin   actual   

原文地址:https://www.cnblogs.com/yaoyangding/p/12881317.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!