0
votes

I created a basic tier Sql Database in Azure. I would like to connect to it in SSMS. I am getting an 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: TCP Provider, error: 0 - No connection could be made because the target machine actively refused

I have seen several questions on Stackoverflow , which lead me to believe the issue is a firewall issue. How can I confirm this? I get the same error when entering an incorrect password. Is there an uncomplicated work-around if I am on a work network, and cant make any major firewall configuration changes?

2

2 Answers

0
votes

Yes, it would seem related to the firewall. If you are on the work network your workplace IP should be whitelisted. If it's not, there is a tab for the network settings in Azure if you go to your SQL server.

0
votes

I have seen several questions on Stackoverflow , which lead me to believe the issue is a firewall issue. How can I confirm this?

For the network-related error, you could confirm it via using telnet tool in CMD or Test-NetConnection commands in Powershell. For example, to verify a TCP connection to your SQL database server on port 1433, issue the command on your local machine:

telnet yoursqlserver.database.windows.net 1433

If the connection succeeds, a blank screen will show up, meaning that the computer port is open.

A failed connection will be accompanied by an error message. It can indicate either a closed port or the fact that the indicated remote server is not listening on the provided port.

For more information, Here is a guide to troubleshoot the database firewall.