Failure When Trying To Connect ADF Linked Service to SQL Server

We have an ADF subscription that we are trying to create a linked service to an azure cloud based SQL Server on. We have an existing subscription that already has this linked service created and need it in another one.

When testing the connection for the SQL
Server, we get the following error message:

Cannot connect to SQL Database. Please contact SQL server team for further support. Server: ‘servername’, Database: ‘dbname’, User: ‘username’. Check the linked service configuration is correct, and make sure the SQL Database firewall allows the integration runtime to access.
A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: TCP Provider, error: 0 – An existing connection was forcibly closed by the remote host.), SqlErrorNumber=10054,Class=20,State=0,
An existing connection was forcibly closed by the remote host

The username, password, servername, db name are all correct (as they work in another subscription, have just removed them here) We are using a Self Hosted Integrated Runtime to make the connection between the two, which has had its firewall opened to allow a connection.

We are not seeing any denials on the firewall rules when attempting to connect, and no failed log in attempts or error logs on the SQL Server itself to say that the log in has been denied.

Can anyone recommend a way to fix it please?

2

I have seen that error when there are temporary issues with the Azure service for a region or for a small set of customers. On those cases Azure Status site does not report the issues with the services, and it may take up to 8 hours for the services to go back to normal. You can see the temporary issues affecting your database on the Resource Health option of your database left vertical panel on the Azure Portal.

Some customers have reported (here) starting to see error 10054 after Azure platform changes Azure SQL Database firewall without any notice. Can you verify the Azure SQL firewall for the database involved with these error 10054 is configured as the other databases that work as expected.

And some other customers also have reported that after scaling up the service tier of the database and then scale it down to where it was the error disappears.

Recognized by Microsoft Azure Collective

The connection cannot be established even when using the correct server name, username and password, from one of the comments, the resource is an Azure SQL resource, probably the server is protected or missing a firewall rule that the pre-login recognizes but does not authorize to connect, you can use the Azure Portal, CLI or PowerShell, create the Azure SQL resource from scratch or just modify (add) a firewall rule to the existing one (look at the ADF properties to find the IP Address range), Azure Data Factory IP range is shared across Fabric Data Factory, IP addresses that Azure Integration Runtime uses depends on the region where your Azure integration runtime is located. All Azure integration runtimes that are in the same region use the same IP address ranges:

If we know the IP range we can use in PowerShell:

$serverFirewallRule = New-AzSqlServerFirewallRule -ResourceGroupName $resourceGroupName -ServerName $serverName -FirewallRuleName "AllowedIPs" -StartIpAddress $startIp -EndIpAddress $endIp

If we start from zero:

# Connect-AzAccount

$SubscriptionId = 'c93e...'
$resourceGroupName = "add resource group name"
$location = "view in Azure portal where your location is CentralUS, eastus,..."

#add your secret access
$adminSqlLogin = "add the user you added when deploying the server in Azure"
$password = "the password"
$serverName = "add the server name or unique url/ip to the server or endpoint"

#your script looks for the Deleted item or table
$databaseName = "thecompletedatabase"
# The ip address range that you want to allow to access your server
$startIp = "0.0.0.0"
$endIp = "0.0.0.0"

Set-AzContext -SubscriptionId $subscriptionId

#create all
$resourceGroup = New-AzResourceGroup -Name $resourceGroupName -Location $location

#create the server in azure
$server = New-AzSqlServer -ResourceGroupName $resourceGroupName -ServerName $serverName -Location $location -SqlAdministratorCredentials $(New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $adminSqlLogin, $(ConvertTo-SecureString -String $password -AsPlainText -Force))

#allow the firewall rule from the ranges
$serverFirewallRule = New-AzSqlServerFirewallRule -ResourceGroupName $resourceGroupName -ServerName $serverName -FirewallRuleName "AllowedIPs" -StartIpAddress $startIp -EndIpAddress $endIp

#create a new database S0 tier
$database = New-AzSqlDatabase  -ResourceGroupName $resourceGroupName -ServerName $serverName -DatabaseName $databaseName -RequestedServiceObjectiveName "S0" -SampleName "dbo2024"

# Clean up deployment 
# Remove-AzResourceGroup -ResourceGroupName $resourceGroupName

Then retry to add the connector in ADF once the firewall rule exists in the Azure SQL data source

New contributor

jbsidis is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật