Archive

Posts Tagged ‘SQL Azure Backup’

Backup SQL Azure Database using Red Gate SQL Azure Backup Tool

May 4, 2011 1 comment

After reading my last article one of my friend asked, whether there is any easy way to Backup SQL Azure databases, without writing scripts or custom programs, so I was searching for 3rd party products and found the Red Gate SQL Azure Backup Tool, its still in Beta, but works pretty good.

You can download it from the following link

http://www.red-gate.com/products/dba/sql-azure-backup/

Currently its available for Free to download

After downloading, extract the zip file and run the program

image

Specify the name of the SQL Azure Server name and provide username and password on click on Database selection to pick the database you want to backup

Next Enter the Local SQL Server Name (Destination Backup Server) and specify Credentials, then enter the name of the Local database to be created for backup from Azure

Warning: Existing database cannot be used for backup. You need to use a new database name only

Click “Next” to proceed

image

Click on “Start Backup” to start the backup process

image

Status of Backup process will be displayed in the progress bar, depending upon the size of the database

image

Backup has completed successfully !!!

Some of the features, I would like to see in this product is

1. Integration with SQL Server Management Studio or Red Gate SQL Backup Pro

2. Option to run from Command Line, so that we can it as Windows Task and automate it

3. Option to run backup for multiple databases

Advantages:

Easy to Use

Fast

Small and Lightweight

Disadvantages:

Need to create a new database every time to create a backup

Advertisements

How to Backup Azure Database within SQL Azure

May 3, 2011 2 comments

Currently there is no built in Backup option to backup SQL Azure databases from Management Studio

image

You also can’t use BACKUP DATABASE command

image

There is a new option to create a copy of your database quickly from SQL Azure within the same server using

CREATE DATABASE <TargetDB> AS COPY OF <SourceDB>

Ex.

CREATE DATABASE NorthWind_DB_Copy AS COPY OF Northwind_DB;

By running this SQL Command in Master Database, you can create a Copy of NorthWind_DB to Northwind_DB_Copy

Using the following query you can get the status of Copy Status

— Query to fetch the state of the new database

SELECT

           DATABASE_ID, NAME, STATE, STATE_DESC

FROM SYS.DATABASES

WHERE NAME = ‘NorthWind_DB_Copy’

image

 

— Get the Status of Database Copying

SELECT * FROM SYS.DM_DATABASE_COPIES 

        WHERE DATABASE_ID = DB_ID(‘NorthWind_DB_Copy’)

image

 

Once the copying is complete, Database will be Online and available for access

SELECT

DATABASE_ID, NAME, STATE, STATE_DESC

FROM SYS.DATABASES

WHERE NAME = ‘NorthWind_DB_Copy’

image

%d bloggers like this: