[英]Why can't my Azure app service backup connect to my Azure SQL database?
I am experiencing a problem configuring the backup of an SQL database using Azure.我在使用 Azure 配置 SQL 数据库的备份时遇到问题。
I have web application and an associated Azure SQL database.我有 web 应用程序和关联的 Azure SQL 数据库。 The app connects to the DB no problem.
该应用程序连接到数据库没有问题。 I have pasted the connection string provided to me by the Azure UI (Home -> SQL Databases -> My SQL Database) into the connection strings section of the configuration for the App Service (Home -> App Services -> My App Service -> Configuration).
我已将 Azure UI 提供给我的连接字符串(主页 -> SQL 数据库 -> 我的 SQL 数据库的连接字符串 -> 应用程序服务配置部分的应用程序服务 -> 应用程序服务部分)粘贴到连接字符串中配置)。 I created a backup of the App Service (Home -> App Services -> My App Service -> Backups -> Configuration) and ticked my connection string to be back up my database.
我创建了应用服务的备份(主页 -> 应用服务 -> 我的应用服务 -> 备份 -> 配置)并勾选了我的连接字符串以备份我的数据库。
After about 20 minutes, the backup fails with the error:大约 20 分钟后,备份失败并出现以下错误:
A network-related or instance-specific error occurred while establishing a connection to SQL Server.
与 SQL 服务器建立连接时发生与网络相关或特定于实例的错误。 The server was not found or was not accessible.
服务器未找到或无法访问。 Verify that the instance name is correct and that SQL Server is configured to allow remote connections.
验证实例名称是否正确,并且 SQL 服务器配置为允许远程连接。 (provider: TCP Provider, error: 0 - No such host is known.)
(提供者:TCP 提供者,错误:0 - 不知道这样的主机。)
I can connect to the database from the SQL Server Management Studio running on my laptop, and from code running on my laptop, using the server, username and password from the connection string, why can the backup not connect to the database?我可以从笔记本电脑上运行的 SQL Server Management Studio 和笔记本电脑上运行的代码连接到数据库,使用连接字符串中的服务器、用户名和密码,为什么备份无法连接到数据库?
Many thanks for any advice.非常感谢您的任何建议。
Linking the same question asked on MSDN: Azure SQL Database Backup Fails, cannot connect to the database .链接在 MSDN 上提出的相同问题: Azure SQL Database Backup Fails, cannot connect to the database 。
Please see the Requirements and Restrictions details where this functionality is not supported, which I have listed below the applicable items that apply to your scenario:请参阅不支持此功能的要求和限制详细信息,我在下面列出了适用于您的方案的适用项目:
If none of the above apply to you, then the issue is an IP Address issue in that you need to enable "Allow access to Azure services" in the firewall for your Azure SQL (logical) Server. If none of the above apply to you, then the issue is an IP Address issue in that you need to enable "Allow access to Azure services" in the firewall for your Azure SQL (logical) Server. Additional troubleshooting can be performed by leveraging Application Insights to capture the backup failure event and then drill into the collected log detail to see what the specific error is.
通过利用Application Insights捕获备份失败事件,然后深入收集的日志详细信息以查看具体错误是什么,可以执行其他故障排除。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.