我如何知道机器上运行的是哪个版本的 SQL Server? [英] How can I tell what edition of SQL Server runs on the machine?
问题描述
我正在运行 SQL Server 2005,但我不确定这是哪个版本.如何确定机器上运行的是哪个版本(Express、Standard、Enterprise 等)?
select @@version
<块引用>
样本输出
Microsoft SQL Server 2008 (SP1) - 10.0.2531.0 (X64) 2009 年 3 月 29 日 10:11:52 版权所有 (c) 1988-2008 Microsoft Corporation Developer Edition(64 位),Windows NT 6.1(内部版本 7600:)
如果您只是想获取版本,可以使用:
select serverproperty('Edition')
要在自动化脚本中使用,您可以获取版本 ID,它是一个整数:
select serverproperty('EditionID')
- -1253826760 = 桌面
- -1592396055 = 快递
- -1534726760 = 标准
- 1333529388 = 工作组
- 1804890536 = 企业
- -323382091 = 个人
- -2117995310 = 开发人员
- 610778273 = 企业评估
- 1044790755 = Windows 嵌入式 SQL
- 4161255391 = Express 高级服务
I am running SQL Server 2005 but I am unsure which edition this is. How can I decide what edition (Express, Standard, Enterprise etc) is running on the machine?
select @@version
Sample Output
Microsoft SQL Server 2008 (SP1) - 10.0.2531.0 (X64) Mar 29 2009 10:11:52 Copyright (c) 1988-2008 Microsoft Corporation Developer Edition (64-bit) on Windows NT 6.1 (Build 7600: )
If you just want to get the edition, you can use:
select serverproperty('Edition')
To use in an automated script, you can get the edition ID, which is an integer:
select serverproperty('EditionID')
- -1253826760 = Desktop
- -1592396055 = Express
- -1534726760 = Standard
- 1333529388 = Workgroup
- 1804890536 = Enterprise
- -323382091 = Personal
- -2117995310 = Developer
- 610778273 = Enterprise Evaluation
- 1044790755 = Windows Embedded SQL
- 4161255391 = Express with Advanced Services
这篇关于我如何知道机器上运行的是哪个版本的 SQL Server?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!