【转】SQL Server 数据库内部版本号

摘要:
-----------在数据库恢复或版本升级中出现版本错误时,可以参考此信息。这一限制只是因为不可能知道新版本中文件格式的更改。

 -----------数据库还原或版本升级出现版本错误时可参考。

Internal SQL Server Database Version Numbers

A database created by a more recent version of SQL Server cannot be attached or restored to an earlier version. This restriction is simply because an older version cannot know about file format changes that were introduced in the newer release. 
较新版本的SQL Server创建的数据库,不能附加或还原到较早的版本。这个限制仅仅是因为无法知道新版本中有关文件格式的变化。
If you attempt to attach a database to an earlier version, you will get SQL Server error 948 with the internal version numbers listed in the error message text. For example, the following error occurs if you try to attach a SQL Server 2008 R2 database to a SQL Server 2008 server:
如果您试图附加一个数据库到一个较早的版本,你会得到错误消息,的文本中列出的内部版本号码与SQL Server错误948。例如,出现以下错误如果您尝试连接到SQL Server 2008服务器的SQL Server 2008 R2数据库:

The database 'MyDatabase' cannot be opened because it is version 665. This server supports version 661 and earlier. A downgrade path is not supported.
“MyDatabase" 的数据库无法打开,因为它是665版本。该服务器支持661和更早版本。不支持降级路径。

可以利用SQL语句查看本机数据库版本:

select @@VERSION

Sample text from SQL Server error 948
从SQL Server错误948的样本文本
The cryptic version numbers in the error message refer to the internal database version. These internal version numbers are undocumented but are (at least currently) the same value reported by the DATABASEPROPERTYEX function 'Version' property of the source database. If you are unsure of the source database version, the table below maps the internal version numbers to SQL Server versions so you can determine the minimum version you need for the attach to succeed:
神秘的版本号错误消息是指内部的数据库版本。这些内部版本号是无证的,但(至少目前)DATABASEPROPERTYEX函数'版本'源数据库的属性值相同报道。如果你不确定是源数据库的版本,下面的映射表的SQL Server版本的内部版本号,以便您可以决定您需要的附加成功的最低版本:

SQL Server Version

Internal Database Version

SQL Server 2008 R2

665

SQL Server 2008

661

SQL Server 2005 SP2+ with vardecimal enabled

612

SQL Server 2005

611

SQL Server 2000

539

SQL Server 7

515
SQL Server versions and internal database versions
Below are the allowable SQL Server upgrade paths for a database attach or restore. The internal database version will be as above after a successful attach or restore.
下面是允许的SQL Server数据库附加或还原的升级路径。附加或还原成功后内部的数据库版本将更改为高的版本号。

Target SQL Server Version

Source SQL Server Version

Internal Database Version

SQL Server 2008 R2

SQL Server 2008 R2

665

SQL Server 2008

661

SQL Server 2005 with vardecimal enabled

612

SQL Server 2005

611

SQL Server 2000

539

SQL Server 2008

SQL Server 2008

661

SQL Server 2005 with vardecimal enabled

612

SQL Server 2005

611

SQL Server 2000

539

SQL Server 2005 SP2+

SQL Server 2005 with vardecimal enabled

612

SQL Server 2005

611

SQL Server 2000

539

SQL Server 7

515

SQL Server 2005

SQL Server 2005

611

SQL Server 2000

539

SQL Server 7

515

SQL Server 2000

SQL Server 2000

539

SQL Server 7

515


SQL Server 7

SQL Server 7

515
Database File Versions and Upgrade Paths
As I mentioned earlier, downgrades are not supported. You’ll need to copy objects and data from the newer source database to the older target if you need to downgrade; attach or restore is not an option to copy a database to an earlier version.
正如我刚才所说,不支持降级。你需要复制对象和数据从源数据库更新到旧的目标,如果你需要降级附加或还原数据库复制到一个较早的版本是不是一种选择。

免责声明:文章转载自《【转】SQL Server 数据库内部版本号》仅用于学习参考。如对内容有疑问,请及时联系本站处理。

上篇织梦cms dedecms程序安装问题Linux静默安装matlab下篇

宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=

相关文章

如何导出远程oracle数据库中的表结构

从远程oracle数据库上导出指定表的表结构语句有两种方法: 方法一:通过sql语句获得 1,make sure that you can connect the remote database. 2,enter into the sqlplus,and execute the command: select dbms_metadata.getddl('T...

SQL数据库面试题

Database工程师面试 问题描述:为管理岗位业务培训信息,建立3个表:S (S#,SN,SD,SA) S#,SN,SD,SA 分别代表学号、学员姓名、所属单位、学员年龄C (C#,CN ) C#,CN 分别代表课程编号、课程名称SC ( S#,C#,G ) S#,C#,G 分别代表学号、所选修的课程编号、学习成绩要求实现如下5个处理:1. 使用标准SQ...

SQL Server 阻塞原因分析

这里通过连接在sysprocesses里字段值的组合来分析阻塞源头,可以把阻塞分为以下5种常见的类型(见表)。waittype,open_tran,status,都是sysprocesses里的值,“自我修复?”列的意思,就是指阻塞能不能自动消失。  5种常见的阻塞类型 类型 waittype open_tran status 自我修复 原因/其他特征...

SQL数据库设计的命名规范

< DOCTYPE html PUBLIC -WCDTD XHTML StrictEN httpwwwworgTRxhtmlDTDxhtml-strictdtd> 1 相关的设计规范:1.1 采用有意义的字段名尽可能地把字段描述的清楚些。当然,也别做过头了,比如CustomerShippingAddressStreetLine1 虽然很富有说...

SQL Server 2014 中新建登录及权限分配【界面版】

本篇经验将和大家介绍分配SQL Server 2014 中,新建登录用户,分配权限,并指定该用户的数据库的方法,希望对大家的工作和学习有所帮助! 方法/步骤 1 打开 MS SQL Server Management Studio,以 Windows身份认证方式登录,如下图所示: 步骤阅读 2 在对象资源管理器下,“安全”==>“...

使用sql语句创建修改SQL Server标识列(即自动增长列)

一、标识列的定义以及特点SQL Server中的标识列又称标识符列,习惯上又叫自增列。该种列具有以下三种特点:1、列的数据类型为不带小数的数值类型2、在进行插入(Insert)操作时,该列的值是由系统按一定规律生成,不允许空值3、列值不重复,具有标识表中每一行的作用,每个表只能有一个标识列。由于以上特点,使得标识列在数据库的设计中得到广泛的使用。二、标识列...