简体   繁体   English

将Azure Sql数据库复制到另一台服务器

[英]Copy Azure Sql Database to another server

I have a SQL database hosted on Azure by using SQL Server 2014. Now, I want to make a complete copy which will run again on Azure but this time by using SQL Server 2016. I tried to script the database an create it again by executing the query on the 2016's one, but there is a problem. 我有一个使用SQL Server 2014托管在Azure上的SQL数据库。现在,我想制作一个完整的副本,该副本将再次在Azure上运行,但是这次使用SQL Server2016。我尝试编写数据库脚本,然后通过执行再次创建在2016年的查询,但有一个问题。 On the old database I have some security implemented (3-4 security certificates and the same number of encrypted columns). 在旧数据库上,我实现了一些安全性(3-4个安全证书和相同数量的加密列)。 When I script the database, somehow these things are not included in the query, so I have to do them manually (not that this is a problem, but imagine a db where the security is not so simple). 当我编写数据库脚本时,查询中不包含这些内容,因此我必须手动进行操作(不是这是一个问题,而是想想安全性不是那么简单的数据库)。 Broadly speaking, my question is how to make a full copy of the database and implement it on another (already created) azure db. 从广义上讲,我的问题是如何制作数据库的完整副本并在另一个(已经创建的)azure db上实现它。

There are several ways to copy a database: 有几种复制数据库的方法:

  1. Using the Copy Database Wizard 使用复制数据库向导

You can use the Copy Database Wizard to copy or move databases between servers or to upgrade a SQL Server database to a later version. 您可以使用“复制数据库向导”在服务器之间复制或移动数据库,也可以将SQL Server数据库升级到更高版本。 For more information, see Use the Copy Database Wizard. 有关更多信息,请参见使用复制数据库向导。

  1. Restoring a database backup 恢复数据库备份

To copy an entire database, you can use the BACKUP and RESTORE Transact-SQL statements. 要复制整个数据库,可以使用BACKUP和RESTORE Transact-SQL语句。 Typically, restoring a full backup of a database is used to copy the database from one computer to another for a variety of reasons. 通常,出于多种原因,还原数据库的完整备份用于将数据库从一台计算机复制到另一台计算机。 For information on using backup and restore to copy a database, see Copy Databases with Backup and Restore . 有关使用备份和还原来复制数据库的信息,请参见使用备份和还原来复制数据库

  1. Using the Generate Scripts Wizard to publish databases 使用“生成脚本向导”发布数据库

You can use the Generate Scripts Wizard to transfer a database from a local computer to a Web hosting provider. 您可以使用“生成脚本向导”将数据库从本地计算机传输到Web托管提供程序。 For more information, see Generate and Publish Scripts Wizard . 有关更多信息,请参见生成和发布脚本向导

Taking a backup of the database and restoring it sounds like the best bet here (as Steve Newton was mentioning). 备份数据库并还原它听起来是这里最好的选择(正如Steve Newton提到的那样)。 I'm understanding from your question that you'd like to have a new copy of the same database on SQL Server 2016. As long as the relevant certificates and symmetric keys used to encrypt these columns are stored in the database, the backup will include them and restore them to your target instance. 我从您的问题中了解到,您希望在SQL Server 2016上具有相同数据库的新副本。只要用于加密这些列的相关证书和对称密钥存储在数据库中,备份将包括它们并将它们还原到您的目标实例。 If the certs and keys are on physical master, you'll need to back them up separately and restore them on the new instance. 如果证书和密钥在物理主机上,则需要分别备份它们并在新实例上还原它们。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 将SQL Azure数据库复制到其他服务器 - Copy SQL Azure Database to different Server 将SQL Server Express数据库复制到另一台计算机 - Copy SQL Server Express Database to Another Computer 如何将表从数据库复制到SQL Azure中的另一个数据库? - How to copy tables from a database into another database in SQL Azure? 将Azure SQL数据库(PaaS)复制到IaaS(VM上的SQL Server) - copy Azure SQL database (PaaS) to IaaS (SQL server on VM) 自动将Azure VM服务器SQL作业备份副本复制到另一台服务器? - Automate Azure VM server SQL job backup copy to another server? 要将数据从sql server数据库传输到同一数据库的另一个副本 - To transfer data from sql server database to another copy of the same database 将表数据从Azure SQL数据库复制到另一个Azure SQL数据库? - Copy table data from Azure SQL Database to another Azure SQL Database? SQL Server数据库复制到另一台服务器(分离并附加) - SQL Server database copy to another server (detach and attach) 如何将数据库复制到另一台服务器到 SQL 服务器中的特定磁盘上 - How to copy database to another server onto a specific disk in SQL Server SQL数据库从一台服务器复制到另一台服务器 - Sql database copy from one server to another server
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM