sys.availability_databases_cluster (Transact-SQL)

 

Updated: June 10, 2016

THIS TOPIC APPLIES TO: yesSQL Server (starting with 2012)noAzure SQL DatabasenoAzure SQL Data Warehouse noParallel Data Warehouse

Contains one row for each availability database on the instance of SQL Server 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.

System_CAPS_ICON_note.jpg Note


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.

Column nameData typeDescription
group_iduniqueidentifierUnique identifier of the availability group in which the availability group, if any, in which the database is participating.

NULL = database is not part of an availability replica of in availability group.
group_database_iduniqueidentifierUnique 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.

NULL = database is not part of an availability replica in any availability group.
database_namesysnameName of the database that was added to the availability group.

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.

sys.availability_groups (Transact-SQL)
sys.databases (Transact-SQL)
sys.dm_hadr_database_replica_states (Transact-SQL)
sys.dm_hadr_database_replica_cluster_states (Transact-SQL)
Overview of Always On Availability Groups (SQL Server)

Community Additions

ADD
Show: