Skip to content

Latest commit

 

History

History
77 lines (64 loc) · 5.26 KB

File metadata and controls

77 lines (64 loc) · 5.26 KB
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
xp_msver_TSQL
xp_msver
dev_langs
TSQL
helpviewer_keywords
xp_msver
ms.assetid 9264cf8c-92ba-45ad-b2d6-15d26d805a16
author CarlRabeler
ms.author carlrab

xp_msver (Transact-SQL)

[!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.

Topic link icon Transact-SQL Syntax Conventions

Syntax

  
xp_msver [ optname ]  

Arguments

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.

Return Code Values

1 (success)

Result Sets

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.

Permissions

Requires membership in the public role.

See Also

System Functions (Transact-SQL)
System Stored Procedures (Transact-SQL)
General Extended Stored Procedures (Transact-SQL)
@@VERSION (Transact-SQL)