Skip to content

Commit f9a338f

Browse files
authored
Merge pull request #177446 from dimitri-furman/dimitri-furman-6
Cleaned up section titles
2 parents 564450c + 4648cc6 commit f9a338f

File tree

2 files changed

+68
-68
lines changed

2 files changed

+68
-68
lines changed

articles/azure-sql/database/active-geo-replication-overview.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
---
22
title: Active geo-replication
3-
description: Use active geo-replication to create readable secondary databases of individual databases in Azure SQL Database in the same or different datacenter regions.
3+
description: Use active geo-replication to create readable secondary databases of individual databases in Azure SQL Database in the same or different regions.
44
ms.service: sql-database
55
ms.subservice: high-availability
66
ms.custom: sqldbrb=1
77
ms.topic: conceptual
88
author: emlisa
99
ms.author: emlisa
1010
ms.reviewer: mathoma
11-
ms.date: 10/19/2021
11+
ms.date: 10/25/2021
1212
---
1313

14-
# Creating and using active geo-replication - Azure SQL Database
14+
# Active geo-replication
1515
[!INCLUDE[appliesto-sqldb](../includes/appliesto-sqldb.md)]
1616

1717
Active geo-replication is a feature that lets you to create a continuously synchronized readable secondary database for a primary database. The readable secondary database may be in the same Azure region as the primary, or, more commonly, in a different region. This kind of readable secondary databases are also known as geo-secondaries, or geo-replicas.
@@ -110,14 +110,14 @@ To achieve full business continuity, adding database regional redundancy is only
110110

111111
A geo-secondary that has finished initial seeding can be explicitly switched to the primary role (failed over) at any time by the application or the user. During an outage where the primary is inaccessible, only an unplanned geo-failover can be used. That immediately promotes a geo-secondary to be the new primary. When the outage is mitigated, the system automatically makes the recovered primary a geo-secondary, and brings it up-to-date with the new primary. Due to the asynchronous nature of geo-replication, recent transactions may be lost during unplanned geo-failovers if the primary fails before these transactions are replicated to a geo-secondary. When a primary with multiple geo-secondaries fails over, the system automatically reconfigures replication relationships and links the remaining geo-secondaries to the newly promoted primary, without requiring any user intervention. After the outage that caused the geo-failover is mitigated, it may be desirable to return the primary to its original region. To do that, invoke a planned geo-failover.
112112

113-
## Preparing secondary database for failover
113+
## <a name="preparing-secondary-database-for-failover"></a> Prepare for geo-failover
114114

115115
To ensure that your application can immediately access the new primary after geo-failover, validate that authentication and network access for your secondary server are properly configured. For details, see [SQL Database security after disaster recovery](active-geo-replication-security-configure.md). Also validate that backup retention policy on the secondary database matches that of the primary. This setting is not a part of the database and is not replicated from the primary. By default, the geo-secondary is configured with a default PITR retention period of seven days. For details, see [SQL Database automated backups](automated-backups-overview.md).
116116

117117
> [!IMPORTANT]
118118
> If your database is a member of a failover group, you cannot initiate its failover using the geo-replication failover command. Use the failover command for the group. If you need to failover an individual database, you must remove it from the failover group first. See [Auto-failover groups](auto-failover-group-overview.md) for details.
119119
120-
## Configuring secondary database
120+
## <a name="configuring-secondary-database"></a> Configure geo-secondary
121121

122122
Both primary and geo-secondary are required to have the same service tier. It is also strongly recommended that the geo-secondary is configured with the same backup storage redundancy and compute size (DTUs or vCores) as the primary. If the primary is experiencing a heavy write workload, a geo-secondary with a lower compute size may not be able to keep up. That will cause replication lag on the geo-secondary, and may eventually cause unavailability of the geo-secondary. To mitigate these risks, active geo-replication will reduce (throttle) the primary's transaction log rate if necessary to allow its secondaries to catch up.
123123

