web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :

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

Rahul Kiran Profile Picture Rahul Kiran 481

 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


This was originally posted here.

Comments

*This post is locked for comments