简体   繁体   中英

Connect to Azure SQL in another subscription

I have an application running in Azure Batch which tries to connect to our customer's SQL Server also running in Azure. The connection fails, because the customer has default firewall on the SQL Server and the IP address of the Azure Batch node is not allowed in the firewall rules.

When I try to connect from the Azure Batch application to out SQL Server running in another subscription, the connection is successful.

  1. Why in the first case the connection does not work and in the second case it works?

  2. Is it possible to connect to the customer's SQL Server? I cannot give them an IP address to allow in the firewall, because the IP address of the Azure Batch is dynamic.

The solution is to set this switch to Yes in SQL ServerSecurityFirewalls and virtual.networks . With this setting, it is possible to connect from Azure Batch application to SQL in another subscription.

在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM