Unable to remotely access SQL server 2019 on Azure Virtual Machine

anthony clarke 6 Reputation points
2021-08-02T13:07:04.09+00:00

Hello,

I am trying to trying to connect to SQL server on the Azure Virtual Machine remotely through my local SSMS but, I am not able to connect,
it says server not reachable ,

What I have tired is -
Open port on VM network configuration ,inbound and outbound
tried Win 10 Pro firewall port open ,inbound and outbound

set SQL server configuration manager IP address to 1433 to all
enabled named pipe configuration

Still not able to connect.

119809-image.png

Any help would be appreciated .
Thanks

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
8,133 questions
0 comments No comments
{count} vote

3 answers

Sort by: Most helpful
  1. woodymoo 266 Reputation points
    2022-11-29T15:02:07.837+00:00

    If you install the sql server 2019 manually in a windows VM in Azure.
    To check the connection from external internet, do the following things:

    1. Enable the sql port 1433 from your external ip address in Azure vm network security group.
      265294-pasted-graphic-10.png
    2. In your vm, run ssms, try to connect the sql service by private ip address ( 10.1.0.X ... ) , if failed with same error, mostly because it is the TCP/IP protocol is not enabled in sql service
    3. Check SQL Server configuration Manager, Enable the tcp/ip protocol. And restart the sql service, then try SSMS to connect the sql service by private ip address
      265216-pasted-graphic-8.png265259-pasted-graphic-9.png
    4. Then, you can connect the sql server sql service by Sql server management studio or Azure Data Studio from your home/office.
    2 people found this answer helpful.

  2. Olaf Helper 45,366 Reputation points
    2021-08-02T13:36:27.167+00:00

    ... and that SQL Server is configured to allow remote connections.

    And, are remote connections allowed? E.g. SQL Server Express don't allow remote connections by default.


  3. Cris Zhan-MSFT 6,641 Reputation points
    2021-08-03T02:22:50.777+00:00

    Hi,

    Please try to refer to this official document to check if there is anything you haven't noticed.

    Connect to a SQL Server virtual machine on Azure

    If this VM is not a SQL Server virtual machine, but a Windows VM with SQL Server manually installed,you may also need to allow connections to ports that SQL Server is listening on from the Azure portal.

    SQL SERVER – FIX: Cannot Connect to SQL in Azure Virtual Machine From Laptop


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.