Skip to content

Commit a63f392

Browse files
20240926 cross-sub geoDR portal
1 parent 0284828 commit a63f392

10 files changed

+92
-59
lines changed

azure-sql/database/active-geo-replication-configure-portal.md

+46-45
Large diffs are not rendered by default.

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

+44-13
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Use active geo-replication to create readable secondary databases o
44
author: rajeshsetlem
55
ms.author: rsetlem
66
ms.reviewer: wiassaf, mathoma, arvindsh
7-
ms.date: 09/13/2024
7+
ms.date: 09/25/2024
88
ms.service: azure-sql-database
99
ms.subservice: high-availability
1010
ms.topic: conceptual
@@ -27,7 +27,7 @@ Active geo-replication is designed as a business continuity solution. Active geo
2727

2828
The following diagram illustrates a typical configuration of a geo-redundant cloud application using Active geo-replication.
2929

30-
:::image type="content" source="media/active-geo-replication-overview/geo-replication-updated.png" alt-text="Diagram of active geo-replication." lightbox="media/active-geo-replication-overview/geo-replication-updated.png":::
30+
:::image type="content" source="media/active-geo-replication-overview/geo-replication-updated.png" alt-text="Diagram of active geo-replication.":::
3131

3232
If for any reason your primary database fails, you can initiate a geo-failover to any of your secondary databases. When a secondary is promoted to the primary role, all other secondaries are automatically linked to the new primary.
3333

@@ -105,14 +105,18 @@ To achieve full business continuity, adding database regional redundancy is only
105105

106106
If your secondary replica is used _only_ for disaster recovery (DR) and doesn't have any read or write workloads, you can designate the replica as [standby](standby-replica-how-to-configure.md) to save on licensing costs.
107107

108-
## <a id="preparing-secondary-database-for-failover"></a> Prepare for geo-failover
108+
<a id="preparing-secondary-database-for-failover"></a>
109+
110+
## Prepare for geo-failover
109111

110112
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 [Configure and manage Azure SQL Database security for geo-restore or failover](active-geo-replication-security-configure.md). Also validate that backup retention policy on the secondary database matches that of the primary. This setting isn't a part of the database and isn't replicated from the primary. By default, the geo-secondary is configured with a default PITR retention period of seven days. For more information, see [Automated backups in Azure SQL Database](automated-backups-overview.md).
111113

112114
> [!IMPORTANT]
113115
> 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. For more information, see [Failover groups overview & best practices (Azure SQL Database)](failover-group-sql-db.md).
114116
115-
## <a id="configuring-secondary-database"></a> Configure geo-secondary
117+
<a id="configuring-secondary-database"></a>
118+
119+
## Configure geo-secondary
116120

117121
Both the primary and geo-secondary are required to have the same service tier. It's also strongly recommended that the geo-secondary is configured with the same backup storage redundancy, [compute tier](./service-tiers-sql-database-vcore.md#compute) (provisioned or serverless) 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 might not be able to keep up. That causes replication lag on the geo-secondary, and might eventually cause unavailability of the geo-secondary. To mitigate these risks, active geo-replication reduces (throttles) the primary's transaction log rate if necessary to allow its secondaries to catch up.
118122

@@ -135,13 +139,29 @@ Review [license-free standby replica](standby-replica-how-to-configure.md) to le
135139

136140
## Cross-subscription geo-replication
137141

138-
Use Transact-SQL (T-SQL) or the [Databases Create or Update REST API](/rest/api/sql/databases/create-or-update) to create a geo-secondary in a subscription different from the subscription of the primary (whether under the same tenant of Microsoft Entra ID ([formerly Azure Active Directory](/entra/fundamentals/new-name)) or not). For more information, see [Tutorial: Configure active geo-replication and failover (Azure SQL Database)](active-geo-replication-configure-portal.md).
142+
- You can use the Azure portal to setup Active geo replication across subscriptions as long as both the subscriptions are in the same Microsoft Entra ID tenant.
143+
- To create a geo-secondary replica in a subscription *different* from the subscription of the primary in a different Microsoft Entra ID tenant, use [the geo-secondary across subscriptions and Microsoft Entra ID tenant T-SQL tutorial](active-geo-replication-configure-portal.md#cross-subscription-geo-replication).
144+
- Cross-subscription geo-replication operations including setup and geo-failover are also supported using [Databases Create or Update REST API](/rest/api/sql/databases/create-or-update).
145+
146+
- Creating a cross-subscription geo-secondary on a logical server in the same or different Microsoft Entra tenant is not supported when [Microsoft Entra-only authentication](authentication-azure-ad-only-authentication.md) is enabled on either primary or secondary logical server and the creation is attempted using an Microsoft Entra ID user.
147+
148+
For methods and step-by-step instructions, see [Tutorial: Configure active geo-replication and failover (Azure SQL Database)](active-geo-replication-configure-portal.md).
149+
150+
## Private endpoints
151+
152+
Adding a geo-secondary using T-SQL is not supported when connecting to the primary server over a [private endpoint](private-endpoint-overview.md).
153+
- If a private endpoint is configured but public network access is allowed, adding a geo-secondary is supported when connected to the primary server from a public IP address.
154+
- Once a geo-secondary is added, [public network access can be denied](connectivity-settings.md#deny-public-network-access).
155+
156+
<a id="keeping-credentials-and-firewall-rules-in-sync"></a>
139157

140-
## <a id="keeping-credentials-and-firewall-rules-in-sync"></a> Keep credentials and firewall rules in sync
158+
## Keep credentials and firewall rules in sync
141159

142160
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 are no disruptions due to authentication credential mismatches. If you're using logins and users (rather than contained users), you must take extra steps to ensure that the same logins exist for your secondary database. For configuration details, see [Configure and manage Azure SQL Database security for geo-restore or failover](active-geo-replication-security-configure.md).
143161

144-
## <a id="upgrading-or-downgrading-primary-database"></a> Scale primary database
162+
<a id="upgrading-or-downgrading-primary-database"></a>
163+
164+
## Scale primary database
145165

146166
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.
147167

@@ -154,14 +174,18 @@ You can scale up or scale down the primary database to a different compute size
154174
> `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.`
155175
>
156176
157-
## <a id="preventing-the-loss-of-critical-data"></a> Prevent loss of critical data
177+
<a id="preventing-the-loss-of-critical-data"></a>
178+
179+
## Prevent loss of critical data
158180

159181
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/sp-wait-for-database-copy-sync-transact-sql) 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 doesn't 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.
160182

161183
> [!NOTE]
162184
> `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.
163185
164-
## <a id="monitoring-geo-replication-lag"></a> Monitor geo-replication lag
186+
<a id="monitoring-geo-replication-lag"></a>
187+
188+
## Monitor geo-replication lag
165189

166190
To monitor lag with respect to RPO, use the `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 affected by an outage at this moment and a geo-failover is initiated, transactions committed in the last second will be lost.
167191

@@ -172,11 +196,15 @@ To measure lag with respect to changes on the primary database that have been ha
172196
>
173197
> 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.
174198
175-
## <a id="programmatically-managing-active-geo-replication"></a> Programmatically manage active geo-replication
199+
<a id="programmatically-managing-active-geo-replication"></a>
200+
201+
## Programmatically manage active geo-replication
176202

177203
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)](/azure/role-based-access-control/overview).
178204

