使用tcp/ip连接到SQL Server [英] connecting to sql server with tcp/ip
问题描述
您好,我正在尝试使用connectionString连接到远程计算机上的数据库:
string="Data source=192.168.0.1, 1433; Network Library=DBMSSOCN; Initial Catalog=mydataBase; User Id=myUserId; Password=****";
我已将我的sql server 2005 Express Edition配置为允许远程连接,并在Windows防火墙例外中添加了sqlsrv.exe例外.连接字符串不起作用,当我尝试访问远程数据库时,它总是抛出一条失败消息.我该怎么办?
在此先感谢
Martin
hi there,am trying to connect to a database on a remote computer with the connectionString:
string="Data source=192.168.0.1, 1433; Network Library=DBMSSOCN; Initial Catalog=mydataBase; User Id=myUserId; Password=****";
I have configured my sql server 2005 express edition to allow remote connections and added an sqlsrv.exe exception in my windows firewall exception. The connection string does''t work out,it always throws a failure message when i try to access the remote database.How can i go about this?
Thanks in advance
Martin
推荐答案
告诉我们它抛出错误消息"而没有告诉我们消息的内容,这是毫无意义的.
您是否更改了表面配置以允许通过TCP/IP连接?
Telling us it "throws an error message" without telling us WHAT THE MESSAGE IS, is beyond pointless.
Did you change the surface configuration to allow connection via TCP/IP?
在SqlServer Configuration Manager中,请确保在Sql Server网络配置下TCP/IP的状态已启用
In SqlServer Configuration Manager make sure that under Sql Server Network Configuration TCP/IP has status enabled
这篇关于使用tcp/ip连接到SQL Server的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!