且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

从另一台计算机连接到SQL Server

更新时间:2022-12-23 22:41:42

您应该检查:


  1. 删除 Trusted_Connection = True;在您的连接字符串中

  1. Remove "Trusted_Connection=True;" in your connection string

关闭两台计算机上的防火墙以进行测试。如果可行,则可以同时启用这两个功能,然后为特定应用程序配置访问权限

Turn off the firewall on both machines for testing. If it works, you can enable the both of them and then configure the access rights for specific application

在SQL Server实例上启用SQL身份验证: http://kbase.gfi.com/showarticle.asp?id=KBID002804

Enable SQL Authentication on SQL Server instance: http://kbase.gfi.com/showarticle.asp?id=KBID002804

无需运行c#代码即可测试其是否有效的简单方法:您可以在代码机上安装SQL Management Studio,然后尝试连接SQL Server实例。 / p>

Simple way to test it works or not without running your c# code: you can install the SQL Management Studio on the code-machine and try to connect the SQL Server instance.

希望它会有所帮助。