question

MichaelYoung-0270 avatar image
0 Votes"
MichaelYoung-0270 asked AlbertoMorillo commented

Error when trying to upload a bacpac file from a container

I recieve this error and was told in a microsoft support chat to post the question on here:

Import operation for PoC_backup_2021_09_07_230001_9912085 failed.
ErrorCode: BadRequest
ErrorMessage: The ImportExport operation with Request Id 'cef8c17a-4c3d-4a32-afdf-aaf4d1018f67' failed due to 'The package file provided was not able to be opened. Please run SqlPackage locally to ensure that the file is not corrupt and please ensure that it uploaded to Azure Storage completely.'.

Thanks

azure-sql-database
· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @MichaelYoung-0270, welcome to Microsoft Q&A forum.

From the error message it looks like the file is corrupted, you can try to restore it on on-premise SQL Server if thats possible to check if the file is intact.

Also we will need some more information to understand the exact nature of issue:

  1. Which process are you using to upload the bacpac?

  2. Are you trying to import the bacpac file to Azure SQL Database?



0 Votes 0 ·
  1. I'm using the portal azure database import by going to the database server in azure and clicking import and selecting the file from the container.

  2. Yes, I uploaded the file to a container, but receive the error when trying to import the bacpac file to Azure SQL Database.





0 Votes 0 ·

Hi @MichaelYoung-0270, thanks for replying back. As I mentioned in above comment and also pointed by @AlbertoMorillo this could be corrupt bacpac file. Would it be possible for you to import it into on-premise SQL Server? Also you can create a sample one table database and generate a bacpac and then load it to azure SQL Database from the container. This would make us sure if there is some issue with the bacpac.

0 Votes 0 ·
AlbertoMorillo avatar image
0 Votes"
AlbertoMorillo answered

Michael,

On this article, try the "Import Data-tier Application" option. The article will guide you.

Hope this helps.



5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

AlbertoMorillo avatar image
0 Votes"
AlbertoMorillo answered AlbertoMorillo commented

Are you able to download that bacpac to a local PC and import it to a local SQL Server instance in that computer? Maybe the bacpac has a bad structured or did not uploaded completely into the container.

· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi thank you for responding, yes I'm able to restore it locally. I tried another workaround today of trying to connect with ssms to Azure Sql server but found out that restoring is not an option there.

0 Votes 0 ·

Thanks, I'm just encountering some other issues with creating a bacpac file and not a bak file. I'll ask again if it doesn't work but this looks like it would help.

0 Votes 0 ·

I know you may find some obstacles along the way creating bacpac. Any help needed just let me know.

0 Votes 0 ·