不同SQL Server版本间的数据库恢复问题
2010-05-29 14:11
239 查看
在这里,我所指的版本是指的2000,2005,2008这样的版本区别,而不是企业版,开发版这样的版本区别.从官方的说法来看,SQL Server是允许数据库从低版本向高版本恢复,但不支持高版本向低版本的恢复,如果我们用高版本的数据库在低版本的数据库引擎下恢复,会出现什么错误描述呢?
数据库恢复一般是指两个层面的意思:一种方法是利用备份文件进行还原;一种方法是利用数据文件进行附加还原.
我们先来看备份还原的方式:
如果是用2005的数据库在2000下还原,会出现错误:
Msg 3205, Level 16, State 2, Line 1
Too many backup devices specified for backup or restore; only 64 are allowed.
Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.
如果是用2008的数据库在2005下还原,会出现错误:
Msg 3241, Level 16, State 7, Line 1
The media family on device 'c:/xxx.bak' is incorrectly formed.
SQL Server cannot process this media family.
Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.
接着我们来看附加还原的方式:
如果是用2005的数据库在2000下附加还原,会出现错误:
Msg 1813, Level 16, State 2, Line 1
Could not open new database 'xxx'. CREATE DATABASE is aborted.
Msg 602, Level 21, State 50, Line 1
Could not find row in sysindexes for database ID 7, object ID 1, index ID 1.
Run DBCC CHECKTABLE on sysindexes.
如果是用2008的数据库在2005下附加还原,会出现错误:
Msg 1813, Level 16, State 2, Line 1
Could not open new database 'Test'. CREATE DATABASE is aborted.
Msg 948, Level 20, State 1, Line 1
The database 'Test' cannot be opened because it is version 655.
This server supports version 612 and earlier. A downgrade path is not supported.
实践也证明了官方的说法,其实一般很少有高版本的数据库导入到低版本的情况,如果确实需要这样做,建议采取以下步骤:
1:通过管理器的脚本生成向导,把数据库,表,存储过程等对象的脚本生成,然后在低版本的SQL Server下执行建立这些对象.
2:通过DTS/SSIS,将表中的数据导过去.
数据库恢复一般是指两个层面的意思:一种方法是利用备份文件进行还原;一种方法是利用数据文件进行附加还原.
我们先来看备份还原的方式:
如果是用2005的数据库在2000下还原,会出现错误:
Msg 3205, Level 16, State 2, Line 1
Too many backup devices specified for backup or restore; only 64 are allowed.
Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.
如果是用2008的数据库在2005下还原,会出现错误:
Msg 3241, Level 16, State 7, Line 1
The media family on device 'c:/xxx.bak' is incorrectly formed.
SQL Server cannot process this media family.
Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.
接着我们来看附加还原的方式:
如果是用2005的数据库在2000下附加还原,会出现错误:
Msg 1813, Level 16, State 2, Line 1
Could not open new database 'xxx'. CREATE DATABASE is aborted.
Msg 602, Level 21, State 50, Line 1
Could not find row in sysindexes for database ID 7, object ID 1, index ID 1.
Run DBCC CHECKTABLE on sysindexes.
如果是用2008的数据库在2005下附加还原,会出现错误:
Msg 1813, Level 16, State 2, Line 1
Could not open new database 'Test'. CREATE DATABASE is aborted.
Msg 948, Level 20, State 1, Line 1
The database 'Test' cannot be opened because it is version 655.
This server supports version 612 and earlier. A downgrade path is not supported.
实践也证明了官方的说法,其实一般很少有高版本的数据库导入到低版本的情况,如果确实需要这样做,建议采取以下步骤:
1:通过管理器的脚本生成向导,把数据库,表,存储过程等对象的脚本生成,然后在低版本的SQL Server下执行建立这些对象.
2:通过DTS/SSIS,将表中的数据导过去.
相关文章推荐
- 不同SQL Server版本间的数据库恢复问题
- sqlserver 高版本数据倒到低版本 不同SQL Server版本间的数据库恢复问题
- 同时在计算机上安装不同版本的SQL SERVER的问题
- 不同版本数据库的exp/imp问题
- 使用 JDBC 连接不同版本 DB2 数据库的兼容性问题
- SQL server 数据库升级版本问题解决办法
- 使用 JDBC 连接不同版本 DB2 数据库的兼容性问题
- SQL Server恢复数据到新数据库异常问题
- SQL Server 数据库文件恢复问题
- 解决配置 SQL Server 2008 的若干问题(安装失败、不能创建数据库、Express 版本无默认实例)
- 使用 JDBC 连接不同版本 DB2 数据库的兼容性问题
- 解决SQL Server恢复时提示此备份集与现有数据库不同
- 数据库不同版本的相互迁移问题(DTS/SSIS)
- Entity Framewrok 7beta7中不同版本sql server自动生成分页sql语句的问题
- SQL Server恢复数据库解决用户已经存在问题
- 使用 JDBC 连接不同版本 DB2 数据库的兼容性问题
- SQL SERVER 数据库的同库不同版本间的比较程序
- Oracle:不同数据库版本导致的Ora-00918问题
- 数据库不同版本的相互迁移问题(DTS/SSIS)
- 使用 JDBC 连接不同版本 DB2 数据库的兼容性问题