[转][C#][Oracle]备份
// 获取所有存储过程 -- owner,
string sql = @"select object_name
from dba_objects
where object_type=‘PROCEDURE‘
and owner=‘DBO‘";
string sql2 = @"select text from user_source where name = :a and type=‘PROCEDURE‘";
IEnumerable<string> axs = conn.Query<string>(sql);
if(axs != null && axs.Count() > 0)
{
foreach (var item in axs)
{
IEnumerable<string> proc = conn.Query<string>(sql2, new {
a = item
});
if(proc != null && proc.Count()>0)
{
var sw = File.CreateText(@"D:\" + item + ".sql");
sw.Write(string.Join("", proc));
sw.Close();
}
}
}转自:https://blog.csdn.net/qq_30189805/article/details/99288790
转自:https://blog.csdn.net/huangbaokang/article/details/95446606
相关推荐
Lzs 2020-10-23
聚合室 2020-11-16
零 2020-09-18
Justhavefun 2020-10-22
ChaITSimpleLove 2020-10-06
周游列国之仕子 2020-09-15
afanti 2020-09-16
88234852 2020-09-15
YClimb 2020-09-15
风雨断肠人 2020-09-04
卖口粥湛蓝的天空 2020-09-15
stulen 2020-09-15
pythonxuexi 2020-09-06
abfdada 2020-08-26
梦的天空 2020-08-25