Friday, May 20, 2016

SQL Server SERVERPROPERTY - SQL Server 2016 TSQL Enhancements

SQL Server SERVERPROPERTY function was introduced with SQL Server 2008 and it was very useful for getting property information about the server instance. With SQL Server 2016, few new properties have been introduced for getting more information.

SELECT SERVERPROPERTY('ProductBuild') ProductBuild
 , SERVERPROPERTY('ProductBuildType') ProductBuildType
 , SERVERPROPERTY('ProductMajorVersion') ProductMajorVersion
 , SERVERPROPERTY('ProductMinorVersion') ProductMinorVersion
 , SERVERPROPERTY('ProductUpdateLevel') ProductUpdateLevel
 , SERVERPROPERTY('ProductUpdateReference') ProductUpdateReference
 , SERVERPROPERTY('IsPolybaseInstalled') IsPolybaseInstalled;


Note that ProductBuildType returns OD (On-demand - release for a specific customer, GDR (General Distribution Release - release with Windows Update) or NULL if not applicable.

ProductUpdateLevel returns CU (Cumulative Update) or NULL if not applicable.

ProductUpdateReference returns KB article for the release.

No comments: