How to reset the sql admin password on Azure SQL Managed Instance if there is only one user/admin and the admin password is lost/forgotten?
Could it be done via portal or using some script?
How to reset the sql admin password on Azure SQL Managed Instance if there is only one user/admin and the admin password is lost/forgotten?
Could it be done via portal or using some script?
重置密码的最简单方法是转到 Azure 门户,打开实例详细信息刀片并按重置密码按钮:
作为替代方案,您可以使用 AzureRm.Sql PowerShell 库和Set-AzureRmSqlManagedInstance命令:
$InstancePassword = "Newpassword1234"
$SecureString = ConvertTo-SecureString $InstancePassword -AsPlainText -Force
Set-AzureRmSqlInstance -Name "managedinstance1" -ResourceGroupName "ResourceGroup01" -AdministratorPassword $SecureString
还可以将 Azure CLI 与az sql mi update命令一起使用:
az sql mi update -g mygroup -n myinstance -i -p mypassword