简体   繁体   English

如何将SQL Server 2014数据库还原到SQL Server Express 2012

[英]How to restore SQL Server 2014 database to SQL Server Express 2012

When I try to restored DB , every time I am getting this error 当我尝试还原数据库时,每次出现此错误时

TITLE: Microsoft SQL Server Management Studio ------------------------------ Restore of database 'PramodDb' failed. 标题:Microsoft SQL Server Management Studio ------------------------------恢复数据库'PramodDb'失败。

(Microsoft.SqlServer.Management.RelationalEngineTasks) ------------------------------ ADDITIONAL INFORMATION: System.Data.SqlClient.SqlError: The database was backed up on a server running version 12.00.4100. (Microsoft.SqlServer.Management.RelationalEngineTasks)------------------------------其他信息:System.Data.SqlClient.SqlError:该数据库已备份到运行12.00.4100版本的服务器上。 That version is incompatible with this server, which is running version 11.00.6020. 该版本与此服务器(运行版本11.00.6020)不兼容。 Either restore the database on a server that supports the backup, or use a backup that is compatible with this server. 在支持备份的服务器上还原数据库,或使用与此服务器兼容的备份。 (Microsoft.SqlServer.SmoExtented) (Microsoft.SqlServer.SmoExtented)

Please help me. 请帮我。

Like always it helps to read the error. 像往常一样,它有助于读取错误。 Let me quote pretty much all of your error message: 让我引用几乎所有的错误消息:

The database was backed up on a server running version 12.00.4100. 该数据库已备份到运行12.00.4100版本的服务器上。 That version is incompatible with this server, which is running version 11.00.6020. 该版本与此服务器(运行版本11.00.6020)不兼容。 Either restore the database on a server that supports the backup, or use a backup that is compatible with this server. 在支持备份的服务器上还原数据库,或使用与此服务器兼容的备份。

General rule: No downgrade. 一般规则:不降级。 On top, restoring on express is generally possibly problematic due to the limitations of the express version. 最重要的是,由于Express版本的限制,恢复Express通常可能会出现问题。

So, you need to either export/script import the database, or grab yourself and install the free developer version. 因此,您需要导出/脚本导入数据库,或者掌握并安装免费的开发人员版本。 Ever since they made this one free there is no excuse for even the most junior developer not to work against it. 自从他们免费发布了该版本以来,即使是最初级的开发人员也没有理由不反对它。

The answer you cannot do that. 您无法做到的答案。 You cannot downgrade a database. 您不能降级数据库。

As far as the work around is concerned you need to use the Import/Export wizards in SSMS to make it working. 就解决方法而言,您需要使用SSMS中的“导入/导出”向导才能使其正常工作。

You can't, but... You can try Scripting your 2014 database and execute the Scripts on a blank 2012 database. 您不能,但是...您可以尝试编写2014年数据库脚本并在空白的2012年数据库上执行脚本。 To open the Generate and Publish Scripts Wizard: In Object Explorer, expand Databases, right-click a database, point to Tasks, and then click Generate Scripts. 要打开“生成和发布脚本向导”:在对象资源管理器中,展开“数据库”,右键单击一个数据库,指向“任务”,然后单击“生成脚本”。 Follow the steps in the Wizard to script all database's objects. 按照向导中的步骤编写所有数据库对象的脚本。 Note the disk space required. 请注意所需的磁盘空间。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM