使用PowerShell导出azure db时出错

Krr*_*ish 1 powershell cmdlets export azure

使用链接跟随导出SQL数据库示例:

https://docs.microsoft.com/en-us/azure/sql-database/sql-database-export-powershell#export-sql-database-example

得到以下错误:

New-AzureRmSqlDatabaseExport:ResourceNotFound:找不到资源组"Default-SQL-SoutheastAsia"下的资源"Microsoft.Sql/servers/XXX.database.windows.net/databases/[DBNAME]".在[FilePath]\sample.ps1:24 char:18 + $ exportRequest = New-AzureRmSqlDatabaseExport -ResourceGroupName $ ResourceGroupN ... + ~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 〜+ CategoryInfo:CloseError:(:) [New-AzureRmSqlDatabaseExport],CloudException + FullyQualifiedErrorId:Microsoft.Azure.Commands.Sql.ImportExport.Cmdlet.NewAzureSqlDatabaseExport

Get-AzureRmSqlDatabaseImportExportStatus:无法将参数绑定到参数'OperationStatusLink',因为它为null.在[FilePath]\sample.ps1:30 char:63 + Get-AzureRmSqlDatabaseImportExportStatus -OperationStatusLink $ exportRequest.Ope ... + CategoryInfo:InvalidData :( :) [Get-AzureRmSqlDatabaseImportExportStatus],ParameterBindingValidationException + FullyQualifiedErrorId:ParameterArgumentValidationErrorNullNotAllowed,Microsoft.Azure. Commands.Sql.ImportExport.Cmdlet.GetAzureSqlDatabaseImportExportStatus

有帮助吗?

小智 13

实际上,今天我遇到了同样的问题.我认为如果您将服务器名称更改为不使用完全限定名称,则可能会执行此操作.所以,只需使用"xxxxx".

至少这对我有用.