2016-12-28 68 views
1
出口蔚藍分貝

其次出口SQL數據庫例如使用鏈接:得到錯誤,同時使用PowerShell

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

獲得以下錯誤:

新AzureRmSqlDatabaseExport:ResourceNotFound:資源「Microsoft.Sql /服務器/XXX.database.windows.net/databases/[DBNAME]'資源組'Default-SQL-SoutheastAsia'下找不到 。 在[文件路徑] \ sample.ps1:24字符:18 + $ exportRequest =新AzureRmSqlDatabaseExport -ResourceGroupName $ ResourceGroupN ... + ~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~ + CategoryInfo:CloseError:(:) [新-AzureRmSqlDatabaseExport],CloudException + FullyQualifiedErrorId:Microsoft.Azure.Commands.Sql.ImportExport.Cmdlet.NewAzureSqlDatabaseExport

GET-AzureRmSqlDatabaseImportExportStatus:無法綁定參數參數'OperationStatusLink',因爲它是空的。 在[文件路徑] \ sample.ps1:30字符:63 + GET-AzureRmSqlDatabaseImportExportStatus -OperationStatusLink $ exportRequest.Ope ... + CategoryInfo:InvalidData:(:) [獲取-AzureRmSqlDatabaseImportExportStatus],ParameterBindingValidationException + FullyQualifiedErrorId:ParameterArgumentValidationErrorNullNotAllowed, Microsoft.Azure.Commands.Sql.ImportExport.Cmdlet.GetAzureSqlDatabaseImportExportStatus

任何幫助嗎?

+0

錯誤是告訴你的是,databasee不存在,你有沒有證實它確實是從正在運行的會話訪問腳本從? –

+0

請包含您用於觸發導出的命令。請參閱[如何創建最小,完整和可驗證示例](http://stackoverflow.com/help/mcve) – TravisEz13

+0

感謝您的回覆。我嘗試導出的數據庫在「Default-SQL-SoutheastAsia」資源組下。我使用下面的命令: 新AzureRmSqlDatabaseExport -ServerName 「xxxxx.database.windows.net」 -AuthenticationType的Sql -AdministratorLogin 「XXX @ XXXXX」 -databasename 「XXXXX」 -StorageUri「https://開頭XXXXXXX。 blob.core.windows.net/xxxxx」 -StorageKey 「xxxxxxxxxxxxxxxxxxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ==」 -ResourceGroupName 「默認-SQL-SoutheastAsia」 -StorageKeytype 「StorageAccessKey」 – Krrish

回答

6

我今天有這個相同的問題,實際上。我想如果你改變你的服務器名稱來不使用完全限定的名字,那可能會這樣做。所以,只需使用「xxxxx」。

至少這就是我的工作。

+0

感謝這個答案。它也適用於我。 – Krrish

0

您需要驗證您的自動化帳戶是否具有導入的最新模塊並且是最新版本(AzureRM.Automation - AzureRM.Profile - AzureRM.Sql),版本爲2.5.0。如果模塊顯示出不同的版本,即1.0.3則: 導航到自動化賬戶資產中,選擇模塊,然後單擊 更新Azure的模塊

Update the Azure PS modules

等待模塊得到更新通常需要幾分鐘

相關問題