title | description | author | ms.author | ms.date | ms.service | ms.subservice | ms.topic | f1_keywords | helpviewer_keywords | dev_langs | ||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
sys.dm_server_registry (Transact-SQL) |
sys.dm_server_registry (Transact-SQL) |
rwestMSFT |
randolphwest |
02/27/2023 |
sql |
system-objects |
reference |
|
|
|
[!INCLUDE SQL Server]
Returns configuration and installation information that is stored in the Windows registry for the current instance of [!INCLUDEssNoVersion]. Returns one row per registry key. Use this dynamic management view to return information such as the [!INCLUDEssNoVersion] services that are available on the host machine or network configuration values for the instance of [!INCLUDEssNoVersion].
Column name | Data type | Description |
---|---|---|
registry_key | nvarchar(256) | Registry key name. Is nullable. |
value_name | nvarchar(256) | Key value name. This is the item shown in the Name column of the Registry Editor. Is nullable. |
value_data | sql_variant | Value of the key data. This is the value shown in the Data column of the Registry Editor for a given entry. Is nullable. |
Requires VIEW SERVER STATE permission on the server.
Requires VIEW SERVER PERFORMANCE STATE permission on the server.
The following example returns registry key values for the SQL Server and SQL Server Agent services for the current instance of SQL Server.
SELECT registry_key, value_name, value_data
FROM sys.dm_server_registry
WHERE registry_key LIKE N'%ControlSet%';
The following example returns the SQL Server Agent registry key values for the current instance of SQL Server.
SELECT registry_key, value_name, value_data
FROM sys.dm_server_registry
WHERE registry_key LIKE N'%SQLAgent%';
The following example returns the version of the current instance of SQL Server.
SELECT registry_key, value_name, value_data
FROM sys.dm_server_registry
WHERE value_name = N'CurrentVersion';
The following example returns the parameters that are passed to the instance of SQL Server during startup.
SELECT registry_key, value_name, value_data
FROM sys.dm_server_registry
WHERE registry_key LIKE N'%Parameters';
The following example returns network configuration values for the current instance of SQL Server.
SELECT registry_key, value_name, value_data
FROM sys.dm_server_registry
WHERE registry_key LIKE N'%SuperSocketNetLib%';