标签:服务器 top bsp tar 执行 程序 exe form span
string infile = @"C:\Users\yudm\Desktop\test\Patch.sql"; Process sqlprocess = new Process(); sqlprocess.StartInfo.FileName = "osql.exe"; sqlprocess.StartInfo.Arguments = String.Format("-U {0} -P {1} -S {2} -i {3} -d {4}", "sa", "12344321", "127.0.0.1", @infile,""); //U为用户名,P为密码,S为目标服务器的ip,infile为数据库脚本所在的路径 d为databse sqlprocess.StartInfo.WindowStyle = ProcessWindowStyle.Hidden; sqlprocess.Start(); sqlprocess.WaitForExit(); //等待程序执行.Sql脚本 sqlprocess.Close();
标签:服务器 top bsp tar 执行 程序 exe form span
原文地址:http://www.cnblogs.com/damsoft/p/6095370.html