azure - How to reset sql admin password on Azure SQL Managed Instance?
问题描述
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
推荐阅读
- java - Spring MVC 数据到 HTML5
- nlp - 使用谷歌翻译访问词级预测
- node.js - 在 ExpressJS 中处理可选参数的最佳实践
- vue.js - 简单的 Vue 应用程序只显示空白页面 (webpack-dev-server)
- excel - 使用 VBA 在 Excel 中更新 PowerPivot
- data-binding - 使用 i18n 文件在设计时动态更改 SAPUI5 列表项绑定
- java - 如何对包含 vertx().eventBus().send() 的方法进行单元测试?
- r - 动态求和多列
- git - Integrate Git Support Branch to master
- linux - bitbucket 中的管道因作曲家错误而失败