简体   繁体   English

如何从Oracle数据库备份选定的过程或函数

[英]How I can take backup of selected Procedures or Functions from Oracle database

I want to save selected procedures and functions for backup purposes in .prc file format. 我想以.prc文件格式保存选定的过程和函数以用于备份。 As of now I am doing this manually by the help of PLSQL Developer. 到目前为止,我正在PLSQL Developer的帮助下手动进行此操作。

I have found some solutions, but none worked for me. 我找到了一些解决方案,但没有一个对我有用。 Here is an example. 这是一个例子。

  1. expdp schemas=Test, include= procedure like 'abc%'; expdp schemas = Test,include =过程,例如“ abc%”;

and here is the error while executing the above script. 这是执行上述脚本时的错误。

SP2-0734: unknown command beginning "expdp sche..." - rest of line ignored. SP2-0734:未知命令以“ expdp sche ...”开头-其余行被忽略。

Please help me if there is any way to automate this manual effort. 如果有任何方法可以自动执行此手动操作,请帮助我。

you can try this 你可以试试这个

 SELECT TEXT FROM
 ALL_SOURCE 
 WHERE NAME LIKE '%abc%'
 TYPE='PACKAGE BODY'
 ORDER BY LINE

distinct type 独特的类型

PROCEDURE , PACKAGE ,PACKAGE BODY, TYPE BODY, TRIGGER ,FUNCTION ,TYPE 程序,包装,包装体,类型体,触发,功能,类型

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM