Open KalyanChanumolu-MSFT opened 3 years ago
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @Wmengmsft, @MehaKaushik, @shurd, @anfeldma-ms
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @azureSQLGitHub.
Author: | KalyanChanumolu-MSFT |
---|---|
Assignees: | - |
Labels: | `SQL`, `Service Attention`, `needs-triage` |
Milestone: | - |
Could sql team take a look and return meaningful error message?
Same here, I was getting the same error: New-AzSqlDatabaseImport : An unexpected error occured while processing the request. Tracking ID: '7fae33df-dec7-4c74-8eb3-0838db508225'
Read this elsewhere and that fixed my issue, needed to adjust the max bytes to match the Standard Edition max of 250GB. Tried lower sizes and that didnt work. So, this definitely seems to be a bug.
-DatabaseMaxSizeBytes "268435456000"
Same here, I was getting the same error: New-AzSqlDatabaseImport : An unexpected error occured while processing the request. Tracking ID: '7fae33df-dec7-4c74-8eb3-0838db508225'
Read this elsewhere and that fixed my issue, needed to adjust the max bytes to match the Standard Edition max of 250GB. Tried lower sizes and that didnt work. So, this definitely seems to be a bug.
-DatabaseMaxSizeBytes "268435456000"
Tried this same possible solution you offered but doesn't solve the problem in my case. Maybe I am doing something wrong? My database is of type S1, 20 DTUs .
New-AzSqlDatabaseImport
-ResourceGroupName "****"
-ServerName "****"
-DatabaseName "****"
-StorageKeyType "****"
-StorageKey "****"
-StorageUri "****/****.bacpac"
-AdministratorLogin "****"
-AdministratorLoginPassword $(ConvertTo-SecureString -String "****" -AsPlainText -Force)
-Edition Standard
-ServiceObjectiveName S1
-DatabaseMaxSizeBytes "268435456000"
This bug (and the workaround posted by @reji123) appear to still be the case today with Az.Sql v2.17.1.
Any values for the -Edition and -DatabaseMaxSizeBytes parameters other than "Standard" and "268435456000" results in the same error, as below.
RequestId : 23e20b6f-d05f-4b5e-830c-274b568c7e68
Message : An unexpected error occured while processing the request. Tracking ID: '23e20b6f-d05f-4b5e-830c-274b568c7e68'
ServerMessage : InternalServerError: An unexpected error occured while processing the request. Tracking ID: '23e20b6f-d05f-4b5e-830c-274b568c7e68' (System.Collections.Generic.List`1[Microsoft.Rest.Azure.CloudError])
ServerResponse : {InternalServerError}
RequestMessage : {POST
https://management.azure.com/subscriptions/*******/resourceGroups/*******/providers/Microsoft.Sql/servers/*******/import?api-version=2020-02-02-preview}
InvocationInfo : {New-AzSqlDatabaseImport}
Line : $importRequest = New-AzSqlDatabaseImport -Edition Basic -ResourceGroupName $resourceGroup -ServerName $dbServer -DatabaseName $dbName -StorageKeyType SharedAccessKey -StorageKey $storageKey -StorageUri $storageUri
-AdministratorLogin $adminUser -AdministratorLoginPassword $adminPwd -ServiceObjectiveName S0 -DatabaseMaxSizeBytes 5000000
Position : At line:8 char:18
+ … rtRequest = New-AzSqlDatabaseImport -Edition Basic -ResourceGroupName …
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
StackTrace : at Microsoft.Azure.Management.Sql.ServersOperations.BeginImportDatabaseWithHttpMessagesAsync(String resourceGroupName, String serverName, ImportNewDatabaseDefinition parameters, Dictionary`2 customHeaders,
CancellationToken cancellationToken)
at Microsoft.Azure.Management.Sql.ServersOperationsExtensions.BeginImportDatabaseAsync(IServersOperations operations, String resourceGroupName, String serverName, ImportNewDatabaseDefinition parameters,
CancellationToken cancellationToken)
at Microsoft.Azure.Management.Sql.ServersOperationsExtensions.BeginImportDatabase(IServersOperations operations, String resourceGroupName, String serverName, ImportNewDatabaseDefinition parameters)
at Microsoft.Azure.Commands.Sql.Database.Services.ImportExportDatabaseCommunicator.BeginImportNewDatabase(String resourceGroupName, String serverName, ImportNewDatabaseDefinition parameters, Uri& operationStatusLink)
at Microsoft.Azure.Commands.Sql.ImportExport.Service.ImportExportDatabaseAdapter.ImportNewDatabase(AzureSqlDatabaseImportModel importRequest)
at Microsoft.Azure.Commands.Sql.ImportExport.Cmdlet.NewAzureSqlDatabaseImport.PersistChanges(AzureSqlDatabaseImportExportBaseModel entity)
at Microsoft.Azure.Commands.Sql.Common.AzureSqlCmdletBase`2.<>c__DisplayClass16_0.<ExecuteCmdlet>b__0()
at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ConfirmAction(String processMessage, String target, Action action)
at Microsoft.Azure.Commands.Sql.Common.AzureSqlCmdletBase`2.ExecuteCmdlet()
at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord()
Attempting to use those arguments above get me a little further, the function returns a value, but the operation sits in 'InProgress' status with 1% complete for 40 minutes, after which any further calls to Get-AzSqlDatabaseImportExportStatus
result in the error:
Response status code does not indicate success: 400 (Bad Request).
To be honest we would quite happily "Reach out Azure Support" on this one, as @KalyanChanumolu-MSFT suggests, but I'm genuinely lost as to how to do so, other than posting github issues.
Thanks @reji123. Your fix worked for me. The import took just under 15 minutes. I stuck with the recommended S3 tier as per the Microsoft tutorial. They get you to downgrade it to S0 right after the import anyhow, so the cost difference will be negligible. I was able to see data being ingested into the target database via SSMS by installing the sp_whoisactive stored procedure and I could also see the database was growing. This gave me confidence something was happening. The final total size of the database was 2184MB. I suspect if someone tries with a lower tier such as S0 it will take much longer.
Here is a link to the sp_whoisactive stored procedure, super handy: http://whoisactive.com/downloads/
Here is the segment of PowerShell code that worked for me and it completed in just under 15 minutes:
# Import bacpac to database with an S3 performance level $importRequest = New-AzSqlDatabaseImport -ResourceGroupName $resourceGroupName
-ServerName $serverName -DatabaseName $databaseName
-DatabaseMaxSizeBytes "268435456000" `
-StorageKeyType "StorageAccessKey" `
-StorageKey $(Get-AzStorageAccountKey -ResourceGroupName $resourceGroupName -StorageAccountName $storageAccountName).Value[0] `
-StorageUri "https://$storageaccountname.blob.core.windows.net/$storageContainerName/$bacpacFilename" `
-Edition "Standard" `
-ServiceObjectiveName "S3" `
-AdministratorLogin "$adminSqlLogin" `
-AdministratorLoginPassword $(ConvertTo-SecureString -String $password -AsPlainText -Force)`
I hope this helps. @KalyanChanumolu-MSFT can Microsoft please update the tutorial so others don't suffer with this issue.
Description
Following the tutorial here results in "An unexpected error occured while processing the request. Tracking ID: '7c6660f2-76d4-4cf8-8893-8101f92783ef'" message
We should make this more meaningful. There is no way for the end customer to get more details of exception without reaching out to Azure Support Import works perfectly from Azure Portal.
Steps to reproduce
Follow the steps here
Environment data
Module versions
Error output