Currently there is no built in Backup option to backup SQL Azure databases from Management Studio
You also can’t use BACKUP DATABASE command
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’
— Get the Status of Database Copying
SELECT * FROM SYS.DM_DATABASE_COPIES
WHERE DATABASE_ID = DB_ID(‘NorthWind_DB_Copy’)
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’
CREATE DATABASE [localserver.]new_database_name AS COPY OF
[[azureserver].database.windows.net.]database_name
after executing this, gives error-
Msg 40530, Level 15, State 1, Line 1
The CREATE DATABASE statement must be the only statement in the batch.
LikeLike
Hi Sachin,
CREATE DATABASE AS COPY OF command is specifically for creating a copy of SQL Azure database within or across SQL Azure servers. You cannot use this command to create a copy of your local database to SQL Azure.
For migrating you local database to SQL Azure, Please use SQL Azure Migration Wizard http://sqlazuremw.codeplex.com/
LikeLike