Azure SQL Database is Microsoft’s Database as a service on the cloud. While your production database might reside on the cloud, developers might want a local copy of the Database on their local SQL Server. If you are someone who is looking for options to copy your Database locally then there are several options available. We have collated a list of options which we think are based suited for this purpose. Read along to find out the various options available to download Azure SQL Database Locally for Testing.
Note: If you buy something from our links, we might earn a commission. See our disclosure statement.
The best option to download a local copy is to use the “Export” option available on the Azure portal. This option will create an exact copy of your Azure SQL Database to a “bacpac” file. This method will ensure that your database “Column properties“, “constraints definition “, keys “PK and FKs“, stored procedures and triggers are also retained. This is also a recommended approach from Microsoft for Database Migration from Cloud to On-Premises. In order to migrate the Azure SQL Database locally, perform the following steps:
Also Read: How to Backup an Azure SQL Database
See the screenshots below for your reference:
Steps 1,2,3 & 4:
Step 5: Select the Storage account and the container to download the bacpac file
Step 6: Import the bacpac file into SQL Server installed locally
If you are using the latest version of SQL Server Management Studio, then you can ignore “Step 5” and directly import the file from your Azure Blog Storage. See the second option in the screenshot above.
Hope this was helpful. Do let us know your feedback in the comments section.
Comments are closed.