Nomfundo Florence
Nomfundo Florence

Reputation: 23

Connection to Azure SQL Server

While trying to connect to my server on Azure using SSMS I get the following error:

Reason: An instance-specific error occurred while establishing a connection to SQL Server. Connection was denied since Deny Public Network Access is set to Yes (https://docs.microsoft.com/azure/azure-sql/database/connectivity-settings#deny-public-network-access). To connect to this server, use the Private Endpoint from inside your virtual network (https://docs.microsoft.com/azure/sql-database/sql-database-private-endpoint-overview#how-to-set-up-private-link-for-azure-sql-database). (Microsoft SQL Server, Error: 47073)

Is there another way to fix this problem other than creating a private endpoint in a virtual network?

I tried selecting a database that the SSMS should actually work with like someone suggested I do, but I still get an error on that side too (this is in SSMS)... Also tried creating a private virtual endpoint, I don't know where I mess it up. I still get the error.

Upvotes: 1

Views: 902

Answers (1)

Bhavani
Bhavani

Reputation: 5317

When I tried to replicate the issue, I got the same error:

enter image description here

If you want to connect Azure SQL Database to SSMS which is on-premises, you can directly enable public access of Azure SQL database and whitelist the IP address of SSMS without using private endpoint. You can follow below procedure to do this:

Go Networking of SQL server Enable Selected Network, to whitelist the IP you need to create new Firewall Rule as mentioned below:

enter image description here

Go to SSMS and try to connect SQL database then you will get a popup to whitelist the IP address as mentioned below:

enter image description here

If you click on OK, then it will be whitelisted automatically, and SQL database will connect successfully.

enter image description here

Otherwise, if you want to connect with private endpoint you can follow this.

Upvotes: 2

Related Questions