Access to SQL Server error in Azure via point to site vpn

Herald Sison 0 Reputation points

Hi, The office is putting up a database server (headless, not VM) and i have setup a point to site VPN so that remote developers can access the resource via VPN and not via public IP address. so everything is working expect for the Visual Studio/Azure Data Studio connection string does not work and got error while connecting to the DB while VPN is active. However, when i use SSMS everything went well and can access all tables and resources in the DB server without any errors.

has anyone experienced this kind of problem?

in access the SSMS the credentials needs to be set like this:


User's image

So what would be the proper connection string for this?

Thank you

Azure Virtual Network
Azure Virtual Network
An Azure networking service that is used to provision private networks and optionally to connect to on-premises datacenters.
2,137 questions
SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
12,676 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Erin Stellato 476 Reputation points Microsoft Employee

    Hi @Herald Sison - can you provide some additional information please?

    • What version of Azure Data Studio are you using?
    • To what version of SQL are you connecting?
    • Can you please share the error message you receive in Azure Data Studio and the stacktrace?
    • If you are running ADS 1.41 or higher, if you enable 'TrustServerCertificate', does that address the issue?



  2. Seeya Xi-MSFT 16,436 Reputation points

    Hi @Herald Sison ,

    One possible explanation for why you are able to connect to the database server using SSMS but not Visual Studio/Azure Data Studio is that Visual Studio/Azure Data Studio might not be using the correct connection string or might not be configured to use the same authentication mechanism as SSMS.

    In addition, you can check the firewall rules and network policies on both the database server and the client machine to ensure that they are allowing traffic on the correct ports and protocols.

    Best regards,


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    0 comments No comments