Hi @Jignesh Vyas ,
Welcome to Microsoft Q&A forum and thanks for using Azure services.
As I understand from the question, want to connect to Azure SQL Server from the local machine using azure vpn client.
I suppose you have followed the documentation: Configure the Azure VPN Client - Azure AD authentication - Windows
For Azure SQL Server to be accessed from Azure P2S, could you please try below mentioned steps and let us know your results:
- Navigate to "Firewalls and virtual networks" of you SQL server and make sure to set "Deny public network access" to yes.
- Create an Azure private endpoint. It will create endpoint for SQL server within your virtual network and it'll be assigned a private IP from within subnet's IP range. You will use this private IP to connect to SQL server.
- On your local machine, make sure you're connected to VPN and open SQL Server Management Studio:
- Under "Server name" enter private IP address of Azure private endpoint created in step 2.
- Under "Login" field, enter username in format "username@public_sql_server_name" (e.g. ******@my-sql-server.database.windows.net). For password, just enter your password.
- Last thing to do is to click on "Options" and navigate to "Connection properties". Make sure to check "Encrypt connection" and "Trust server certificate". This is required as server's certificate is issued to "my-sql-server.database.windows.net" and you're accessing it via private IP. If this wasn't checked, management studio wouldn't trust server's certificate and would refuse connection.
Please try and let us know so that we can further check on this. Thanks.