如何将使用自定义端口的 dockerized SQL 服务器数据库迁移到 Azure SQL

How to migrate a dockerized SQL Server database that uses a custom port to Azure SQL

我正在使用 Docker 和 Azure 虚拟机托管一堆微服务和机器人应用程序。堆栈中还有一个 dockerized SQL Server 2017 实例,我想将其迁移到 Azure SQL。尝试在 Azure 数据库迁移项目中配置源数据库时我很不走运...

我试图指定包括公开端口在内的服务端点(因为 dockerized SQL 服务器容器的 public 端口不是 1433)。我可以从我的工作站使用 SSMS 连接到 SQL 服务器实例,没有错误,所以连接根本不是问题; Azure 数据库迁移是否需要端口 1433,如果不需要,我如何才能正确指定不同的端口?

这些是我从 Azure 门户中的源详细信息配置中获得的错误详细信息:

Error Type Failed to connect, please check error details

Error Detail Collector 'Microsoft.SqlServer.Advisor.SqlQueries.Contracts.Models.IQueryServerProperties' failed to collect data. A network-related or instance-specific error occurred while establishing a connection to SQL Server. 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. (provider: SQL Network Interfaces, error: 25 - Connection string is not valid) The parameter is incorrect

源数据库配置向导对远程服务器的 DNS 名称的格式不是很清楚。仅指定完全限定的 DNS 名称和端口是不够的;它还必须包含服务器的实例名称。

错误:

<DNS-name>,<port>

正确:

<DNS-name>\<INSTANCENAME>,<port>