Home > SQL Azure > Migrate Database and Data to SQL Azure using DAC

Migrate Database and Data to SQL Azure using DAC

In my previous blog post, I talked about database schema migration using DAC. In this blog post, I am going to show you how to migrate database schema and data using DAC.

To achieve this task, we have to Export DACPAC file from Source and Import DACPAC file to SQLAzure in two different steps

Export DACPAC from Source



I have a database named “Currency” with two tables (Currency, CurrencyRate) with data. These tables are copied from AdventuresWorks2012. So, It is easy for you to create a database with these tables and copy data in your machine.

Step 1: Export DAC from data source.

pic1Step 2: Create DACPAC file to export database schema and data.

pic2Click next

Step 3: Fill export settings such as file location and select table objects.

pic3Go to Advanced tab


Click next

Step 4: Validate Export DAC settings

pic5Click finish

pic6Click Close now, We have exported the database schema and data to DACPAC file.

Import DACPAC file to SQL Azure


Step 1: Connect to SQL Azure using SSMS 2012 and Start import DAC task


Step 2: Begin DAC Import wizard

pic8Click Next

Step 3: Specify BACPAC file for import

pic9Click Next

Step 4: Specify SQL Azure database settings such as database name, Edition and Size.

pic10 Step 5: Validate settings and click Finish

pic11pic12We have successfully imported the database schema and data to SQL Azure.

  1. Sundar
    August 22, 2013 at 12:38 am

    FOR :Import DACPAC file to SQL Azure
    I want to Creare Database by DACPAC which is in Azure Blob Storage…

    For that I have Blob access..
    my question is What is that temporary file and its location means ?

    • August 23, 2013 at 10:49 am


      Do you mean step 3 settings? it is just a location to store the file while generating dacpac file from sql azure server in the local machine. you can always use any disk location.

      • Sundar
        August 23, 2013 at 12:49 pm


        will it also make a copy to that location and also to Blob Storage??
        Thanks for your reply..

      • August 24, 2013 at 3:07 pm

        Yes. It is temporary as it is saying.

  1. January 20, 2013 at 11:25 pm

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: