0
votes

I might be the million'th person posting about this, but others' solutions haven't helped me. I have a database on Microsoft SQL Azure. I an trying to connect to it using the Visual Studio 2010's "Connect to Database" Tool.

From my Windows 7 machine, I can connect to it very easily. But from my Windows Server 2008R2 machine i am getting the classic error -

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)

All the posts around the web seem to be focussing on the problems on the server side, no one cares if the client goes rogue. :(

Thanks for the replies.

2

2 Answers

0
votes

I have seen similar problems with VS2010 DB Tool and Windows Server so I would not suggest try using SSMS 2008 R2 (must be R2). Once you have download SSMS 2008 R2 and configured properly to work on Windows Server it sure will work. In most of the case you really need to open SSMS settings to get it workon on Windows Server.

Next a few points to check:

  1. Verify that the telnet is working from your Windows Server Machine: c:>telnet _your_sqlazure_database_name.database.windows.net 1433

  2. Disable your real time security and the try again

  3. Finally following the link to keep applying settings in your Windows Server and SSMS which are applicable and I am sure it will work: http://www.mssqltips.com/sqlservertip/2340/resolving-could-not-open-a-connection-to-sql-server-errors/
0
votes

One issue is that you need to connect via tcp, not named pipes (per your error message).

Are both servers behind the same firewall (e.g. the same external IP address)? The SQL Azure firewall needs to be configured to allow access from remote IP addresses.