Just to memorize some steps to import a database from a bacpac file.
- Download and run the DacFramework.msi installer for Windows
- Put the backup.bacpac file close to the SQL database, say, in the root folder on disk G:
- Run the bat file.
@echo Importing a bacpac data to SQL database c: cd C:\Program Files\Microsoft SQL Server\160\DAC\bin SqlPackage.exe /a:import /sf:G:\backup.bacpac /tsn:localhost /tdn:AxDB_Restored /p:CommandTimeout=1200 /TargetTrustServerCertificate:True pause
Take note about the last option: without it importing fails with the following error.