Tuesday 30 June 2015

SQL AZURE Database Backup

SQL AZURE Database Backup If We are using Azure SQL Database and in case you want to take back up of existing database for

 1] Before making new deployment or schema changes


 2] or to create a testing database with identical schema and data as existing source db then



 --Script #1 -


Creating a database copy CREATE DATABASE AdventureWorksCopy AS COPY OF AdventureWorks
GO



 --Script #2 - Package wise events

SELECT * FROM sys.dm_database_copies 

 This is an asynchronous operation so you can monitor progress using Script 2 or refresh Management Studio to see expected list of tables.