如何将数据库备份文件 (.bak) 从 SQL Server 2012 还原到 SQL Server 2008 Express?
最初来自 SQL Server 2008 的数据库已恢复到 SQL Server 2012.已从 SQL Server 2012 进行备份,我正在尝试在本地 SQL Server 2008 Express 上恢复它.但是,我收到错误消息指定的强制转换无效"(SQLManagerUI).
A database that was originally from SQL Server 2008, was restored into SQL Server 2012. A backup from SQL Server 2012 was made and I am trying to restore it on my local SQL Server 2008 Express. However I get an error 'Specified cast is not valid' (SQLManagerUI).
我已经从 2012 年生成了一个 SQL 脚本并对其进行了设置,以便它能够与 SQL Server 2008 兼容.但是它是一个大的 sql 文件,大约 700mb.
I have generated an SQL Script from 2012 and set it so that it will generate with compatibility to SQL Server 2008. However it is a large sql file, around 700mb.
我记得之前我曾尝试在本地 SQLExpress 上运行该大小的脚本,但也出现错误.
I recall before that I had tried to run a script of that size before on my local SQLExpress and also got an error.
有什么方法可以将大型"数据库从 SQL Server 2012 导入 SQL Server 2008 Express?
Is there a way I can get a "large" database from SQL Server 2012 into SQL Server 2008 Express?
感谢 Marc 和 Aaron 提供答案.
Thanks to Marc and Aaron for providing the answers.
答案是否定的,无法将备份文件从较高版本的 SQL Server 还原到较低版本的 SQL Server.
The quick answer is no, it's not possible to restore a backup file from a higher version to a lower version of SQL Server.
一种解决方法是生成脚本来创建数据库.
A work around would be to generate the scripts to create the database.
您可以将脚本生成定位到较低版本.
You can target the script generation to a lower version.
有关更多信息,请参阅上面的评论.
Please see comments above for more information.
链接: