This post describes the steps that are followed to restore UAT/Sandbox database (*.bacpac) into Azure Dev virtual machine.
1. Download *.bacpac file from LCS.
LCS-> Select the project-> Shared Asset Library-> Database backup-> click the respective database file.
It will download the *. bacpac file
2. Save the db backup file in the dev machine's local folder for import.
3.Install SQL Package file in the dev machine.
Download and install SqlPackage - SQL Server | Microsoft Learn
4. Extract the SQL package zip
5. Open CMD prompt as an admin.
6. Navigate to SQL package folder
cd folder_path
7. Execute the following sql package import command.
SqlPackage.exe /a:import /sf:C:\Users\Admin1234\Documents\Backup\dbbackup.bacpac /tsn:localhost /tdn:AXDB_UAT /p:CommandTimeout=1200 /TargetEncryptConnection:False
8. Shrink the current DB's log file
USE AxDB;
GO
CHECKPOINT;
GO
DBCC SHRINKFILE(AxDBCopy3_log, 1000); -- 1000 = 1GB
GO
No comments:
Post a Comment