![]() |
![]() |
![]() |
SERVERPROPERTY is an inbuilt function which gives you information about the server instance.
This is Part 10 of 10 Part T-SQL Enhancements in SQL Server 2016 for Developers and DBAs. Click here to read it from the beginning….
Starting SQL Server 2016, this function is enhancement to include new properties such as InstanceDefaultDataPath, InstanceDefaultLogPath, ProductBuild, ProductBuildType, ProductMajorVersion, ProductMinorVersion, ProductUpdateLevel, and ProductUpdateReference.
SELECT
SERVERPROPERTY('ProductVersion') AS ProductVersion,
SERVERPROPERTY('ProductLevel') AS ProductLevel,
SERVERPROPERTY('Edition') AS Edition,
SERVERPROPERTY('EngineEdition') AS EngineEdition,
SERVERPROPERTY('InstanceDefaultDataPath') AS InstanceDefaultDataPath,
SERVERPROPERTY('InstanceDefaultLogPath') AS InstanceDefaultLogPath,
SERVERPROPERTY('ProductBuild') AS ProductBuild,
SERVERPROPERTY('ProductBuildType') AS ProductBuildType,
SERVERPROPERTY('ProductMajorVersion') AS ProductMajorVersion,
SERVERPROPERTY('ProductMinorVersion' AS ProductMinorVersion,
SERVERPROPERTY('ProductUpdateLevel') AS ProductUpdateLevel,
SERVERPROPERTY('ProductUpdateReference') AS ProductUpdateReference
GO
For More information, see, SERVERPROPERTY Function in SQL Server.
Trending SQL Server Articles and Tips
- How to Move TempDB to New Drive in SQL Server
- How to Start SQL Server in Single User Mode?
- How to Fix PowerShell Execution Policy Error in Windows Server
- How to Identify SQL Server Cluster Node and Shared Drives Information Using TSQL Queries
- How to Configuring Database Instant File Initialization Feature of SQL Server
Click the Next Page button to continue reading about Tutorial: Different Database Backup Options in SQL Server and click on the Previous Page button to revisit the previous topic .
![]() |
![]() |
![]() |
Related Topics
- TRUNCATE TABLE WITH PARTITIONS
- DROP IF EXISTS
- ALTER TABLE WITH (ONLINE = ON | OFF)
- MAXDOP for DBCC CHECKDB, DBCC CHECKTABLE and DBCC CHECKFILEGROUP
- ALTER DATABASE SET AUTOGROW_SINGLE_FILE
- ALTER DATABASE SET AUTOGROW_ALL_FILES
- COMPRESS and DECOMPRESS Functions
- STRING_SPLIT and STRING_ESCAPE Functions
- FORMATMESSAGE Statement
- SERVERPROPERTY Function