@@ -201,13 +201,13 @@ To create a geo-secondary in a subscription different from the subscription of t
201201
>
202202
> Creating a geo-secondary on a logical server in a different Azure tenant is not supported when [Azure Active Directory only](https://techcommunity.microsoft.com/t5/azure-sql/azure-active-directory-only-authentication-for-azure-sql/ba-p/2417673) authentication for Azure SQL is active (enabled) on either primary or secondary logical server.
203203
204-
## Keeping credentials and firewall rules in sync
204+
## <a name="keeping-credentials-and-firewall-rules-in-sync"></a> Keep credentials and firewall rules in sync
205205

206206
When using public network access for connecting to the database, we recommend using [database-level IP firewall rules](firewall-configure.md) for geo-replicated databases. These rules are replicated with the database, which ensures that all geo-secondaries have the same IP firewall rules as the primary. This approach eliminates the need for customers to manually configure and maintain firewall rules on servers hosting the primary and secondary databases. Similarly, using [contained database users](logins-create-manage.md) for data access ensures both primary and secondary databases always have the same authentication credentials. This way, after a geo-failover, there is no disruptions due to authentication credential mismatches.
207207

208-
## Upgrading or downgrading primary database
208+
## <a name="upgrading-or-downgrading-primary-database"></a> Scale primary database
209209

210-
You can scale up or scale down a primary database to a different compute size (within the same service tier) without disconnecting any geo-secondaries. When scaling up, we recommend that you scale up the geo-secondary first, and then scale up the primary. When scaling down, reverse the order: scale down the primary first, and then scale down the secondary.
210+
You can scale up or scale down the primary database to a different compute size (within the same service tier) without disconnecting any geo-secondaries. When scaling up, we recommend that you scale up the geo-secondary first, and then scale up the primary. When scaling down, reverse the order: scale down the primary first, and then scale down the secondary.
211211

212212
> [!NOTE]
213213
> If you created a geo-secondary as part of failover group configuration, it is not recommended to scale it down. This is to ensure your data tier has sufficient capacity to process your regular workload after a geo-failover.
@@ -218,14 +218,14 @@ You can scale up or scale down a primary database to a different compute size (w
218218
> `The source database 'Primaryserver.DBName' cannot have higher edition than the target database 'Secondaryserver.DBName'. Upgrade the edition on the target before upgrading the source.`
219219
>
220220
221-
## Preventing the loss of critical data
221+
## <a name="preventing-the-loss-of-critical-data"></a> Prevent loss of critical data
222222

223223
Due to the high latency of wide area networks, geo-replication uses an asynchronous replication mechanism. Asynchronous replication makes the possibility of data loss unavoidable if the primary fails. To protect critical transactions from data loss, an application developer can call the [sp_wait_for_database_copy_sync](/sql/relational-databases/system-stored-procedures/active-geo-replication-sp-wait-for-database-copy-sync) stored procedure immediately after committing the transaction. Calling `sp_wait_for_database_copy_sync` blocks the calling thread until the last committed transaction has been transmitted and hardened in the transaction log of the secondary database. However, it does not wait for the transmitted transactions to be replayed (redone) on the secondary. `sp_wait_for_database_copy_sync` is scoped to a specific geo-replication link. Any user with the connection rights to the primary database can call this procedure.
224224

225225
> [!NOTE]
226226
> `sp_wait_for_database_copy_sync` prevents data loss after geo-failover for specific transactions, but does not guarantee full synchronization for read access. The delay caused by a `sp_wait_for_database_copy_sync` procedure call can be significant and depends on the size of the not yet transmitted transaction log on the primary at the time of the call.
227227
228-
## Monitoring geo-replication lag
228+
## <a name="monitoring-geo-replication-lag"></a> Monitor geo-replication lag
229229

230230
To monitor lag with respect to RPO, use *replication_lag_sec* column of [sys.dm_geo_replication_link_status](/sql/relational-databases/system-dynamic-management-views/sys-dm-geo-replication-link-status-azure-sql-database) on the primary database. It shows lag in seconds between the transactions committed on the primary, and hardened to the transaction log on the secondary. For example, if the lag is one second, it means that if the primary is impacted by an outage at this moment and a geo-failover is initiated, transactions committed in the last second will be lost.
231231

@@ -236,11 +236,11 @@ To measure lag with respect to changes on the primary database that have been ha
236236
>
237237
> There are also conditions that could cause the difference between *last_commit* time on the geo-secondary and on the primary to become large. For example, if a commit is made on the primary after a long period of no changes, the difference will jump up to a large value before quickly returning to zero. Consider sending an alert if the difference between these two values remains large for a long time.
238238
239-
## Programmatically managing active geo-replication
239+
## <a name="programmatically-managing-active-geo-replication"></a> Programmatically manage active geo-replication
240240

241241
As discussed previously, active geo-replication can also be managed programmatically using T-SQL, Azure PowerShell, and REST API. The following tables describe the set of commands available. Active geo-replication includes a set of Azure Resource Manager APIs for management, including the [Azure SQL Database REST API](/rest/api/sql/) and [Azure PowerShell cmdlets](/powershell/azure/). These APIs support Azure role-based access control (Azure RBAC). For more information on how to implement access roles, see [Azure role-based access control (Azure RBAC)](../../role-based-access-control/overview.md).
242242

243-
### T-SQL: Manage failover of single and pooled databases
243+
### <a name="t-sql-manage-failover-of-single-and-pooled-databases"></a> T-SQL: Manage geo-failover of single and pooled databases
244244

245245
> [!IMPORTANT]
246246
> These T-SQL commands only apply to active geo-replication and do not apply to failover groups. As such, they also do not apply to SQL Managed Instance, which only supports failover groups.
@@ -256,7 +256,7 @@ As discussed previously, active geo-replication can also be managed programmatic
256256
| [sys.sp_wait_for_database_copy_sync](/sql/relational-databases/system-stored-procedures/active-geo-replication-sp-wait-for-database-copy-sync) |Causes the application to wait until all committed transactions are hardened to the transaction log of a geo-secondary. |
257257
| | |
258258

259-
### PowerShell: Manage failover of single and pooled databases
259+
### <a name="powershell-manage-failover-of-single-and-pooled-databases"></a> PowerShell: Manage geo-failover of single and pooled databases
260260

261261
[!INCLUDE [updated-for-az](../../../includes/updated-for-az.md)]
262262
> [!IMPORTANT]
@@ -274,7 +274,7 @@ As discussed previously, active geo-replication can also be managed programmatic
274274
> [!TIP]
275275
> For sample scripts, see [Configure and failover a single database using active geo-replication](scripts/setup-geodr-and-failover-database-powershell.md) and [Configure and failover a pooled database using active geo-replication](scripts/setup-geodr-and-failover-elastic-pool-powershell.md).
276276
277-
### REST API: Manage failover of single and pooled databases
277+
### <a name="rest-api-manage-failover-of-single-and-pooled-databases"></a> REST API: Manage geo-failover of single and pooled databases
278278

279279
| API | Description |
280280
| --- | --- |

0 commit comments

Comments
 (0)