SQL Server - 将数据库从Server 2008复制到Server 2012

时间:2021-03-25 08:34:10

I have two servers one in Denmark the other here in the UK. I need to make a copy of a database out of SQL Server Management 2008 (1st server) and place it in SQL Server Management 2012(2nd server). I have tried connecting to the remote server but have been getting difficulties so instead of connecting both up and doing it that way I was hoping there is a function like copy database which could do this for me. I have gone into tasks and copy database in SQL Server 2008 but in the Copy Database Wizard that appears it says "You can use this wizard to move or copy databases from an instance of SQL Server 2000 or later to an instance of SQL Server 2008". I'm looking for something like this that will work for Server 2012.

我有两台服务器在丹麦,另一台在英国。我需要从SQL Server Management 2008(第一个服务器)中复制数据库并将其放在SQL Server Management 2012(第二个服务器)中。我已经尝试连接到远程服务器,但一直遇到困难,所以不是连接两个并且这样做,我希望有一个像复制数据库这样的功能可以为我做这个。我已经进入SQL Server 2008中的任务并复制数据库,但在出现的复制数据库向导中显示“您可以使用此向导将数据库从SQL Server 2000或更高版本的实例移动或复制到SQL Server 2008的实例” 。我正在寻找适用于Server 2012的类似内容。

3 个解决方案

#1


0  

  1. Copy your database file .mdf and log file .ldf and paste in your SQL Server
  2. 将数据库文件.mdf和日志文件.ldf复制并粘贴到SQL Server中

  3. Install file in Programs Files->Microsoft SQL Server->MSSQL10.SQLEXPRESS->MSSQL->DATA.
  4. 在程序文件 - > Microsoft SQL Server-> MSSQL10.SQLEXPRESS-> MSSQL-> DATA中安装文件。

  5. Open SQL Server. Right-click on Databases then Select Attach... option.
  6. 打开SQL Server。右键单击Databases,然后选择Attach ...选项。

#2


0  

You can create a backup with the Management Studio on the source and restore it on the target.

您可以在源上使用Management Studio创建备份,并在目标上将其还原。

#3


0  

You need Management Studio 2012 to make this step. You can then create empty database on 2012 server. Right click on this empty DB->Tasks->Copy database..

您需要Management Studio 2012才能完成此步骤。然后,您可以在2012服务器上创建空数据库。右键单击这个空DB->任务 - >复制数据库..

Wizard will guide you. You should to this under 2012 Management Studio because it is compatible with 2008 Server - vice versa it will not work.

向导将指导您。您应该在2012 Management Studio下进行此操作,因为它与2008 Server兼容 - 反之亦然,它不起作用。

Of course, cleanest way is to do this via backup (.bak file - Tasks->Backup.. then on 2012 server Tasks->Restore->Files or FileGroups) but you need remote access (RDP) to the server.

当然,最干净的方法是通过备份(.bak文件 - 任务 - >备份..然后在2012服务器任务 - >恢复 - >文件或文件组)执行此操作,但您需要远程访问(RDP)到服务器。

#1


0  

  1. Copy your database file .mdf and log file .ldf and paste in your SQL Server
  2. 将数据库文件.mdf和日志文件.ldf复制并粘贴到SQL Server中

  3. Install file in Programs Files->Microsoft SQL Server->MSSQL10.SQLEXPRESS->MSSQL->DATA.
  4. 在程序文件 - > Microsoft SQL Server-> MSSQL10.SQLEXPRESS-> MSSQL-> DATA中安装文件。

  5. Open SQL Server. Right-click on Databases then Select Attach... option.
  6. 打开SQL Server。右键单击Databases,然后选择Attach ...选项。

#2


0  

You can create a backup with the Management Studio on the source and restore it on the target.

您可以在源上使用Management Studio创建备份,并在目标上将其还原。

#3


0  

You need Management Studio 2012 to make this step. You can then create empty database on 2012 server. Right click on this empty DB->Tasks->Copy database..

您需要Management Studio 2012才能完成此步骤。然后,您可以在2012服务器上创建空数据库。右键单击这个空DB->任务 - >复制数据库..

Wizard will guide you. You should to this under 2012 Management Studio because it is compatible with 2008 Server - vice versa it will not work.

向导将指导您。您应该在2012 Management Studio下进行此操作,因为它与2008 Server兼容 - 反之亦然,它不起作用。

Of course, cleanest way is to do this via backup (.bak file - Tasks->Backup.. then on 2012 server Tasks->Restore->Files or FileGroups) but you need remote access (RDP) to the server.

当然,最干净的方法是通过备份(.bak文件 - 任务 - >备份..然后在2012服务器任务 - >恢复 - >文件或文件组)执行此操作,但您需要远程访问(RDP)到服务器。