【问题标题】:Azure Powershell Error - The Resource Group Was Not FoundAzure Powershell 错误 - 未找到资源组
【发布时间】:2020-03-18 15:09:46
【问题描述】:

尝试运行 powershell 来更改 Azure 弹性池的 DTU。问题是它找不到资源组。任何想法出了什么问题。我的步骤是:

  1. 登录并运行 Azure Cloud shell
  2. 在下面粘贴代码:
Set-AzureRmSqlElasticPool –ResourceGroupName "MyResourceGroup"–ServerName "MyServer.database.windows.net" –ElasticPoolName "My_ElasticPool" –Dtu 200 –DatabaseDtuMax 100 –DatabaseDtuMin 50

完整的错误是:

Set-AzureRmSqlElasticPool:资源 'Microsoft.Sql/servers/MyServer.database.windows.net/elasticpools/My_ElasticPool' 未找到资源不足组“MyResourceGroup”。在行:1 字符:1 + Set-AzureRmSqlElasticPool –ResourceGroupName "FluResourceGroup"–Serve ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : CloseError: (:) [Set-AzSqlElasticPool], CloudException + FullyQualifiedErrorId : Microsoft.Azure.Commands.Sql.ElasticPool.Cmdlet.SetAzureSqlElasticPool

对 powershell 完全陌生,如果这是一个甜甜圈问题,请道歉?

【问题讨论】:

标签: azure powershell


【解决方案1】:

错误清楚地表明:该资源不存在于该资源组下。我会假设资源组存在。这意味着资源名称中存在拼写错误和\或资源已移动等。

另一种选择是资源组根本不存在并且错误具有误导性。我会说在这种情况下,您需要使用Select-AzSubscription %subscription_name% 选择正确的订阅。因为 Azure PowerShell 在特定订阅上下文下运行。它不会搜索所有订阅。

【讨论】:

  • 谢谢我找到了。基本错误。我引用的是 SQL Server 连接,而不仅仅是服务器。
【解决方案2】:

基本错误。未正确引用 Azure 服务器。它应该是:

Set-AzureRmSqlElasticPool –ResourceGroupName "MyResourceGroup"–ServerName "MyServer" –ElasticPoolName "My_ElasticPool" –Dtu 200 –DatabaseDtuMax 100 –DatabaseDtuMin 50

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2016-12-02
    • 1970-01-01
    • 2016-03-31
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-09-11
    相关资源
    最近更新 更多