Unable to connect to Azure SQL database from SSMS

Rajesh Swarnkar 851 Reputation points
2021-10-27T11:39:21.447+00:00

Hi,

I followed this blog to create SQL Virtual Machine.

I am able to connect to the default DB within the VM itself, but Not able to connect through my ocal workstation(Laptop).

   TITLE: Connect to Server  
     
   \------------------------------  
     
     
   Cannot connect to 20.198.126.38.  
     
     
   \------------------------------  
     
   ADDITIONAL INFORMATION:  
     
   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) (Microsoft SQL Server, Error: 53)  
     
   For help, click: https://learn.microsoft.com/sql/relational-databases/errors-events/mssqlserver-53-database-engine-error  
     
     
   \------------------------------  
     
     
   The network path was not found  
     
     
   \------------------------------  
     
   BUTTONS:  
     
   OK  
     
   \------------------------------  

144159-image.png

SQL Server on Azure Virtual Machines
0 comments No comments
{count} votes

Accepted answer
  1. shiva patpi 13,131 Reputation points Microsoft Employee
    2021-10-27T14:24:08.82+00:00

    Hello @rswarnka ,
    You will have to add inbound security rule for that VM under Network Security Groups
    TCP , Port : 1433

    144263-image.png

    Let me know if that helps. Please make sure to "Upvote & Accept the answer"

    Regards,
    Shiva.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful