LINK - Windows Azure - Clone of SQL Azure

来源:互联网 发布:java 门面模式 编辑:程序博客网 时间:2024/04/29 23:51

http://blog.idera.com/sql-server/how-to-make-a-copy-of-a-database-on-windows-azure-sql-database/


The exact command to run depends on whether or not you are copying a database to the same SQL Database server or to a different one. To create a new database (new_db) as a copy of an existing database (current_db) on the same server, simply connect to the master database then run the following statement:

    CREATE DATABASE [new_db] AS COPY OF [current_db]

If current_db is to be created on another SQL Database server, connect to the destination server and run this command (where source_server is the SQL Database name where current_db is stored):

    CREATE DATABASE [new_db] AS COPY OF [source_server].[current_db]


https://msdn.microsoft.com/en-us/library/azure/hh335292.aspx

Migrating your database is as simple as exporting the schema and data, storing this file in an Azure Storage Account, and then importing the file to create a new database. Import and Export can also be used for archiving, as well as combined with Database Copy to create a transactionally consistent copy of a database.

0 0
原创粉丝点击