# Easily copy your SQL Azure database to your local development server

I've ran across folks at conferences that asked me "How do you copy a SQL Azure database to my local development machine?" While chatting with them, I always found it difficult to understand why (as it is dirt cheap to have a development SQL Azure instance in the cloud) but nevertheless it is their data and there is an easy way to do this.

First off, download SQL Server Management Studio (SSMS) (opens new window) and connect to your SQL Azure database that you want to copy locally.

Note by cbattlegear One important caveat to this process (as shown below). If any writes are happening on the database while you do the export the import will be broken. Best practice is to run CREATE DATABASE AS COPY to create a copy of the database and create an export of the copy.

Right-click on the Database -> click Tasks > Export data-tier application

You'll see a wizard and will export your database to a local .bacpac file.

You'll see something similar to this screen once it has finished processing.

Now ensure you are connected to your local target SQL server instance (or SQL Azure instance) and right-click on Databases (the parent folder of your actual database) -> click Tasks > Import data-tier application and select the .backpac file that you created earlier.