Skip to content

Commit a0bb1b4

Browse files
authored
Add SQL Server 2022+ granular permissions to 21 catalog view articles (#36563)
* docs: Add SQL Server 2022+ granular permissions to 21 catalog views Add VIEW SERVER PERFORMANCE STATE and VIEW SERVER SECURITY STATE permissions to system catalog view documentation based on source code investigation. Permission changes verified against SQL Server source code (secrules.h, mdview.cpp FHasAccess function). * docs: Apply editorial review to catalog view documentation - Update ms.date to 02/05/2026 for modernized files - Improve description metadata (not just repeating title) - Modernize table formatting with backticks for column names - Use contractions and active voice per Style Guide - Convert Related content sections to bullet list format - Remove HTML entities and fix spacing issues - Fix typo 'Name pipes' to 'Named pipes' in sys.endpoints * docs: Apply comprehensive contraction fixes per Style Guide - Fix 'does not' → 'doesn't' throughout - Fix 'is not' → 'isn't' in table descriptions - Fix 'are not' → 'aren't' in method descriptions - Fix 'was not' → 'wasn't' and 'will not' → 'won't' - Fix 'have not' → 'haven't' in query context * docs: Fix 'may' → 'might' per Style Guide - sys-configurations-transact-sql.md (3 occurrences) - sys-master-key-passwords-transact-sql.md (1 occurrence)
1 parent 1ec126f commit a0bb1b4

21 files changed

Lines changed: 528 additions & 412 deletions
Lines changed: 28 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
22
title: "sys.availability_databases_cluster (Transact-SQL)"
3-
description: sys.availability_databases_cluster (Transact-SQL)
3+
description: sys.availability_databases_cluster returns a row for each availability database in the WSFC cluster.
44
author: rwestMSFT
55
ms.author: randolphwest
6-
ms.date: "06/10/2016"
6+
ms.date: 02/05/2026
77
ms.service: sql
88
ms.subservice: system-objects
99
ms.topic: "reference"
@@ -21,27 +21,32 @@ dev_langs:
2121
- "TSQL"
2222
---
2323
# sys.availability_databases_cluster (Transact-SQL)
24+
2425
[!INCLUDE [SQL Server](../../includes/applies-to-version/sqlserver.md)]
2526

26-
Contains one row for each availability database on the instance of [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] that is hosting an availability replica for any Always On availability group in the Windows Server Failover Clustering (WSFC) cluster, regardless of whether the local copy database has been joined to the availability group yet.
27-
28-
> [!NOTE]
29-
> When a database is added to an availability group, the primary database is automatically joined to the group. Secondary databases must be prepared on each secondary replica before they can be joined to the availability group.
30-
31-
|Column name|Data type|Description|
32-
|-----------------|---------------|-----------------|
33-
|**group_id**|**uniqueidentifier**|Unique identifier of the availability group in which the availability group, if any, in which the database is participating.<br /><br /> NULL = database is not part of an availability replica of in availability group.|
34-
|**group_database_id**|**uniqueidentifier**|Unique identifier of the database within the availability group, if any, in which the database is participating. **group_database_id** is the same for this database on the primary replica and on every secondary replica on which the database has been joined to the availability group.<br /><br /> NULL = database is not part of an availability replica in any availability group.|
35-
|**database_name**|**sysname**|Name of the database that was added to the availability group.|
36-
37-
## Permissions
38-
If the caller of **sys.availability_databases_cluster** is not the owner of the database, the minimum permissions required to see the corresponding row are ALTER ANY DATABASE or VIEW ANY DATABASE server-level permission, or CREATE DATABASE permission in the **master** database.
39-
40-
## See Also
41-
[sys.availability_groups &#40;Transact-SQL&#41;](../../relational-databases/system-catalog-views/sys-availability-groups-transact-sql.md)
42-
[sys.databases &#40;Transact-SQL&#41;](../../relational-databases/system-catalog-views/sys-databases-transact-sql.md)
43-
[sys.dm_hadr_database_replica_states &#40;Transact-SQL&#41;](../../relational-databases/system-dynamic-management-views/sys-dm-hadr-database-replica-states-transact-sql.md)
44-
[sys.dm_hadr_database_replica_cluster_states &#40;Transact-SQL&#41;](../../relational-databases/system-dynamic-management-views/sys-dm-hadr-database-replica-cluster-states-transact-sql.md)
45-
[Overview of Always On Availability Groups &#40;SQL Server&#41;](../../database-engine/availability-groups/windows/overview-of-always-on-availability-groups-sql-server.md)
46-
27+
Returns one row for each availability database on the instance of [!INCLUDE [ssNoVersion](../../includes/ssnoversion-md.md)] that hosts an availability replica for any Always On availability group in the Windows Server Failover Clustering (WSFC) cluster, regardless of whether the local copy database has been joined to the availability group yet.
28+
29+
> [!NOTE]
30+
> When a database is added to an availability group, the primary database is automatically joined to the group. Secondary databases must be prepared on each secondary replica before they can be joined to the availability group.
31+
32+
| Column name | Data type | Description |
33+
| --- | --- | --- |
34+
| `group_id` | **uniqueidentifier** | Unique identifier of the availability group in which the database is participating.<br /><br />NULL = database isn't part of an availability replica in an availability group. |
35+
| `group_database_id` | **uniqueidentifier** | Unique identifier of the database within the availability group, if any, in which the database is participating. `group_database_id` is the same for this database on the primary replica and on every secondary replica on which the database has been joined to the availability group.<br /><br />NULL = database isn't part of an availability replica in any availability group. |
36+
| `database_name` | **sysname** | Name of the database that was added to the availability group. |
4737

38+
## Permissions
39+
40+
If the caller of **sys.availability_databases_cluster** isn't the owner of the database, the minimum permissions required to see the corresponding row are ALTER ANY DATABASE or VIEW ANY DATABASE server-level permission, or CREATE DATABASE permission in the **master** database.
41+
42+
### Permissions for SQL Server 2022 and later
43+
44+
Requires VIEW SERVER PERFORMANCE STATE permission on the server.
45+
46+
## Related content
47+
48+
- [sys.availability_groups (Transact-SQL)](sys-availability-groups-transact-sql.md)
49+
- [sys.databases (Transact-SQL)](sys-databases-transact-sql.md)
50+
- [sys.dm_hadr_database_replica_states (Transact-SQL)](../system-dynamic-management-views/sys-dm-hadr-database-replica-states-transact-sql.md)
51+
- [sys.dm_hadr_database_replica_cluster_states (Transact-SQL)](../system-dynamic-management-views/sys-dm-hadr-database-replica-cluster-states-transact-sql.md)
52+
- [What is an Always On availability group?](../../database-engine/availability-groups/windows/overview-of-always-on-availability-groups-sql-server.md)
Lines changed: 30 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
22
title: "sys.availability_group_listener_ip_addresses (Transact-SQL)"
3-
description: sys.availability_group_listener_ip_addresses (Transact-SQL)
3+
description: sys.availability_group_listener_ip_addresses returns a row for every IP address associated with any availability group listener.
44
author: rwestMSFT
55
ms.author: randolphwest
6-
ms.date: "06/10/2016"
6+
ms.date: 02/05/2026
77
ms.service: sql
88
ms.subservice: system-objects
99
ms.topic: "reference"
@@ -20,32 +20,36 @@ dev_langs:
2020
- "TSQL"
2121
---
2222
# sys.availability_group_listener_ip_addresses (Transact-SQL)
23+
2324
[!INCLUDE [SQL Server](../../includes/applies-to-version/sqlserver.md)]
2425

25-
Returns a row for every IP address that is associated with any Always On availability group listener in the Windows Server Failover Clustering (WSFC) cluster.
26-
27-
Primary key: **listener_id** + **ip_address** + **ip_sub_mask**
28-
29-
30-
|Column name|Data type|Description|
31-
|-----------------|---------------|-----------------|
32-
|**listener_id**|**nvarchar(36)**|Resource GUID from Windows Server Failover Clustering (WSFC) cluster.|
33-
|**ip_address**|**nvarchar(48)**|Configured virtual IP address of the availability group listener. Returns a single IPv4 or IPv6 address.|
34-
|**ip_subnet_mask**|**nvarchar(15)**|Configured IP subnet mask for the IPv4 address, if any, that is configured for the availability group listener.<br /><br /> NULL = IPv6 subnet|
35-
|**is_dhcp**|**bit**|Whether the IP address is configured by DHCP, one of:<br /><br /> 0 = IP address is not configured by DHCP.<br /><br /> 1 = IP address is configured by DHCP|
36-
|**network_subnet_ip**|**nvarchar(48)**|Network subnet IP address that specifies the subnet to which the IP address belongs.|
37-
|**network_subnet_prefix_length**|**int**|Network subnet prefix length of the subnet to which the IP address belongs.|
38-
|**network_subnet_ipv4_mask**|**nvarchar(45)**|Network subnet mask of the subnet to which the IP address belongs. **network_subnet_ipv4_mask** to specify the DHCP <network_subnet_option> options in a WITH DHCP clause of the [CREATE AVAILABILITY GROUP](../../t-sql/statements/create-availability-group-transact-sql.md) or [ALTER AVAILABILITY GROUP](../../t-sql/statements/alter-availability-group-transact-sql.md)[!INCLUDE[tsql](../../includes/tsql-md.md)] statement.<br /><br /> NULL = IPv6 subnet|
39-
|**state**|**tinyint**|IP resource ONLINE/OFFLINE state from the WSFC cluster, one of:<br /><br /> 1 = Online. IP resource is online.<br /><br /> 0 = Offline. IP resource is offline.<br /><br /> 2 = Online Pending. IP resource is offline but is being brought online.<br /><br /> 3 = Failed. IP resource was being brought online but failed.|
40-
|**state_desc**|**nvarchar(60)**|Description of **state**, one of:<br /><br /> ONLINE<br /><br /> OFFLINE<br /><br /> ONLINE_PENDING<br /><br /> FAILED|
26+
Returns a row for every IP address that is associated with any Always On availability group listener in the Windows Server Failover Clustering (WSFC) cluster.
27+
28+
Primary key: `listener_id` + `ip_address` + `ip_sub_mask`
29+
30+
| Column name | Data type | Description |
31+
| --- | --- | --- |
32+
| `listener_id` | **nvarchar(36)** | Resource GUID from Windows Server Failover Clustering (WSFC) cluster. |
33+
| `ip_address` | **nvarchar(48)** | Configured virtual IP address of the availability group listener. Returns a single IPv4 or IPv6 address. |
34+
| `ip_subnet_mask` | **nvarchar(15)** | Configured IP subnet mask for the IPv4 address, if any, that is configured for the availability group listener.<br /><br />NULL = IPv6 subnet |
35+
| `is_dhcp` | **bit** | Whether the IP address is configured by DHCP, one of:<br /><br />0 = IP address isn't configured by DHCP.<br /><br />1 = IP address is configured by DHCP |
36+
| `network_subnet_ip` | **nvarchar(48)** | Network subnet IP address that specifies the subnet to which the IP address belongs. |
37+
| `network_subnet_prefix_length` | **int** | Network subnet prefix length of the subnet to which the IP address belongs. |
38+
| `network_subnet_ipv4_mask` | **nvarchar(45)** | Network subnet mask of the subnet to which the IP address belongs. Use `network_subnet_ipv4_mask` to specify the DHCP `<network_subnet_option>` options in a WITH DHCP clause of the [CREATE AVAILABILITY GROUP](../../t-sql/statements/create-availability-group-transact-sql.md) or [ALTER AVAILABILITY GROUP](../../t-sql/statements/alter-availability-group-transact-sql.md) [!INCLUDE [tsql](../../includes/tsql-md.md)] statement.<br /><br />NULL = IPv6 subnet |
39+
| `state` | **tinyint** | IP resource ONLINE/OFFLINE state from the WSFC cluster, one of:<br /><br />1 = Online. IP resource is online.<br /><br />0 = Offline. IP resource is offline.<br /><br />2 = Online Pending. IP resource is offline but is being brought online.<br /><br />3 = Failed. IP resource was being brought online but failed. |
40+
| `state_desc` | **nvarchar(60)** | Description of `state`, one of:<br /><br />ONLINE<br /><br />OFFLINE<br /><br />ONLINE_PENDING<br /><br />FAILED |
4141

4242
## Security
4343

44-
### Permissions
45-
[!INCLUDE[ssCatViewPerm](../../includes/sscatviewperm-md.md)] For more information, see [Metadata Visibility Configuration](../../relational-databases/security/metadata-visibility-configuration.md).
46-
47-
## See Also
48-
[Querying the SQL Server System Catalog FAQ](../../relational-databases/system-catalog-views/querying-the-sql-server-system-catalog-faq.yml)
49-
[Catalog Views &#40;Transact-SQL&#41;](../../relational-databases/system-catalog-views/catalog-views-transact-sql.md)
50-
51-
44+
### Permissions
45+
46+
[!INCLUDE [ssCatViewPerm](../../includes/sscatviewperm-md.md)] For more information, see [Metadata Visibility Configuration](../../relational-databases/security/metadata-visibility-configuration.md).
47+
48+
#### Permissions for SQL Server 2022 and later
49+
50+
Requires VIEW SERVER PERFORMANCE STATE permission on the server.
51+
52+
## Related content
53+
54+
- [Querying the SQL Server System Catalog FAQ](querying-the-sql-server-system-catalog-faq.yml)
55+
- [Catalog Views (Transact-SQL)](catalog-views-transact-sql.md)

docs/relational-databases/system-catalog-views/sys-availability-group-listeners-transact-sql.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
22
title: "sys.availability_group_listeners (Transact-SQL)"
3-
description: sys.availability_group_listeners (Transact-SQL)
3+
description: sys.availability_group_listeners returns a row for each availability group listener configuration in the WSFC cluster.
44
author: rwestMSFT
55
ms.author: randolphwest
6-
ms.date: 09/27/2023
6+
ms.date: 02/05/2026
77
ms.service: sql
88
ms.subservice: system-objects
99
ms.topic: "reference"
@@ -26,7 +26,7 @@ dev_langs:
2626
For each Always On availability group, returns either zero rows indicating that no network name is associated with the availability group, or returns a row for each availability-group listener configuration in the Windows Server Failover Clustering (WSFC) cluster. This view displays the real-time configuration gathered from cluster.
2727

2828
> [!NOTE]
29-
> This catalog view does not describe details of an IP configuration, that was defined in the WSFC cluster.
29+
> This catalog view doesn't describe details of an IP configuration that was defined in the WSFC cluster.
3030
3131
| Column name | Data type | Description |
3232
| --- | --- | --- |
@@ -44,7 +44,11 @@ For each Always On availability group, returns either zero rows indicating that
4444

4545
[!INCLUDE [ssCatViewPerm](../../includes/sscatviewperm-md.md)] For more information, see [Metadata Visibility Configuration](../../relational-databases/security/metadata-visibility-configuration.md).
4646

47-
## See also
47+
#### Permissions for SQL Server 2022 and later
48+
49+
Requires VIEW SERVER PERFORMANCE STATE permission on the server.
50+
51+
## Related content
4852

4953
- [Always On Availability Groups Dynamic Management Views and Functions (Transact-SQL)](../../relational-databases/system-dynamic-management-views/always-on-availability-groups-dynamic-management-views-functions.md)
5054
- [Always On Availability Groups Catalog Views (Transact-SQL)](../../relational-databases/system-catalog-views/always-on-availability-groups-catalog-views-transact-sql.md)

docs/relational-databases/system-catalog-views/sys-availability-groups-cluster-transact-sql.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ Returns a row for each Always On availability group in Windows Server Failover C
4444

4545
Requires VIEW ANY DEFINITION permission on the server instance.
4646

47+
### Permissions for SQL Server 2022 and later
48+
49+
Requires VIEW SERVER PERFORMANCE STATE permission on the server.
50+
4751
## Related content
4852

4953
- [sys.availability_replicas (Transact-SQL)](sys-availability-replicas-transact-sql.md)

docs/relational-databases/system-catalog-views/sys-availability-groups-transact-sql.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ The following table describes the possible failure condition levels for the `fai
6161

6262
Requires `VIEW ANY DEFINITION` permission on the server instance.
6363

64+
### Permissions for SQL Server 2022 and later
65+
66+
Requires `VIEW SERVER PERFORMANCE STATE` permission on the server.
67+
6468
## Related content
6569

6670
- [sys.availability_replicas (Transact-SQL)](sys-availability-replicas-transact-sql.md)
Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
22
title: "sys.availability_read_only_routing_lists (Transact-SQL)"
3-
description: sys.availability_read_only_routing_lists (Transact-SQL)
3+
description: sys.availability_read_only_routing_lists returns a row for the read-only routing list of each availability replica.
44
author: rwestMSFT
55
ms.author: randolphwest
6-
ms.date: "06/10/2016"
6+
ms.date: 02/05/2026
77
ms.service: sql
88
ms.subservice: system-objects
99
ms.topic: "reference"
@@ -23,23 +23,28 @@ dev_langs:
2323
- "TSQL"
2424
---
2525
# sys.availability_read_only_routing_lists (Transact-SQL)
26+
2627
[!INCLUDE [SQL Server](../../includes/applies-to-version/sqlserver.md)]
2728

28-
Returns a row for the read only routing list of each availability replica in an Always On availability group in the WSFC failover cluster.
29-
30-
|Column name|Data type|Description|
31-
|-----------------|---------------|-----------------|
32-
|**replica_id**|**uniqueidentifier**|Unique ID of the availability replica that owns the routing list.|
33-
|**routing_priority**|**int**|Priority order for routing (1 is first, 2 is second, and so forth).|
34-
|**read_only_replica_id**|**uniqueidentifier**|Unique ID of the availability replica to which a read-only workload will be routed.|
35-
36-
## Permissions
37-
[!INCLUDE[ssCatViewPerm](../../includes/sscatviewperm-md.md)] For more information, see [Metadata Visibility Configuration](../../relational-databases/security/metadata-visibility-configuration.md).
38-
39-
## See Also
40-
[Always On Availability Groups Dynamic Management Views and Functions &#40;Transact-SQL&#41;](../../relational-databases/system-dynamic-management-views/always-on-availability-groups-dynamic-management-views-functions.md)
41-
[Always On Availability Groups Catalog Views &#40;Transact-SQL&#41;](../../relational-databases/system-catalog-views/always-on-availability-groups-catalog-views-transact-sql.md)
42-
[Monitor Availability Groups &#40;Transact-SQL&#41;](../../database-engine/availability-groups/windows/monitor-availability-groups-transact-sql.md)
43-
[Always On Availability Groups &#40;SQL Server&#41;](../../database-engine/availability-groups/windows/overview-of-always-on-availability-groups-sql-server.md)
44-
29+
Returns a row for the read-only routing list of each availability replica in an Always On availability group in the WSFC failover cluster.
30+
31+
| Column name | Data type | Description |
32+
| --- | --- | --- |
33+
| `replica_id` | **uniqueidentifier** | Unique ID of the availability replica that owns the routing list. |
34+
| `routing_priority` | **int** | Priority order for routing (1 is first, 2 is second, and so forth). |
35+
| `read_only_replica_id` | **uniqueidentifier** | Unique ID of the availability replica to which a read-only workload is routed. |
4536

37+
## Permissions
38+
39+
[!INCLUDE [ssCatViewPerm](../../includes/sscatviewperm-md.md)] For more information, see [Metadata Visibility Configuration](../../relational-databases/security/metadata-visibility-configuration.md).
40+
41+
### Permissions for SQL Server 2022 and later
42+
43+
Requires VIEW SERVER PERFORMANCE STATE permission on the server.
44+
45+
## Related content
46+
47+
- [Always On Availability Groups Dynamic Management Views and Functions (Transact-SQL)](../system-dynamic-management-views/always-on-availability-groups-dynamic-management-views-functions.md)
48+
- [Always On Availability Groups Catalog Views (Transact-SQL)](always-on-availability-groups-catalog-views-transact-sql.md)
49+
- [Monitor Availability Groups (Transact-SQL)](../../database-engine/availability-groups/windows/monitor-availability-groups-transact-sql.md)
50+
- [What is an Always On availability group?](../../database-engine/availability-groups/windows/overview-of-always-on-availability-groups-sql-server.md)

0 commit comments

Comments
 (0)