求一个c#备份oracle数据库的程序!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
用c#程序实现oracle数据库的备份,高手帮帮忙,指教下.具体点的,谢谢!
------解决方案--------------------using System;
using System.Diagnostics;
namespace Tipo.Tools.Utility
{
/// <summary>
/// 常用Dos命令操作
/// </summary>
public class DosCommand
{
private Process process=null;
private string _errmsg;
public DosCommand()
{
process = new Process();
process.StartInfo.FileName = "cmd.exe";
process.StartInfo.UseShellExecute = false;
process.StartInfo.RedirectStandardInput = true;
process.StartInfo.RedirectStandardOutput = true;
process.StartInfo.RedirectStandardError = true;
process.StartInfo.CreateNoWindow = false;
process.Start();
}
//检测文件或目录是否存在
public string exist(string path)
{
process.StandardInput.WriteLine(string.Format("dir \"{0}\"",path));
process.StandardInput.WriteLine("exit");
_errmsg = process.StandardError.ReadToEnd();
return _errmsg;
}
}
}
将上面换成exp 即可