how to connect SQL Database to Azure Data Studio through private endpoint?

Olivia Balas 40 Reputation points
2025-10-23T17:37:59.26+00:00

Hello! I have a SQL database and server set up on the Azure portal, and I'm trying to connect it to Azure Data Studio 2. I want to connect the two by way of a private endpoint so that I have maximum security. The problem is, I can only really get that connection to work through the public connections by using a firewall: I haven't had much success connecting privately otherwise. I tried to set up a VM and private endpoint, but Studio isn't connecting to the VM and the endpoint isn't showing up. I'm afraid I don't fully understand what I'm doing.

If somebody could give me a step-by-step process on how to connect Azure Data Studio 2 to my SQL database through the private endpoint, that would be greatly appreciated.

Thank you!

Azure Data Studio
Azure Data Studio
A cross-platform database tool for data professionals using on-premises and cloud data platforms on Windows, macOS, and Linux.
0 comments No comments
{count} votes

Answer accepted by question author
  1. Mahesh Kurva 9,725 Reputation points Microsoft External Staff Moderator
    2025-10-23T18:41:43.64+00:00

    Hi Olivia Balas ,

    Greetings!!

    In addition to the Marcin Policht

    It sounds like you're trying to securely connect your SQL Database to Azure Data Studio using a private endpoint, which is a great way to enhance security by bypassing the public internet. Let’s break down the steps you can follow to establish this connection.

    Step-by-Step Process to Connect Azure Data Studio to SQL Database via Private Endpoint

    1. Create a Private Endpoint: Use the Azure portal, Azure PowerShell, or Azure CLI to create a private endpoint for your SQL database. This private endpoint will allow connections from your virtual network (VNet) to your SQL database over a private IP address. You can find detailed instructions for setting up a private endpoint:
    2. Approval of the Private Endpoint Connection: After creating the private endpoint, you might need to approve it:
      • Navigate to your SQL server in the Azure portal, go to Private endpoint connections, and approve the connection if it's in a Pending state.
    3. Configure DNS Resolution: Ensure that your virtual network has the necessary DNS settings so that requests can correctly resolve the SQL database's private endpoint IPs. If the virtual network uses Azure DNS:
      • Create a private DNS zone named privatelink.database.windows.net.
      • Link this DNS zone to the virtual network.
      • Add an A record for your SQL server's name pointing to the IP of the private endpoint.
    4. Install Azure Data Studio & Set Up Connection: Once the private endpoint is set up and DNS is configured:
      • Open Azure Data Studio.
      • In the connection dialog, use the following details:
      • Server name: Use the fully qualified domain name (FQDN) of the SQL server in the privatelink zone (e.g., yourserver.privatelink.database.windows.net).
      • Authentication type: Choose SQL Login.
      • Username and Password: Enter your admin credentials.
    5. Test the Connection: After entering the connection details, click on Connect. If configured correctly, Azure Data Studio should connect to your SQL Database through the private endpoint.

    Common Issues:

    • Firewall Rules: Make sure your Azure SQL Database firewall settings allow the private endpoint’s VNet.
    • Deny Public Network Access: If you have enabled the Deny Public Network Access (DPNA) feature, ensure that your connection attempts are coming from the correct VNet.
    • Check Connection State: Ensure that the connection state of the private endpoint is Approved.

    Hope this helps. Do let us know if you any further queries.

    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.

    0 comments No comments

Answer accepted by question author
  1. Marcin Policht 64,685 Reputation points MVP Volunteer Moderator
    2025-10-23T17:46:45.45+00:00

    Follow https://free.blessedness.top/en-us/answers/questions/1103959/how-to-connect-azure-sql-with-private-link-using-a


    If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.

    hth

    Marcin

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

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