Sunday, September 27, 2020

Error importing database: could not load package from dynamics 365 'D:\Exportedbacpac\swelltestupgradebackup.bacpac'. File contains corrupted data.

 I was getting the below error while trying to import database into DEV environment.


Error importing database: could not load package from dynamics 365 'D:\Exportedbacpac\swelltestupgradebackup.bacpac'. File contains corrupted data.


Solution:

-> Go to below link and download "Windows .NET Core" Zip file and extract it to C:\Temp.

https://docs.microsoft.com/en-us/sql/tools/sqlpackage-download?view=sql-server-ver15


From there, instead of using the Sqlpackage.exe under C:\Program Files (x86), please use the Sqlpackage.exe in C:\Temp\Sqlpackage-dotnetcore


Your import query will look like below

C:\Temp>SqlPackage.exe /a:import /sf:D:\Exportedbacpac\Testupgradebackup.bacpac /tsn:localhost /tdn:AxDB_fromProd1 /p:CommandTimeout=0

1 comment:

  1. Thanks for your needful blog post about dynamics 365 & I hope this will be the helpful topic for beginners. Well, I am also following some post like this and the persons who have more knowledge about this and its proper implementation. One of them AdyatanTech is very good platform as per my point of view. So I must say all to follow some popular posts with superb ideas to improve their business.

    ReplyDelete

What is the primary purpose of using a Solution in Microsoft Power Platform & ALM?

As organizations embrace low-code development with Microsoft Power Platform , it becomes essential to manage and govern apps, flows, and dat...