Can't connect to azure sql via ssms

孤街浪徒 提交于 2019-12-12 13:54:12

问题


I'm trying to connect Azure's SQL database via SQL Server 2008 R2 SP2. I'm using Azure with free trial subscription. I already search everywhere and tried these things:

  1. Allow inbounds and outbounds rule in windows firewall for port 1433
  2. Check that TCP connections in SQL Server Configuration Manager is available and running on port 1433
  3. Create server and database on azure portal and configure its ip allowance

I connect with these settings

  • Server Type: Database Engine
  • Server Name: tcp:aaa.database.windows.net,1433 / aaa.database.windows.net
  • Login: bbb@aaa
  • Password: xxx

And the error is

"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: TCP Provider, error: 0 - A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond) (Microsoft SQL Server, Error: 10060)"

P.S. I also can't ping xxx.database.windows.net and can't telnet xxx.database.windows.net 1433


回答1:


Your question is confusing, as you're talking about both SQL Server and SQL Database. But, given the connection strings you mentioned (xxx.database.windows.net) you are definitely talking about SQL Database service, not SQL Server in a VM.

That said: You must allow certain IP addresses to connect to it (this is a built-in part of the service itself). Look at the SQL Database server's Firewall setting:

You'll need to add the IP address of your computer (or IP range), to access SQL Database through your local tools.



来源:https://stackoverflow.com/questions/35791192/cant-connect-to-azure-sql-via-ssms

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!