Sqlserver 2008 执行Osql 报错
最近将服务器搬迁到新服务器上,以前所有代码在老服务器都能运行正常,但是搬到老服务器就出现这个错误,老服务器用的sqlserver2005,新服务器用的2008,但是不知道为什么出现这个问题,解决好几天了没解决,各位帮帮忙,以下是代码信息
Process sqlprocess = new Process();
sqlprocess.StartInfo.FileName = "sqlcmd.exe";
sqlprocess.StartInfo.UseShellExecute = false;
sqlprocess.StartInfo.RedirectStandardInput = true;
sqlprocess.StartInfo.RedirectStandardOutput = true;
sqlprocess.StartInfo.RedirectStandardError = true;
sqlprocess.StartInfo.CreateNoWindow = true;
string arguments = string.Format(" -U {0} -P {1} -S {2} -i {3} -d {4}","sa", "123","127.0.0.1", @"D:\wwwroot\Isql.sql", "test");
sqlprocess.StartInfo.Arguments = arguments;
sqlprocess.Start();
string text = sqlprocess.StandardOutput.ReadToEnd();
sqlprocess.WaitForExit();
sqlprocess.Close();
Response.Write(text);
以下是错误信息
[SQL Server Native Client 10.0]SSL 提供程序: 无法连接到本地安全机构 [SQL Server Native Client 10.0]客户端无法建立连接
请求各位帮助,谢谢。