Azure SQL server VM的重新部署抱怨排序规则



我在使用SQL server标准版重新部署Azure SQL虚拟机时遇到了一个奇怪的问题。我使用Bicep进行部署。

第一次部署甚至几次连续部署都很好,没有任何错误,一切正常(所有资源的"供应状态成功"(。

然后,突然间,我在重新部署时遇到了这个错误(没有更改模板!(:

{
"status": "Failed",
"error": {
"code": "SqlServerSettingCollationNotAllowedToUpdate",
"message": "SQL Server collation is not allowed to be updated in manageability."
}
}

但我并没有改变排序规则。相关的资源定义仍然是这样的:

sqlInstanceSettings: {
maxDop: 0
isOptimizeForAdHocWorkloadsEnabled: false
collation: 'Latin1_General_CI_AS'
minServerMemoryMB: 0
maxServerMemoryMB: 2147483647
isLpimEnabled: false
isIfiEnabled: false
}

部署的虚拟机可以工作,并且服务器具有正确的排序规则。当我在Bicep中注释掉排序规则时,部署成功了。

我负担不起对排序规则的注释,因为当创建一个新环境时,它会创建一个错误的VM。

有什么想法可能导致这种情况,或者如何消除错误吗?

•您遇到此错误是因为Azure SQL VM提供程序在通过重新运行同一部署创建资源时不提供指定SQL Server排序规则的功能。因此,当you are rerunning the Azure SQL VM deployment through the specified bicep template, the necessary SQL instance specific login IDs are removed after rerunning the SQL Server installation, thus effectively moving the SQL VM in an unmanaged state时。

此外,解决此问题所需的两个特定于SQL实例的登录ID"NT Service\SQLTelemetry">"NTService\SqlIaaSExtensionQuery">,它们是needed to be created through Windows login in the SQL Server by restarting the SQL Server in single user mode。创建后,需要为这两个ID分配"sysadmin"服务器角色,并将其添加到"Security-Login"组中。

请参阅下面的technet文档链接以获取有关此方面的详细信息,并参阅下面由Tao Yang提供的描述该场景的链接:-

https://social.technet.microsoft.com/wiki/contents/articles/52483.sql-server-on-azure-vm-troubleshooting-can-t-access-the-sql-server-configuration-page-from-the-portal.aspx

https://blog.tyang.org/2022/01/13/azure-sql-vm

最新更新