Atlantic Oak

System.OutOfMemoryException in SSMS when importing a bacpac to a D365 development environment

A while back it used to be possible to import a bacpac into a Dynamics 365 for Finance and Operations development environment by using the Sql Server Management Studio (SSMS). All you had to do was to modify this registry setting on the development VM:

    HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0\SQLDB\Database\QueryTimeoutSeconds

And change it from 60 (the default setting) to 900. You would then run the "Import Data-tier Application" from SSMS, and all would run smoothly, and the Dynamics 365 AxDB database would be restored to the development environment.

It no longer seems to be the case. If you perform the import from within SSMS you will get this error:

Import Data-tier Application Results Operation Failed

Microsoft SQL Server Management Studio Exception of type System.OutOfMemory was thrown mscorlib


You need to download and install the latest Data Tier Application framework (18.2) to the Dynamics 365 development environment and run the SQLPACKAGE.exe executable located in C:\Program Files\Microsoft SQL Server\150\DAC\bin in an elevated command prompt:

cd "C:\Program Files\Microsoft SQL Server\150\DAC\bin"
SqlPackage.exe /a:Import /sf:C:\bacpac\axDB.bacpac /tsn:localhost /tdn:AxDB1 /p:storage=file /p:CommandTimeout=1200

In the above script yo need to replace this:

C:\bacpac\axDB.bacpac -> with the location of the bacpac file you want to import.

AxDB1 -> the name of the restored database

Dynamics 365 F&O Development Services

Does your dev team have too much on their plate? We can help by handling big or small Dynamics 365 customization projects at a competitive rate. Click here.

File based integration system for Dynamics 365 Finance and Operations

The Atlantic Oak Document Exchange System allows your Dynamics 365 for Finance and Supply Chain Management system to directly pull or push XML or flat files to and from external systems via SFTP, FTP, FTPS, Azure Storage, Azure Files and other file servers. Click here.

×