HOW TO IMPORT A DATABASE (bacpac format) INTO YOUR CLOUD HOSTED ENVIRONMENT. (D365FO)
HOW TO IMPORT A DATABASE (bacpac format) INTO YOUR TIER 1 CLOUD HOSTED ENVIRONMENT. (D365FO)
BEFORE YOU IMPORT, MAKE SURE:
1. Move the new database (bacpac) into the system environment (local computer) from which you are importing.
2. Download the zip file of SQLPackage. NET Core for Windows from Download and install SQL Server | Microsoft Docs
Link: https://learn.microsoft.com/en-us/sql/tools/sqlpackage/sqlpackage-download?view=sql-server-ver16
Ref: https://learn.microsoft.com/en-us/sql/tools/sqlpackage/sqlpackage-download?view=sql-server-ver16#windows-net-83. Extract the file by right-clicking on the file in Windows Explorer, and selecting 'Extract All...', and select the target directory
SqlPackage.exe /a:import /sf:D:\Exportedbacpac\my.bacpac /tsn:localhost /tdn:<target database name> /p:CommandTimeout=1200
You can also use the command below.
C:\Program Files\Microsoft SQL Server\160\DAC\bin\SqlPackage.exe /Action:Import /SourceFile:"<J:\MSSQL_BACKUP\my.bacpac>" /TargetConnectionString:"Data Source=<database Servername>;Initial Catalog=<NEW DB Name>;TrustServerCertificate=True;" /p:CommandTimeout="0"
Note:
tsn (target server name) – The name of the Microsoft SQL Server instance to import into.
tdn (target database name) – The name of the database to import into. The database should not already exist.
sf (source file) – The path and name of the file to import from.
You are good to go, Relax while the importing takes time.
After success import
It may not sync 1st stop and restart the MSSMS service
Comments
Post a Comment