4
votes

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
Have you ever tried to connect your database with Visual Studio? Log into the new portal, then SQL database -> <your database> -> Tools -> Open In Visual StudioJack Zeng
I had this problem recently. Turns out that the server itself wasnt configured to broadcast on port 1433Takarii
Can you clarify, is this an SQL Server DB(running in a VM), or the standard Azure SQL DB (not running in a VM)Takarii
Agreed - confusing - you tagged as sql-server and sql-server-2008-r2 yet you talk about SQL Database (which is a service). However, the URL you provide is absolutely SQL Database (xxx.database.windows.net) so... I'm assuming this is about sql-azure database.David Makogon

1 Answers

3
votes

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:

firewall

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