--- title: "Always On Availability Groups Functions (Transact-SQL) | Microsoft Docs" ms.custom: "" ms.date: "03/17/2017" ms.prod: sql ms.prod_service: "database-engine" ms.reviewer: "" ms.technology: system-objects ms.topic: "language-reference" dev_langs: - "TSQL" ms.assetid: 293cc233-8688-4823-9887-176ed772f53d author: MikeRayMSFT ms.author: mikeray --- # Always On Availability Groups Functions (Transact-SQL) [!INCLUDE[tsql-appliesto-ss2012-xxxx-xxxx-xxx-md](../../includes/tsql-appliesto-ss2012-xxxx-xxxx-xxx-md.md)] [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] provides the following Always On Availability Groups functions. ## In This Section [sys.fn_hadr_is_primary_replica](../../relational-databases/system-functions/sys-fn-hadr-is-primary-replica-transact-sql.md) [sys.fn_hadr_backup_is_preferred_replica](../../relational-databases/system-functions/sys-fn-hadr-backup-is-preferred-replica-transact-sql.md) [sys.fn_hadr_distributed_ag_replica](../../relational-databases/system-functions/sys-fn-hadr-distributed-ag-replica-transact-sql.md) [sys.fn_hadr_distributed_ag_database_replica](../../relational-databases/system-functions/sys-fn-hadr-distributed-ag-database-replica-transact-sql.md)