Skip to content

Latest commit

 

History

History
79 lines (62 loc) · 4.82 KB

xp-msver-transact-sql.md

File metadata and controls

79 lines (62 loc) · 4.82 KB
title description author ms.author ms.reviewer ms.date ms.service ms.subservice ms.topic f1_keywords helpviewer_keywords dev_langs
xp_msver (Transact-SQL)
Returns version information about SQL Server.
markingmyname
maghan
randolphwest
05/26/2023
sql
system-objects
reference
xp_msver_TSQL
xp_msver
xp_msver
TSQL

xp_msver (Transact-SQL)

[!INCLUDE SQL Server]

Returns version information about [!INCLUDE ssNoVersion]. 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 [!INCLUDE tsql] statements, batches, stored procedures, and so on, to enhance logic for platform-independent code.

:::image type="icon" source="../../includes/media/topic-link-icon.svg" border="false"::: Transact-SQL syntax conventions

Syntax

xp_msver [ 'optname' ]

Arguments

'optname'

The name of an option, and can be one of the following values.

Option or column name Description
ProductName Product name; for example, [!INCLUDE ssNoVersion].
ProductVersion Product version.
Language The language version of [!INCLUDE ssNoVersion].
Platform Operating-system name, manufacturer name, and chip family name for the computer that is running [!INCLUDE ssNoVersion].
Comments Miscellaneous information about [!INCLUDE ssNoVersion].
CompanyName Company name that produces [!INCLUDE ssNoVersion]; for example, [!INCLUDE msCoName] Corporation.
FileDescription The operating system.
FileVersion Version of the [!INCLUDE ssNoVersion] executable.
InternalName [!INCLUDE msCoName] internal name for [!INCLUDE ssNoVersion]; for example, SQLSERVR.
LegalCopyright Legal copyright information required for [!INCLUDE ssNoVersion]; for example, Copyright© [!INCLUDE msCoName] Corp. 1988-2005.
LegalTrademarks Legal trademark information required for [!INCLUDE ssNoVersion]. For example, [!INCLUDE msCoName] is a registered trademark of [!INCLUDE msCoName] Corporation.
OriginalFilename File name executed at [!INCLUDE ssNoVersion] startup; for example, Sqlservr.exe.
PrivateBuild [!INCLUDE ssInternalOnly]
SpecialBuild [!INCLUDE ssInternalOnly]
WindowsVersion Version of [!INCLUDE msCoName] Windows that is installed on the computer that is running [!INCLUDE ssNoVersion].
ProcessorCount The number of processors in the computer that is running [!INCLUDE ssNoVersion].
ProcessorActiveMask Indicates the processors installed in the computer that is running [!INCLUDE ssNoVersion] that are started and usable by [!INCLUDE msCoName] Windows.
ProcessorType Processor type. Similar to Platform.
PhysicalMemory Amount in megabytes (MB) of RAM installed on the computer that is running [!INCLUDE ssNoVersion].
Product ID Product ID (PID) number. This is specified during installation. This number is located on a sticker on the original [!INCLUDE ssNoVersion] CD case.

Return code values

1 (success).

Result set

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.

Related content