Hi @Shubham Sharma ,
Welcome to Microsoft Q&A platform and thanks for your query.
As per the official documentation, below is recommendation from product team for the error you received.
Error code: SqlFailedToConnect
Message: Cannot connect to SQL Database: '%server;', Database: '%database;', User: '%user;'. Check the linked service configuration is correct, and make sure the SQL Database firewall allows the integration runtime to access.
Recommendation: In SQL server firewall configuration, enable Allow Azure services and resources to access this server
option. Reference doc: https://learn.microsoft.com/azure/sql-database/sql-database-firewall-configure.
Additional information: Connections from inside Azure
To allow applications hosted inside Azure to connect to your SQL server, Azure connections must be enabled. When an application from Azure tries to connect to your server, the firewall verifies that Azure connections are allowed. This can be turned on directly from the Azure portal blade by setting Firewall rules, as well as switching the Allow Azure Services and resources to access this server
to ON
in the Firewalls and virtual networks settings
. If the connection isn't allowed, the request doesn't reach the server.
But as you mentioned that your server is enabled with ip restrictions, you can get the IP addresses listed for the Azure Integration runtime in the specific Azure region where your resources are located by getting IP range list of service tags from the service tags IP range download link. For example, if the Azure region is EastUS
, you can get an IP range list from DataFactory.EastUS
from the JSON file downloaded.
Here is the direct download link: https://www.microsoft.com/download/details.aspx?id=56519
I have attached the complete file below, and as requested in the query, below is IP range list for EASTUS & EASTUS2 regions.
[> {
"name": "DataFactory.EastUS",
"id": "DataFactory.EastUS",
"properties": {
"changeNumber": 2,
"region": "eastus",
"platform": "Azure",
"systemService": "DataFactory",
"addressPrefixes": [
"20.42.2.0/23",
"20.42.4.0/26",
"20.42.64.0/28",
"20.49.111.0/29",
"40.71.14.32/28",
"40.78.229.96/28"
]
}
},
{
"name": "DataFactory.EastUS2",
"id": "DataFactory.EastUS2",
"properties": {
"changeNumber": 2,
"region": "eastus2",
"platform": "Azure",
"systemService": "DataFactory",
"addressPrefixes": [
"20.41.2.0/23",
"20.41.4.0/26",
"20.44.17.80/28",
"20.49.102.16/29",
"40.70.148.160/28",
"52.167.107.224/28"
]
}
}]5
Helpful info: Discover service tags by using downloadable JSON files
Hope this info helps.
Thank you
----------
Please do consider to click on "Accept Answer" and "Upvote" on the post that helps you, as it can be beneficial to other community members.