Moving an Azure SQL Database across Resource Groups

In my mind there are a couple of ways to move a database across resource groups. They vary from scripting to just using the Azure portal. I am going to use the Azure portal and do the following.

  1. Export a database in resource group X to a storage account Z.
  2. Import the file from the storage account Z into a database that is in resource group Y.

It’s just like a “backup and restore” strategy, all with the assumption that you are working within the same subscription ID.

On the source server go the database that you want to move and click export.

sauce

So I will be moving twitterdb that is within the AKS_Prod resource group. Once you click export save the file to a storage container. This will be the well known BACPAC file.

container

I will be importing the file into my target server called cloudmarsh which is located in West US 2 data center within a resource group called bigdata.

cloudmarsh

Look for the import database option.

importDB

Navigate to the container we created earlier on and select it and pick up the BACPAC file.

abacpac

The import database options will auto-fill as shown below.

TheImport

Check the import/export history logs for more information which is found under the sql server > settings section.

IEhist

Looks completed to me.

Completed

Let’s connect and check.

donesql

 

Advertisements

2 thoughts on “Moving an Azure SQL Database across Resource Groups

  1. Pingback: Dew Drop - September 6, 2018 (#2797) - Morning Dew

  2. Pingback: Migrating Azure SQL Databases Between Resource Groups – Curated SQL

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 )

Google+ photo

You are commenting using your Google+ 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 )

Connecting to %s