到远程服务器的 SQL Server 连接字符串
我有一个远程 SQL Server Express (2008 R2),其 IP 为:xx.xxx.xxx.xx,实例名称为:myInstance。
我一直在尝试以用户(dbUser)和密码(myPass)连接到数据库(myDB)。
我尝试过各种字符串组合,但没有一个有效。我确信我弄错了,因为服务器正常,我可以 ping IP 地址,SQL Server 在端口 1433 上运行,该端口是开放的。我还在服务器上启用了浏览器服务和远程连接。
请有人给我正确的字符串...
I have a remote SQL Server Express (2008 R2) with an IP: xx.xxx.xxx.xx and an instance name: myInstance.
I have been trying to connect to a DB (myDB) as user (dbUser) and with password (myPass).
I have tried various string combinations but none works. I am sure I got it wrong because the server is ok, I can ping the IP Address, SQL Server runs on port 1433, which is open. I have also enabled browser service and remote connection on the server.
Please someone give me the correct string...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如何:配置 Express 以接受远程连接
How to: Configure Express to accept remote connections
造成这种情况的原因可能有很多,但是,您没有发布任何有用的详细信息,例如错误消息或引发的异常(如果有)。
检查 Windows 防火墙是否允许端口 1433 上的访问 - 这是失败的最可能原因,因为您使用的是 IP 地址而不是实例的名称。
我建议查看 http://connectionstrings.com 来检查您的连接字符串。
There could be many reasons for this, however, you didn't post any useful details such as error messages or what exception was thrown (if any).
Check that Windows Firewall allows access on port 1433 - this is the most likely reason for the failure, since you are using an IP address and not the name of the instance.
I suggest looking at http://connectionstrings.com to check your connection string.