Following reference might help out
ways-to-connect-to-sql
link sql server instance with public ip
Sorry if maybe this question is repetitive,
Into Azure web services I created a resourse group and into that were created:
- A SQL server instance with it's own database
- A public IP address already configured with its own DNS
I want to use the public IP address to connect to the SQL Server instance, how can it be possible? or which alternative will you suggest?
I don't want to use managed instances (because my budget)
2 answers
Sort by: Most helpful
-
Manu Philip 18,561 Reputation points MVP
2021-07-05T22:01:46.43+00:00 -
Alberto Morillo 33,956 Reputation points MVP
2021-07-05T22:12:12.903+00:00 On Azure SQL Database (PaaS) you cannot rely on the current IP address of your logical server. The IP address may change when Microsoft do an online migration of your logical server between clusters within a region, load balancing capacity across the clusters within the region. This move is a live operation and there is no loss of availability to your database during the operation. When the migration completes, existing connections to your logical server are terminated and upon reconnecting via fully qualified domain name your app will be directed to the new cluster. However, if your application caches or connects by IP address instead of FQDN then your connection attempts will fail. Use the FQDN name always (server1.database.windows.net, for example)
Choose the "Allow access to Azure services" option on the Azure SQL Database firewall, this will allow the app service to connect to the Azure SQL logical server.
You have other options available as explained here.