Skip to content

Latest commit

 

History

History
56 lines (48 loc) · 4.19 KB

File metadata and controls

56 lines (48 loc) · 4.19 KB
title sys.dm_server_services (Transact-SQL) | Microsoft Docs
ms.custom
ms.date 03/28/2017
ms.prod sql-non-specified
ms.reviewer
ms.suite
ms.technology
database-engine
ms.tgt_pltfrm
ms.topic language-reference
f1_keywords
dm_server_services
sys.dm_server_services
sys.dm_server_services_TSQL
dm_server_services_TSQL
dev_langs
TSQL
helpviewer_keywords
sys.dm_server_services dynamic management view
ms.assetid 3f0defd0-478d-4e7f-96be-8795c9de4e3f
caps.latest.revision 9
author BYHAM
ms.author rickbyh
manager jhubbard

sys.dm_server_services (Transact-SQL)

[!INCLUDEtsql-appliesto-ss2008-xxxx-xxxx-xxx_md]

Returns information about the SQL Server, Full-Text, and SQL Server Agent services in the current instance of [!INCLUDEssNoVersion]. Use this dynamic management view to report status information about these services.

Column name Data type Description
servicename nvarchar(256) Name of the SQL Server, Full-text, or SQL Server Agent service. Cannot be null.
startup_type int Indicates the start mode of the service. The following are the possible values and their corresponding descriptions.

0: Other
1: Other
2: Automatic
3: Manual
4: Disabled

Is nullable.
startup_desc nvarchar(256) Describes the start mode of the service. The following are the possible values and their corresponding descriptions.

Other: Other (boot start)
Other: Other (system start)
Automatic: Auto start
Manual: Demand start
Disabled: Disabled

Cannot be null.
status int Indicates the current status of the service. The following are the possible values and their corresponding descriptions.

1: Stopped
2: Other (start pending)
3: Other (stop pending)
4: Running
5: Other (continue pending)
6: Other (pause pending)
7: Paused

Is nullable.
status_desc nvarchar(256) Describes the current status of the service. The following are the possible values and their corresponding descriptions.

Stopped: The service is stopped.
Other(start operation pending): The service is in the process of starting.
Other (stop operation pending): The service is in the process of stopping.
Running: The service is running.
Other (continue operations pending): The service is in a pending state.
Other (pause pending): The service is in the process of pausing.
Paused: The service is paused.

Cannot be null.
process_id int The process ID of the service. Cannot be null.
last_startup_time datetimeoffset(7) The date and time the service was last started. Is nullable.
service_account nvarchar(256) The account authorized to control the service. This account can start or stop the service, or modify service properties. Cannot be null.
filename nvarchar(256) The path and filename of the service executable. Cannot be null.
is_clustered nvarchar(1) Indicates whether the service is installed as a resource of a clustered server. Cannot be null.
cluster_nodename nvarchar(256) The name of the cluster node on which the service is installed. Is nullable.
instant_file_initialization_enabled nvarchar(1) Applies to: Starting [!INCLUDEssSQL15] SP1.

Specifies whether instant file initialization is enabled for SQL Server Database Engine service. This property does not apply to services (example: SQL Server Agent) other than SQL Server Database Engine service. nullable.

Y = instant file initialization is enabled for the service.

N = instant file initialization is disabled for the service.

Security

Permissions

Requires VIEW SERVER STATE permission on the server.

See Also

sys.dm_server_registry (Transact-SQL)