07-31-2023, 09:54 AM
I always use Import/Export Feature which seems to be the easiest one among all.
**Step 1:**
Get the backup from the azure instance as follows, Select the **database → Right click → Tasks → Export Data Tier Application.**
**Step 2:**
Give a specific name for the backup file and save it in your desired location
**Step 3:** That's it you have taken a backup of the database from sql instance to your local. Lets restore it to the local. Copy the backed up database to your C drive. Now open the PowerShell with administrator rights and navigate to C drive
**Step 4:** Lets download the powershell script to remove the master [keyRemoveMasterKey.ps1][1] have the script on the same drive in this case its C.
**Step 5 :** Run the script as follows,
.\RemoveMasterKey.ps1 -bacpacPath "C:\identity.bacpac"
That's it, now you can restore it on MSSQL 2017 in your local environment.
**Step 6:** Connect to your local server, and click Databases → Import-Data-Tier-Application
**Step 7** : Give a name for your database to restore.
Now you will see everything in green!
Read my **[blog][2]** with diagrams.
[1]:
**Step 1:**
Get the backup from the azure instance as follows, Select the **database → Right click → Tasks → Export Data Tier Application.**
**Step 2:**
Give a specific name for the backup file and save it in your desired location
**Step 3:** That's it you have taken a backup of the database from sql instance to your local. Lets restore it to the local. Copy the backed up database to your C drive. Now open the PowerShell with administrator rights and navigate to C drive
**Step 4:** Lets download the powershell script to remove the master [keyRemoveMasterKey.ps1][1] have the script on the same drive in this case its C.
**Step 5 :** Run the script as follows,
.\RemoveMasterKey.ps1 -bacpacPath "C:\identity.bacpac"
That's it, now you can restore it on MSSQL 2017 in your local environment.
**Step 6:** Connect to your local server, and click Databases → Import-Data-Tier-Application
**Step 7** : Give a name for your database to restore.
Now you will see everything in green!
Read my **[blog][2]** with diagrams.
[1]:
[To see links please register here]
[2]:[To see links please register here]