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

Herald Sison 0 Reputation points
2023-02-28T13:01:26.43+00:00

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:

"username"@"dbname".privatelink.database.windows.net

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,312 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.
13,364 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Erin Stellato 631 Reputation points Microsoft Employee
    2023-03-01T02:06:17.3033333+00:00

    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?

    Thanks,

    Erin


  2. Seeya Xi-MSFT 16,461 Reputation points
    2023-03-01T02:56:25.5166667+00:00

    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,

    Seeya


    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