SQL Server数据库还原失败-版本冲突 [英] SQL Server database restoration failed - Version Conflict

查看:930
本文介绍了SQL Server数据库还原失败-版本冲突的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图从 *。bak 文件还原SQL Server数据库备份,并且每当我尝试通过Microsoft SQL Server Management Studio还原时,都会出现以下错误:

I am attempting to restore SQL Server database backups from *.bak files and whenever I try a restore via Microsoft SQL Server Management Studio I get the following error:


还原数据库'ALA_PPD'失败。

(Microsoft.SqlServer.Management.RelationalEngineTasks)

Restore of database 'ALA_PPD' failed.
(Microsoft.SqlServer.Management.RelationalEngineTasks)

附加信息:

System.Data.SqlClient.SqlError:数据库已备份在运行版本12.00.2000的服务器上。该版本与运行版本11.00.2100的服务器不兼容。在支持备份的服务器上还原数据库,或使用与此服务器兼容的备份。 (Microsoft.SqlServer.SmoExtended)

System.Data.SqlClient.SqlError: The database was backed up on a server running version 12.00.2000. That version is incompatible with this server, which is running version 11.00.2100. Either restore the database on a server that supports the backup, or use a backup that is compatible with this server. (Microsoft.SqlServer.SmoExtended)

我意识到服务器的版本不同,我的问题是有办法转换这些12.00 .2000 *。bak 文件要在11.00.2100版中使用?

I realize that the versions of servers where different, my question is there a way to convert these 12.00.2000 *.bak files to be usable in version 11.00.2100?

我知道我可以安装ver。 11.00.2100并成功还原,但是我的12.00.2000安装中当前有无法删除的数据库。

I know that I could install ver. 11.00.2100 and successfully restore but I have databases currently in my 12.00.2000 installation that cannot be removed.

任何建议将不胜感激。抱歉,这是一个菜鸟问题。

Any suggestions would be greatly appreciated. Sorry if it is a noob question.

推荐答案

不能执行此操作-您无法从数据库中附加/分离或备份/还原数据库SQL Server的较新版本(SQL Server 2014-v12.0)降为较旧版本(SQL Server 2012-v11.0)-内部文件结构也是如此支持向后兼容性。

You CANNOT do this - you cannot attach/detach or backup/restore a database from a newer version (SQL Server 2014 - v12.0) of SQL Server down to an older version (SQL Server 2012 - v11.0) - the internal file structures are just too different to support backwards compatibility.

您可以通过以下方法解决此问题:

You can either get around this problem by


  • 所有计算机上使用相同版本的SQL Server-那么您可以轻松地在实例之间备份/还原数据库

  • using the same version of SQL Server on all your machines - then you can easily backup/restore databases between instances

否则,您可以为两个结构(表)创建数据库脚本,视图,存储过程等),以及在SQL Server Management Studio中(任务>生成脚本)或使用第三个内容的内容(表中包含的实际数据)方工具

otherwise you can create the database scripts for both structure (tables, view, stored procedures etc.) and for contents (the actual data contained in the tables) either in SQL Server Management Studio (Tasks > Generate Scripts) or using a third-party tool

,也可以使用第三方工具,例如Red-Gate的 SQL比较 SQL数据比较在源和目标之间进行区分,根据这些差异生成更新脚本,然后在目标平台上执行这些脚本;

or you can use a third-party tool like Red-Gate's SQL Compare and SQL Data Compare to do "diffing" between your source and target, generate update scripts from those differences, and then execute those scripts on the target platform; this works across different SQL Server versions.

这篇关于SQL Server数据库还原失败-版本冲突的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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