oracle 是否可以在没有包体的情况下提取包的 ddl

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/3985382/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-18 21:44:52  来源:igfitidea点击:

Is it possible to extract ddl of a package without package body

oracleplsql

提问by Serkan Kasapba??

I am using dbms_metadata.get_ddl function. I extract ddl of package and package body seperate and use them separately, so i dont need PACKAGE BODY's ddl when i ask for PACKAGE ddl. However get_ddl('PACKAGE',some_package) returns PACKAGE and PACKAGE BODY's ddls together. Is there a parameter to set, or anything else to make this possible...

我正在使用 dbms_metadata.get_ddl 函数。我分别提取包和包体的 ddl 并单独使用它们,所以当我要求 PACKAGE ddl 时,我不需要 PACKAGE BODY 的 ddl。但是 get_ddl('PACKAGE',some_package) 一起返回 PACKAGE 和 PACKAGE BODY 的 ddls。是否有要设置的参数,或其他任何使这成为可能的参数...

回答by G?T?

Try dbms_metadata.get_ddl('PACKAGE_SPEC', some_package instead)(there is similar with PACKAGE_BODY)

尝试dbms_metadata.get_ddl('PACKAGE_SPEC', some_package instead)(与 类似PACKAGE_BODY

回答by Hans

For a well formated ddl extraction and easy to use you can get ZoraDDL. This is a little commandlinetool to extract DDL from the Database with many features. Look at ZorraDDL Homepagefor more Information.

对于格式良好且易于使用的 ddl 提取,您可以获得 ZoraDDL。这是一个小命令行工具,用于从具有许多功能的数据库中提取 DDL。查看ZorraDDL 主页了解更多信息。