ITPub博客

首页 > 数据库 > Oracle > 如何获取expdp出来的dmp文件中的DDL语句

如何获取expdp出来的dmp文件中的DDL语句

Oracle 作者:tolywang 时间:2015-04-01 10:16:48 0 删除 编辑
Data Pump sqlfile parameter tips 

Oracle Tips by Burleson Consulting
July 21, 2010

Question:  In the old import utility we were able to use "show=y" to see the DDL contents of an export dump file.  What is the equivalent in Data Pump?

Answer:  In Data Pump import (impdp) made several great improvements:

The dump file is now in XML, and you can browser a dump file to see the contents.
The show=y has been replaced by the sqlfile argument.
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     ---  使用这个参数可以打印出DDL , 加入了这个参数后,impdp不会实际执行 。如果需要执行,需要去掉这个参数。

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.

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/35489/viewspace-1481091/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
Oracle , MySQL, SAP IQ, SAP HANA, PostgreSQL, Tableau 技术讨论,希望在这里一起分享知识,讨论技术,畅谈人生 。

注册时间:2007-12-10

  • 博文量
    5595
  • 访问量
    14695625