Table of Contents
To configure active geo-replication in Microsoft Azure SQL Solution, you can follow these steps:
You need to create a source database and a target database in Azure SQL. The source database will act as the primary database, and the target database will be the secondary database in a different region.
To enable active geo-replication for your databases, you can use the Azure portal, PowerShell, or Azure CLI.
Using the Azure portal:
Using PowerShell:
$primaryServer = ‘
$secondaryServer = ‘
$primaryDatabase = ‘
$secondaryDatabase = ‘
$resourceGroupName = ‘
$subscriptionId = ‘
Set-AzSqlDatabaseSecondary -ResourceGroupName $resourceGroupName `
-ServerName $primaryServer -DatabaseName $primaryDatabase `
-PartnerResourceGroupName $resourceGroupName `
-PartnerServerName $secondaryServer -PartnerDatabaseName $secondaryDatabase `
-SecondaryType GeoDRDatabase `
-SubscriptionId $subscriptionId
Using Azure CLI:
az sql db replica create –name
You can monitor the active geo-replication status and progress using the Azure portal, PowerShell, or Azure CLI.
Using the Azure portal:
Using PowerShell:
$primaryServer = ‘
$primaryDatabase = ‘
$resourceGroupName = ‘
$geoReplication = Get-AzSqlDatabaseGeoBackup `
-ResourceGroupName $resourceGroupName `
-ServerName $primaryServer `
-DatabaseName $primaryDatabase
$geoReplication
Using Azure CLI:
az sql db replica list-links –name
In case of a disaster or planned maintenance, you might need to failover to your secondary database or failback to the primary database. You can perform these operations using the Azure portal, PowerShell, or Azure CLI.
Using the Azure portal:
Using PowerShell:
$primaryServer = ‘
$secondaryServer = ‘
$primaryDatabase = ‘
$secondaryDatabase = ‘
$resourceGroupName = ‘
Failover-AzSqlDatabaseSecondary -ResourceGroupName $resourceGroupName `
-ServerName $primaryServer -DatabaseName $primaryDatabase `
-PartnerResourceGroupName $resourceGroupName `
-PartnerServerName $secondaryServer -PartnerDatabaseName $secondaryDatabase
Failover-AzSqlDatabaseSecondary -ResourceGroupName $resourceGroupName `
-ServerName $secondaryServer -DatabaseName $secondaryDatabase `
-PartnerResourceGroupName $resourceGroupName `
-PartnerServerName $primaryServer -PartnerDatabaseName $primaryDatabase
Using Azure CLI:
az sql db replica set-primary –server
By following these steps and using the Azure portal, PowerShell, or Azure CLI, you can easily configure and manage active geo-replication for your Azure SQL Solution. This ensures high availability and disaster recovery for your databases across different regions.
A. The source and target databases must be in the same region.
B. The source and target databases must have the same edition and service tier.
C. The source database must have read access enabled.
D. Only databases using Azure SQL Managed Instance can be configured for active geo-replication.
Correct answer: B
Correct answer: True
A. 1
B. 2
C. 4
D. 8
Correct answer: C
A. Modify the schema of the database.
B. Run read-only queries.
C. Backup the database.
D. Create new tables.
Correct answers: B, C
Correct answer: False
A. It can be located in a different Azure region.
B. It can be used for read-intensive workloads.
C. It can be changed to become the new primary in case of a failure.
D. It can be accessed using the same connection string as the primary database.
Correct answers: A, B, C, D
Correct answer: False
A. Reduced network latency for read operations.
B. Automatic failover and zero data loss.
C. Increased storage capacity for the primary database.
D. Simplified management of user permissions.
Correct answer: B
Correct answer: False
A. The secondary replicas are automatically converted to new primary databases.
B. The secondary replicas are deleted along with the source database.
C. The secondary replicas become read-only and can no longer be written to.
D. The secondary replicas continue to function independently as secondary databases.
Correct answer: B
If this material is helpful, please leave a comment and support us to continue.