| title | xp_msver (Transact-SQL) | Microsoft Docs | ||
|---|---|---|---|
| ms.custom | |||
| ms.date | 03/14/2017 | ||
| ms.prod | sql | ||
| ms.prod_service | database-engine | ||
| ms.reviewer | |||
| ms.technology | system-objects | ||
| ms.topic | language-reference | ||
| f1_keywords |
|
||
| dev_langs |
|
||
| helpviewer_keywords |
|
||
| ms.assetid | 9264cf8c-92ba-45ad-b2d6-15d26d805a16 | ||
| author | CarlRabeler | ||
| ms.author | carlrab |
[!INCLUDEtsql-appliesto-ss2008-xxxx-xxxx-xxx-md]
Returns version information about [!INCLUDEmsCoName] [!INCLUDEssNoVersion]. xp_msver also returns information about the actual build number of the server and information about the server environment. The information that xp_msver returns can be used within [!INCLUDEtsql] statements, batches, stored procedures, and so on, to enhance logic for platform-independent code.
Transact-SQL Syntax Conventions
xp_msver [ optname ]
optname
Is the name of an option, and can be one of the following values.
| Option/Column name | Description |
|---|---|
| ProductName | Product name; for example, [!INCLUDEmsCoName] [!INCLUDEssNoVersion]. |
| ProductVersion | Product version. |
| Language | The language version of [!INCLUDEssNoVersion]. |
| Platform | Operating-system name, manufacturer name, and chip family name for the computer that is running [!INCLUDEssNoVersion]. |
| Comments | Miscellaneous information about [!INCLUDEssNoVersion]. |
| CompanyName | Company name that produces [!INCLUDEssNoVersion]; for example, [!INCLUDEmsCoName] Corporation. |
| FileDescription | The operating system. |
| FileVersion | Version of the [!INCLUDEssNoVersion] executable. |
| InternalName | [!INCLUDEmsCoName] internal name for [!INCLUDEssNoVersion]; for example, SQLSERVR. |
| LegalCopyright | Legal copyright information required for [!INCLUDEssNoVersion]; for example, Copyright© [!INCLUDEmsCoName] Corp. 1988-2005. |
| LegalTrademarks | Legal trademark information required for [!INCLUDEssNoVersion]. For example, [!INCLUDEmsCoName] is a registered trademark of [!INCLUDEmsCoName] Corporation. |
| OriginalFilename | File name executed at [!INCLUDEssNoVersion] startup; for example, Sqlservr.exe. |
| PrivateBuild | [!INCLUDEssInternalOnly] |
| SpecialBuild | [!INCLUDEssInternalOnly] |
| WindowsVersion | Version of [!INCLUDEmsCoName] Windows that is installed on the computer that is running [!INCLUDEssNoVersion]. |
| ProcessorCount | The number of processors in the computer that is running [!INCLUDEssNoVersion]. |
| ProcessorActiveMask | Indicates the processors installed in the computer that is running [!INCLUDEssNoVersion] that are started and usable by [!INCLUDEmsCoName] Windows. |
| ProcessorType | Processor type. Similar to Platform. |
| PhysicalMemory | Amount in megabytes (MB) of RAM installed on the computer that is running [!INCLUDEssNoVersion]. |
| Product ID | Product ID (PID) number. This is specified during installation. This number is located on a sticker on the original [!INCLUDEssNoVersion] CD case. |
1 (success)
xp_msver, without any parameters, returns a four-column result set that lists all the option values. xp_msver, for any parameter, returns the four-column result set with values for that option.
Requires membership in the public role.
System Functions (Transact-SQL)
System Stored Procedures (Transact-SQL)
General Extended Stored Procedures (Transact-SQL)
@@VERSION (Transact-SQL)