Step 1:- Get Backpac file to your dev machine
Step2:- move this file to location as shown in below

Step 2 :- Navigate to Download and Install SqlPackage - SQL Server | Microsoft Learn
and scroll down for windows package as shown in below
download the file and extract the zip file
Step 3:- open the file and copy location as shown in below
Step 4:-Open commnd promt with run of administrator and run cd paste the location copied from above as shown in below
Step5:-run this command SqlPackage.exe /a:import /sf:J:\MSSQL_BACKUP\uatbackup.bacpac /tsn:localhost /tdn:AXDB_New /TargetTrustServerCertificate:True /p:CommandTimeout=1500
Step 6:-Wait for 6 hours until you see DB restored sucessfully.
Step 7:-Go to SSMS >Database >AXDB>properites>makes multiuser to single user
then Rename to AXDB_OLD
Step 8:-Rename AXDB_New (new db restored) to AXDB
Make AXDB_OLD properties to single user
Step 9:-Restart all services. Now Dev machines runs with Tier 2 database
Note:- This process is when you have been given with bacpac file (usually when we export tier 2 it will be bacpac only.most of the time we get bacpac file only).
If we get bac file we can directly restore with in few steps and lesstime in ssms itself without cmd promt.
Thank you!!



No comments:
Post a Comment