how can i set up an azure virtual machine running sql server to allow connection from the internet

Angel Garcia 0 Reputation points
2025-04-25T17:10:46.67+00:00

I have a windows virtual machine in azure subscription that i installed SQL server on. I need to be able to allow a single IP address from the internet to be able to connect to the sql instance. I have enabled TCP/IP and shared memory, allowed the connection in the NSG to the specific SQL server port, created a SQL login on the instance. Cannot figure out what i am misssing

Azure SQL Database
{count} votes

1 answer

Sort by: Most helpful
  1. Sina Salam 19,616 Reputation points
    2025-04-30T15:25:21.24+00:00

    Hello Angel Garcia,

    Welcome to the Microsoft Q&A and thank you for posting your questions here.

    I understand that you need to allow a single IP address from the internet to connect to a SQL Server instance running on a Windows virtual machine (VM) in an Azure subscription. Despite enabling TCP/IP and shared memory, configuring the Network Security Group (NSG) to allow traffic to the SQL Server port, and creating a SQL login, the connection is still not working.

    @Adithya Prasad K have solved the problem except unexplained issues however, this is an additional to the solution provided.

    Also, check the link below for more detail steps to follow:

    I hope this is helpful! Do not hesitate to let me know if you have any other questions or clarifications.


    Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful.

    0 comments No comments

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.