gpt4 book ai didi

azure - 长时间运行的操作失败,状态为 'Failed' 。其他信息 :'The sku ' ElasticPool“指定无效。”

转载 作者:行者123 更新时间:2023-12-03 21:00:26 25 4
gpt4 key购买 nike

我正在尝试使用 PSCmdlet New-AzSqlDatabaseCopy 克隆 Azure SQL 数据库(在被告知 Restore-AzSqlDatabase 不允许我进行跨服务器复制之后)。我的命令如下:

New-AzSqlDatabaseCopy   -ServerName $SourceDatabase.ServerName `
-ResourceGroupName $SourceDatabase.ResourceGroupName `
-DatabaseName $SourceDatabase.DatabaseName `
-ServiceObjectiveName $SourceDatabase.CurrentServiceObjectiveName `
-CopyServerName $TargetServerName `
-CopyResourceGroupName $TargetResourceGroupName `
-CopyDatabaseName $TargetDBName `
-ElasticPoolName $ElasticPoolName`
-ErrorAction stop

源数据库与目标位于不同的服务器和资源组中,并且位于与目标不同的弹性池中。

我已经检查并仔细检查了所有参数以确保它们正确,并且我使用 -whatif 运行它,一切看起来都很好(除了创建日期是 1/1/0001,但我不是 super 还担心这个)

但是,当我运行该命令时,我得到 New-AzSqlDatabaseCopy : Long running operation failed with status 'Failed'. Additional Info:'The sku 'ElasticPool' specified is invalid.'任何意见将不胜感激

最佳答案

确保新的弹性池与旧的弹性池具有相同的名称。另请确保两个弹性池的 sku 相同。如果资源组位于不同区域,弹性池的 sku 可能会不同,从而导致复制数据库时出现问题。

SQL 服务器 - sql_server_A--- 弹性池 - elastic_pool_1----- 数据库-template_db

SQL 服务器 - sql_server_B--- 弹性池 - elastic_pool_1(名称等于 sql_server_A 中的弹性池)

引用文献:

https://github.com/Azure/azure-libraries-for-net/issues/41

https://learn.microsoft.com/en-us/azure/sql-database/scripts/sql-database-move-database-between-pools-powershell

https://learn.microsoft.com/en-us/rest/api/sql/databases/createorupdate

https://learn.microsoft.com/en-us/rest/api/sql/elasticpools/createorupdate

关于azure - 长时间运行的操作失败,状态为 'Failed' 。其他信息 :'The sku ' ElasticPool“指定无效。”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58341902/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com