无法在Windows Azure上的虚拟机中从本地连接到SQL Server

时间:2013-09-26 10:53:40

标签: sql-server azure azure-virtual-machine

我尝试从本地SQL Server Mangement Studio连接到Azure上的VM中托管的SQL Server。 我遵循了所有的指示 http://www.windowsazure.com/en-us/manage/windows/common-tasks/install-sql-server/并创建了必要的端点:

enter image description here

不知何故,我无法连接到SQL Server,收到此错误


Cannot connect to xxx.cloudapp.net.
ADDITIONAL INFORMATION:

A network-related or instance-specific error occurred while establishing a connection
to SQL Server. The server was not found or was not accessible. Verify that the instance      
name is correct and that SQL Server is configured to allow remote connections.  
(provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)  
(Microsoft SQL Server, Error: 53)


The network path was not found

我alredy试图临时禁用虚拟机上的Windows防火墙 - 但没有成功。有什么建议吗?

1 个答案:

答案 0 :(得分:0)

我有同样的问题,这个麻烦帮助我接近解决方案:

Use SQL Server Management Studio to connect remotely to an SQL Server Express instance hosted on an Azure Virtual Machine

总结一下,我做了什么,我不知道是否所有这些步骤都是必要的,所以你应该在每一步之后进行测试:

1)在SQL Server配置管理器中启用协议中的命名管道

2)在VM中为sql server端口添加一个windows防火墙入站规则(在我的情况下是默认的1433,在你的看来它似乎是1435,确保它在sql server配置中是1435)

3)确保您使用的是sql server身份验证登录(不是Windows身份验证),如果您没有在VM中本地创建它> MSSMS

4)确保SQL服务器配置为混合身份验证(http://www.katieandemil.com/microsoft-sql-server-error-18456-login-failed-for-user

5)确保sql server浏览器正在运行

希望这会有所帮助:)