@@ -16,12 +16,12 @@ ms.date: 01/26/2022
16
16
[ !INCLUDE[ appliesto-sqldb] ( ../includes/appliesto-sqldb.md )]
17
17
18
18
> [ !div class="op_single_selector"]
19
- > * [ Azure SQL Database (single database) ] ( failover-group-add-single-database-tutorial.md )
20
- > * [ Azure SQL Database (elastic pool )] ( failover-group-add-elastic-pool -tutorial.md )
21
- > * [ Azure SQL Managed Instance ] ( ../managed-instance/ failover-group-add-instance -tutorial.md)
22
-
19
+ >
20
+ > - [ Azure SQL Database (single database )] ( failover-group-add-single-database -tutorial.md )
21
+ > - [ Azure SQL Database (elastic pool) ] ( failover-group-add-elastic-pool -tutorial.md )
22
+ > - [ Azure SQL Managed Instance ] ( ../managed-instance/failover-group-add-instance-tutorial.md )
23
23
24
- Configure an [ auto-failover group] ( auto-failover-group-sql-db.md ) for an Azure SQL Database elastic pool and test failover using the Azure portal.
24
+ Configure an [ auto-failover group] ( auto-failover-group-sql-db.md ) for an Azure SQL Database elastic pool and test failover using the Azure portal.
25
25
26
26
In this tutorial, you'll learn how to:
27
27
@@ -51,10 +51,6 @@ To complete the tutorial, make sure you have the following items:
51
51
52
52
[ !INCLUDE [ quickstarts-free-trial-note] ( ../../../includes/quickstarts-free-trial-note.md )]
53
53
54
- [ !INCLUDE [ azure-cli-prepare-your-environment-h3.md] ( ../../../includes/azure-cli-prepare-your-environment-h3.md )]
55
-
56
- [ !INCLUDE [ cli-launch-cloud-shell-sign-in.md] ( ../../../includes/cli-launch-cloud-shell-sign-in.md )]
57
-
58
54
---
59
55
60
56
## 1 - Create a single database
@@ -154,19 +150,19 @@ In this step, you create your elastic pool and add your database to the elastic
154
150
155
151
Set these additional parameter values for use in creating the elastic pool.
156
152
157
- :::code language="azurecli" source="~ /azure_cli_scripts/sql-database/failover-groups/add-elastic-pool-to-failover-group-az-cli.sh" range="12-13 ":::
153
+ :::code language="azurecli" source="~ /azure_cli_scripts/sql-database/failover-groups/add-elastic-pool-to-failover-group-az-cli.sh" id="SetPoolParameterValues ":::
158
154
159
155
### Create elastic pool on primary server
160
156
161
157
Use the [ az sql elastic-pool create] ( /cli/azure/sql/elastic-pool#az-sql-elastic-pool-create ) command to create an elastic pool.
162
158
163
- :::code language="azurecli" source="~ /azure_cli_scripts/sql-database/failover-groups/add-elastic-pool-to-failover-group-az-cli.sh" range="29-31 ":::
159
+ :::code language="azurecli" source="~ /azure_cli_scripts/sql-database/failover-groups/add-elastic-pool-to-failover-group-az-cli.sh" id="CreateElasticPool ":::
164
160
165
161
### Add database to elastic pool
166
162
167
163
Use the [ az sql db update] ( /cli/azure/sql/db#az_sql_db_update ) command to add a database to an elastic pool.
168
164
169
- :::code language="azurecli" source="~ /azure_cli_scripts/sql-database/failover-groups/add-elastic-pool-to-failover-group-az-cli.sh" range="32-34 ":::
165
+ :::code language="azurecli" source="~ /azure_cli_scripts/sql-database/failover-groups/add-elastic-pool-to-failover-group-az-cli.sh" id="AddDatabaseToPool ":::
170
166
171
167
This portion of the tutorial uses the following Azure CLI cmdlets:
172
168
@@ -306,33 +302,33 @@ Set these additional parameter values for use in creating the failover group.
306
302
307
303
Change the failover location as appropriate for your environment.
308
304
309
- :::code language="azurecli" source="~ /azure_cli_scripts/sql-database/failover-groups/add-elastic-pool-to-failover-group-az-cli.sh" range="14-17 ":::
305
+ :::code language="azurecli" source="~ /azure_cli_scripts/sql-database/failover-groups/add-elastic-pool-to-failover-group-az-cli.sh" id="SetFailoverParameterValues ":::
310
306
311
307
### Create secondary server
312
308
313
309
Use the [ az sql server create] ( /cli/azure/sql/server#az_sql_server_create ) command to create a secondary server.
314
310
> [ !NOTE]
315
311
> The server login and firewall settings must match that of your primary server.
316
312
317
- :::code language="azurecli" source="~ /azure_cli_scripts/sql-database/failover-groups/add-elastic-pool-to-failover-group-az-cli.sh" range="35-37 ":::
313
+ :::code language="azurecli" source="~ /azure_cli_scripts/sql-database/failover-groups/add-elastic-pool-to-failover-group-az-cli.sh" id="CreateSecondaryServer ":::
318
314
319
315
### Create elastic pool on secondary server
320
316
321
317
Use the [ az sql elastic-pool create] ( /cli/azure/sql/elastic-pool#az-sql-elastic-pool-create ) command to create an elastic pool on the secondary server.
322
318
323
- :::code language="azurecli" source="~ /azure_cli_scripts/sql-database/failover-groups/add-elastic-pool-to-failover-group-az-cli.sh" range="38-40 ":::
319
+ :::code language="azurecli" source="~ /azure_cli_scripts/sql-database/failover-groups/add-elastic-pool-to-failover-group-az-cli.sh" id="CreateElasticPoolOnSecondary ":::
324
320
325
321
### Create failover group
326
322
327
323
Use the [ az sql failover-group create] ( /cli/azure/sql/failover-group#az_sql_failover_group_create ) command to create a failover group.
328
324
329
- :::code language="azurecli" source="~ /azure_cli_scripts/sql-database/failover-groups/add-elastic-pool-to-failover-group-az-cli.sh" range="41-43 ":::
325
+ :::code language="azurecli" source="~ /azure_cli_scripts/sql-database/failover-groups/add-elastic-pool-to-failover-group-az-cli.sh" id="CreateFailoverGroup ":::
330
326
331
327
### Add database to the failover group
332
328
333
329
Use the [ az sql failover-group update] ( /cli/azure/sql/failover-group#az_sql_failover_group_update ) command to add a database to the failover group.
334
330
335
- :::code language="azurecli" source="~ /azure_cli_scripts/sql-database/failover-groups/add-elastic-pool-to-failover-group-az-cli.sh" range="44-48 ":::
331
+ :::code language="azurecli" source="~ /azure_cli_scripts/sql-database/failover-groups/add-elastic-pool-to-failover-group-az-cli.sh" id="AddDatabaseToFailoverGroup ":::
336
332
337
333
### Azure CLI failover group creation reference
338
334
@@ -455,19 +451,19 @@ Test failover using the Azure CLI.
455
451
456
452
Use the [ az sql failover-group show] ( /cli/azure/sql/failover-group#az_sql_failover_group_show ) command to confirm the roles of each server in the failover group.
457
453
458
- :::code language="azurecli" source="~ /azure_cli_scripts/sql-database/failover-groups/add-elastic-pool-to-failover-group-az-cli.sh" range="49-51 ":::
454
+ :::code language="azurecli" source="~ /azure_cli_scripts/sql-database/failover-groups/add-elastic-pool-to-failover-group-az-cli.sh" id="VerifyRoles ":::
459
455
460
456
### Fail over to the secondary server
461
457
462
458
Use the [ az sql failover-group set-primary] ( /cli/azure/sql/failover-group#az_sql_failover_group_set_primary ) command to fail over to the secondary server. Use the [ az sql failover-group show] ( /cli/azure/sql/failover-group#az_sql_failover_group_show ) command to verify a successful failover.
463
459
464
- :::code language="azurecli" source="~ /azure_cli_scripts/sql-database/failover-groups/add-elastic-pool-to-failover-group-az-cli.sh" range="52-57 ":::
460
+ :::code language="azurecli" source="~ /azure_cli_scripts/sql-database/failover-groups/add-elastic-pool-to-failover-group-az-cli.sh" id="FailingOver ":::
465
461
466
462
### Revert failover group back to the primary server
467
463
468
464
Use the [ az sql failover-group set-primary] ( /cli/azure/sql/failover-group#az_sql_failover_group_set_primary ) command to fail back to the primary server.
469
465
470
- :::code language="azurecli" source="~ /azure_cli_scripts/sql-database/failover-groups/add-elastic-pool-to-failover-group-az-cli.sh" range="58-60 ":::
466
+ :::code language="azurecli" source="~ /azure_cli_scripts/sql-database/failover-groups/add-elastic-pool-to-failover-group-az-cli.sh" id="FailingBack ":::
471
467
472
468
### Azure CLI failover group management reference
473
469
@@ -555,7 +551,7 @@ This script uses the following commands. Each command in the table links to comm
555
551
556
552
# [ Azure CLI] ( #tab/azure-cli )
557
553
558
- :::code language="azurecli" source="~ /azure_cli_scripts/sql-database/failover-groups/add-elastic-pool-to-failover-group-az-cli.sh" range="4-60 ":::
554
+ :::code language="azurecli" source="~ /azure_cli_scripts/sql-database/failover-groups/add-elastic-pool-to-failover-group-az-cli.sh" id="FullScript ":::
559
555
560
556
# [ Azure portal] ( #tab/azure-portal )
561
557
0 commit comments