我在本地机器上连接Sql Server时遇到了问题。
我已经尝试了一切,但仍然无法连接。
这是我所做的:
1)在Sql Management Studio(SMS)中右键单击Sql Server -> Connections -> 允许远程连接
2)在Sql Management Studio(SMS)中右键单击Sql Server -> Security -> 允许远程连接 -> 将Auth模式设置为Win和Sql auth模式(即混合模式)
3)禁用防火墙
4)Sql Server Configuration Manager -> Network Configuration -> Protocols -> 启用Shared memory、Named pipes、TCP/IP
5)Sql Server Configuration Manager -> Network Configuration -> Protocols -> TCP/IP -> Properties -> 将TCP端口设置为1433,将TCP动态端口设置为0。之后,在“services.msc”中重启MainSql服务
6)在SMS中运行“EXEC xp_readerrorlog 1”,找到以下内容:
Server is listening on [ 'any' 1433]. Server is listening on [ 'any' 1433]. Server local connection provider is ready to accept connection on [ \.\pipe\SQLLocal\MAINSQL ]. Server named pipe provider is ready to accept connection on [ \.\pipe\MSSQL$MAINSQL\sql\query ]. Server is listening on [ ::1 64825]. Server is listening on [ 127.0.0.1 64825]。
7)尝试从我的家庭机器上telnet [myip] 1433。结果:连接到[myip]...无法打开端口1433的主机连接:连接失败
8)尝试从服务器上telnet [myip] 1433 - 这个可行!
看起来像是网络问题。我有另一台安装了Sql Server的服务器,我在它上面做了同样的事情,并且能够从我的家庭机器连接到它,但不能连接到这个服务器!我试图从第二个服务器连接到这个服务器,也没有成功。
请帮帮我,我不知道该怎么办。我已经尽力了,但仍然无法解决问题。
更新: 服务器机器上启动了Sql Server Browser服务。该服务器是托管的专用服务器,我正在尝试从我的家庭机器和另一个位于另一个国家的专用服务器连接到它。
我已经尝试了一切,但仍然无法连接。
这是我所做的:
1)在Sql Management Studio(SMS)中右键单击Sql Server -> Connections -> 允许远程连接
2)在Sql Management Studio(SMS)中右键单击Sql Server -> Security -> 允许远程连接 -> 将Auth模式设置为Win和Sql auth模式(即混合模式)
3)禁用防火墙
4)Sql Server Configuration Manager -> Network Configuration -> Protocols -> 启用Shared memory、Named pipes、TCP/IP
5)Sql Server Configuration Manager -> Network Configuration -> Protocols -> TCP/IP -> Properties -> 将TCP端口设置为1433,将TCP动态端口设置为0。之后,在“services.msc”中重启MainSql服务
6)在SMS中运行“EXEC xp_readerrorlog 1”,找到以下内容:
Server is listening on [ 'any' 1433]. Server is listening on [ 'any' 1433]. Server local connection provider is ready to accept connection on [ \.\pipe\SQLLocal\MAINSQL ]. Server named pipe provider is ready to accept connection on [ \.\pipe\MSSQL$MAINSQL\sql\query ]. Server is listening on [ ::1 64825]. Server is listening on [ 127.0.0.1 64825]。
7)尝试从我的家庭机器上telnet [myip] 1433。结果:连接到[myip]...无法打开端口1433的主机连接:连接失败
8)尝试从服务器上telnet [myip] 1433 - 这个可行!
看起来像是网络问题。我有另一台安装了Sql Server的服务器,我在它上面做了同样的事情,并且能够从我的家庭机器连接到它,但不能连接到这个服务器!我试图从第二个服务器连接到这个服务器,也没有成功。
请帮帮我,我不知道该怎么办。我已经尽力了,但仍然无法解决问题。
更新: 服务器机器上启动了Sql Server Browser服务。该服务器是托管的专用服务器,我正在尝试从我的家庭机器和另一个位于另一个国家的专用服务器连接到它。