azureazure-sql-databaseazure-dns

Access Azure SQL Database directly via IP address


I want to use a azure SQL Database and want connect to it via ip-adress.

My current setup:

  1. Azure Database e.g. "example.database.windows.net"
  2. Private Link in Azure Subnet connected with the database (10.231.1.5)
  3. Azure Win VM (10.231.1.4)

When I open SSMS on my Windows VM, I can't connect to the private link database via IP-Address. It only works with the FQDN. The error message is "Cannot open Server "10.231.1.5" requested by login" Does somebody knows why?

In the future I want to use a P2S VPN to my local Subnet, there I dont have these Azure DNS entries. Is it possible to make a Azure Database work only with the private IP-Address? Otherwise I have to tell the IT-Support that they have to configure internal DNS to use a Azure DNS for Zone *.windows.net. Is there a best practice how DNS Zones can be linked to local?

I don't want the database to be reached via public IP, so all connections must use the private link.


Solution

  • I found the solution in this article: https://ourcloudnetwork.com/sqlerrornumber40532-unable-to-login-to-azure-sql-db/

    It's mandatory to specify the Server Name. So if i want to use only IP Address I have to specify ServerName in user field e.g.

    Server: 10.231.1.5 user: myDbUser@my-example-sql-db

    when i specify the name in the user field with an @ then it works like expected