Skip to content

Commit 8559f55

Browse files
Merge pull request #34476 from AttinderPalSingh/docs-editor/create-availability-group-tran-1750339635
Learn Editor: Update create-availability-group-transact-sql.md
2 parents d929352 + 525f119 commit 8559f55

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

docs/t-sql/statements/create-availability-group-transact-sql.md

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
---
22
title: "CREATE AVAILABILITY GROUP (Transact-SQL)"
3-
description: CREATE AVAILABILITY GROUP (Transact-SQL)
3+
description: Creates a new availability group, if the instance of SQL Server is enabled for availability groups feature.
44
author: "MikeRayMSFT"
55
ms.author: "mikeray"
6-
ms.date: 05/19/2025
6+
ms.date: 06/19/2025
77
ms.service: sql
88
ms.subservice: t-sql
99
ms.topic: reference
10+
ms.custom:
11+
- build-2025
1012
f1_keywords:
1113
- "AVAILABILITY GROUP"
1214
- "CREATE_AVAILABILITY_TSQL"
@@ -21,8 +23,6 @@ helpviewer_keywords:
2123
- "Availability Groups [SQL Server], Transact-SQL statements"
2224
dev_langs:
2325
- "TSQL"
24-
ms.custom:
25-
- build-2025
2626
---
2727

2828
# CREATE AVAILABILITY GROUP (Transact-SQL)
@@ -56,8 +56,8 @@ CREATE AVAILABILITY GROUP group_name
5656
| DTC_SUPPORT = { PER_DB | NONE }
5757
| [ BASIC | DISTRIBUTED | CONTAINED [ REUSE_SYSTEM_DATABASES | AUTOSEEDING_SYSTEM_DATABASES ] ]
5858
| REQUIRED_SYNCHRONIZED_SECONDARIES_TO_COMMIT = { integer }
59-
| CLUSTER_TYPE = { WSFC | EXTERNAL | NONE }
60-
59+
| CLUSTER_TYPE = { WSFC | EXTERNAL | NONE }
60+
| WRITE_LEASE_VALIDITY = { seconds }
6161
6262
<add_replica_spec>::=
6363
<server_instance> WITH
@@ -230,6 +230,14 @@ Not supported for CREATE AVAILABILITY GROUP. Beginning with [!INCLUDE [sssql22-m
230230

231231
Used to identify if the availability group is on a Windows Server Failover Cluster (WSFC). Set to WSFC when availability group is on a failover cluster instance on a Windows Server failover cluster. Set to EXTERNAL when the cluster is managed by a cluster manager that isn't a Windows Server failover cluster, like Linux Pacemaker. Set to NONE when availability group not using WSFC for cluster coordination. For example, when an availability group includes Linux servers with no cluster manager.
232232

233+
#### WRITE_LEASE_VALIDITY
234+
235+
**Applies to:** [!INCLUDE[sssql17-md](../../includes/sssql17-md.md)] and later versions.
236+
237+
Specifies the lease time (in seconds) before it expires or needs renewal. This monitors the health and communication between local cluster orchestrator and SQL Server instance processes. The lease validity mechanism uses *heartbeat* signals to the availability group primary SQL Server instance. If the primary fails to send or receive a lease renewal within the lease validity period, it's considered unresponsive, and the primary will go offline. This mechanism prevents split-brain situations when the cluster orchestrator cannot notify SQL Server to stop being primary when a new primary is elected by a failover. It is applicable only for `CLUSTER_TYPE = EXTERNAL`, when the cluster is managed by a cluster manager that isn't a Windows Server failover cluster, like Linux Pacemaker.
238+
239+
The external orchestrator is responsible to ensure the external lease renewal process is consistently stable. If the lease renew message is unexpectedly missed, the current AG replica is set offline, which causes AG availability loss.
240+
233241
#### DATABASE *database_name*
234242

235243
Specifies a list of one or more user databases on the local [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] instance (that is, the server instance on which you're creating the availability group). You can specify multiple databases for an availability group, but each database can belong to only one availability group. For information about the type of databases that an availability group can support, see [Prerequisites, Restrictions, and Recommendations for Always On availability groups &#40;SQL Server&#41;](../../database-engine/availability-groups/windows/prereqs-restrictions-recommendations-always-on-availability.md). To find out which local databases already belong to an availability group, see the **replica_id** column in the [sys.databases](../../relational-databases/system-catalog-views/sys-databases-transact-sql.md) catalog view.

0 commit comments

Comments
 (0)