179-
### <a id="t-sql-manage-failover-of-single-and-pooled-databases"></a> T-SQL: Manage geo-failover of single and pooled databases
205+
<a id="t-sql-manage-failover-of-single-and-pooled-databases"></a>
206+
207+
### T-SQL: Manage geo-failover of single and pooled databases
180208

181209
> [!IMPORTANT]
182210
> 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.
@@ -191,8 +219,9 @@ As discussed previously, active geo-replication can also be managed programmatic
191219
| [sys.dm_operation_status](/sql/relational-databases/system-dynamic-management-views/sys-dm-operation-status-azure-sql-database) |Shows the status for all database operations including changes to replication links. |
192220
| [sys.sp_wait_for_database_copy_sync](/sql/relational-databases/system-stored-procedures/sp-wait-for-database-copy-sync-transact-sql) |Causes the application to wait until all committed transactions are hardened to the transaction log of a geo-secondary. |
193221

222+
<a id="powershell-manage-failover-of-single-and-pooled-databases"></a>
194223

195-
### <a id="powershell-manage-failover-of-single-and-pooled-databases"></a> PowerShell: Manage geo-failover of single and pooled databases
224+
### PowerShell: Manage geo-failover of single and pooled databases
196225

197226
[!INCLUDE [updated-for-az](../includes/updated-for-az.md)]
198227
> [!IMPORTANT]
@@ -209,7 +238,9 @@ As discussed previously, active geo-replication can also be managed programmatic
209238
> [!TIP]
210239
> For sample scripts, see [Use PowerShell to configure active geo-replication for a database in Azure SQL Database](scripts/setup-geodr-and-failover-database-powershell.md) and [Use PowerShell to configure active geo-replication for a pooled database in Azure SQL Database](scripts/setup-geodr-and-failover-elastic-pool-powershell.md).
211240
212-
### <a id="rest-api-manage-failover-of-single-and-pooled-databases"></a> REST API: Manage geo-failover of single and pooled databases
241+
<a id="rest-api-manage-failover-of-single-and-pooled-databases"></a>
242+
243+
### REST API: Manage geo-failover of single and pooled databases
213244

214245
| API | Description |
215246
| --- | --- |

azure-sql/database/doc-changes-updates-release-notes-whats-new.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ author: WilliamDAssafMSFT
66
ms.author: wiassaf
77
ms.reviewer: mathoma, randolphwest
88
ms.service: azure-sql-database
9-
ms.date: 09/18/2024
9+
ms.date: 09/26/2024
1010
ms.subservice: service-overview
1111
ms.topic: whats-new
1212
ms.custom:
@@ -89,6 +89,7 @@ Learn about significant changes to the Azure SQL Database documentation. For pre
8989

9090
| Changes | Details |
9191
| --- | --- |
92+
| **Cross-subscription geo-replica support in the Azure portal** | You can now use Azure portal to setup active geo-replication across subscriptions, as long as both the subscriptions are in the same Microsoft Entra ID tenant. For more information, see [Tutorial: Configure active geo-replication and failover (Azure SQL Database)](active-geo-replication-configure-portal.md).|
9293
| **SQL Insights (preview) retirement**| [SQL Insights (preview) will be retired on 31 December 2024](https://azure.microsoft.com/updates/v2/sql-insights-retirement). We recommend that you transition to [database watcher for Azure SQL (preview)](../database-watcher-overview.md) or another database monitoring solution by that date. |
9394
| **Hyperscale elastic pools GA** | Manage and scale multiple Hyperscale databases in Azure SQL Database by using [Hyperscale elastic pools](hyperscale-elastic-pool-overview.md). Hyperscale elastic pools also support Premium-series hardware and zone redundancy. For more information, see [Hyperscale Elastic Pools are now generally available](https://aka.ms/hsep-ga). |
9495
| **Hyperscale elastic pool maintenance window support** |You can configure a non-default [maintenance window](maintenance-window.md) for a [Hyperscale elastic pool](hyperscale-elastic-pool-overview.md). For more information, read [Blog: Maintenance window support for Azure SQL Database Hyperscale elastic pools](https://aka.ms/hsep-fmw). |

0 commit comments

Comments
 (0)