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

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

问题描述

有没有什么工具可以把SQL Server 2014数据库转换成2012?

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

我尝试了生成脚本,但是生成的带有数据的脚本太大,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.

推荐答案

据我所知,在不使用 3rd 方的情况下,将数据库迁移到较低版本的 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 集成服务(传输数据库任务)

第一个选项不适合您的情况.

第二个选项是简单地编写数据库结构的脚本,然后使用导入/导出向导复制数据,一次一个表.请注意,如果您的数据库中有外键约束,您可能希望禁用这些约束,直到用数据填充所有表之后.此博客帖子详细解释了如何做到这一点.

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 Transfer数据库任务 基本上使用 SMO 在目标服务器上创建对象,然后传输数据.这是在不同版本的 SQL Server 实例之间迁移数据库的推荐方法.SSIS 要求您已为 Visual Studio 安装 SQL Server Data Tools - Business Intelligence (SSDT-BI).在 SQL Server 2012 之前,这称为商业智能开发工作室 (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:

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

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