SQL Server 2014备份到2012 [英] SQL Server 2014 backup to 2012

查看:571
本文介绍了SQL Server 2014备份到2012的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有工具可以将SQL Server 2014数据库转换为2012年?

Are there any tools to convert SQL Server 2014 database to 2012?

我尝试了 Generate Script ,但是生成的包含数据的脚本也是如此大型并且SQL Server Management Studio没有执行它,我需要同时拥有架构和数据。

I tried Generate Script but the generated script with data is too large and SQL Server Management Studio did not execute it, I need to have both schema and data.

推荐答案

据我所知基本上是三个两个选项,可以在不使用第三方工具的情况下将数据库迁移到较低版本的SQL Server:

To my knowledge, there are basically three two options for migrating a database to a lower version of SQL Server, without using 3rd party tools:


  • 生成脚本(不太适合大量数据)

  • 自定义脚本和BCP或导入/导出向导

  • SQL Server Integration Services(传输数据库任务)

  • Generate Scripts (not really suitable for large amounts of data)
  • Custom Scripting and BCP or Import/Export Wizard
  • SQL Server Integration Services (Transfer Database Task)

首选

第二个选项是简单地编写数据库结构的脚本,然后使用导入/导出向导复制数据,一次一张桌子。注意,如果数据库中有外键约束,则可能要禁用约束,直到用数据填充所有表为止。 此博客帖子详细说明了如何完成此操作。

Second option is to simply script the structure of the database, and then use the Import/Export Wizard to copy the data, one table at a time. Note, that if you have foreign key constraints in your database, you might want to disable the constraints until after you have populated all your tables with data. This blog post explains in details how this can be done.

第三种选择使用 SISS传输数据库任务,该任务基本上使用SMO在目标服务器上创建对象,然后传输数据。这是在不同版本的SQL Server实例之间迁移数据库的推荐方法。 SSIS要求您已安装Visual Studio的SQL Server数据工具-商业智能(SSDT-BI)。在SQL Server 2012之前,它称为Business Intelligence Development Studio(BIDS)。您可以在此处下载以下内容:

Third option uses the SISS Transfer Database Task which basically uses SMO to create the objects on the destination server and then transfers the data. This is the recommended way of migrating a database between SQL Server instances of different versions. SSIS requires that you have installed SQL Server Data Tools - Business Intelligence (SSDT-BI) for Visual Studio. Before SQL Server 2012, this was called Business Intelligence Development Studio (BIDS). You can download these here:

  • Microsoft SQL Server Data Tools - Business Intelligence for Visual Studio 2013
  • Microsoft SQL Server Data Tools - Business Intelligence for Visual Studio 2012
  • If you don't have Visual Studio, SSDT-BI / BIDS is included in the SQL Server installation.

这篇关于SQL Server 2014备份到2012的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