xp_msver (Transact-SQL)

xp_msver (Transact-SQL)

 

Returns version information about Microsoft SQL Server. 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 Transact-SQL statements, batches, stored procedures, and so on, to enhance logic for platform-independent code.

Applies to: SQL Server (SQL Server 2008 through current version).

Topic link icon Transact-SQL Syntax Conventions

  
xp_msver [ optname ]  

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

Option/Column nameDescription
ProductNameProduct name; for example, Microsoft SQL Server.
ProductVersionProduct version.
LanguageThe language version of SQL Server.
PlatformOperating-system name, manufacturer name, and chip family name for the computer that is running SQL Server.
CommentsMiscellaneous information about SQL Server.
CompanyNameCompany name that produces SQL Server; for example, Microsoft Corporation.
FileDescriptionThe operating system.
FileVersionVersion of the SQL Server executable.
InternalNameMicrosoft internal name for SQL Server; for example, SQLSERVR.
LegalCopyrightLegal copyright information required for SQL Server; for example, Copyright© Microsoft Corp. 1988-2005.
LegalTrademarksLegal trademark information required for SQL Server. For example, Microsoft is a registered trademark of Microsoft Corporation.
OriginalFilenameFile name executed at SQL Server startup; for example, Sqlservr.exe.
PrivateBuildIdentified for informational purposes only. Not supported. Future compatibility is not guaranteed.
SpecialBuildIdentified for informational purposes only. Not supported. Future compatibility is not guaranteed.
WindowsVersionVersion of Microsoft Windows that is installed on the computer that is running SQL Server.
ProcessorCountThe number of processors in the computer that is running SQL Server.
ProcessorActiveMaskIndicates the processors installed in the computer that is running SQL Server that are started and usable by Microsoft Windows.
ProcessorTypeProcessor type. Similar to Platform.
PhysicalMemoryAmount in megabytes (MB) of RAM installed on the computer that is running SQL Server.
Product IDProduct ID (PID) number. This is specified during installation. This number is located on a sticker on the original SQL Server 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)

Community Additions

ADD
Show:
© 2016 Microsoft