最近,公司的服务器貌似有了问题,经常动不动的就会出现问题,plsql也会经常性的死机登不上去,想到了数据库的备份,以防万一。
简单代码如下:
//创建进程实例
Process p = new Process();
//文件名称
string fileName = Application.StartupPath + DateTime.Now.ToString("yyyyMMdd") + ".dmp";
//if (!File.Exists(fileName))
//{
// File.Create(fileName);
//}
//导出程序路径
p.StartInfo.FileName = "D:\\oracle\\product\\10.2.0\\db_1\\BIN\\exp.exe";
//启用操作系统外壳程序
p.StartInfo.UseShellExecute = true;
//显示dos执行过程
p.StartInfo.CreateNoWindow = false;
p.StartInfo.Arguments = "his/minimax_cmis@cmis file=" + fileName;
p.Start();
p.Dispose();
参考来源:
http://www.qiandabao.com/wdgz/1236.html