What is Geo-Replication?
Geo-replication is designed to improve the distribution of data across geographically distributed data networks. E.g. you have your OLTP SQL Azure database in West India zone, you can configure to copy/replicate database from West India zone to South India zone.
This is intended to improve the response time for web portals, are you can setup geo-replication with active mode too, which enables to read data from secondary copy.
Geo-replication in SQL Azure
Every Azure SQL Database subscription has built-in redundancy. Three copies of your data are stored across fault domains in the data center to protect against server and hardware failure. This is built in to the subscription price and is not configurable. The source and target servers must belong to the same subscription.
You can configure two more fault-tolerant options: standard geo-replication and active geo-replication.
Standard geo-replication allows the user to fail over the database to a different region when a database is not available. It is available on the standard and premium service tiers. Standard geo-replication does not allow clients to connect to the secondary server. It is offline until it’s needed to take over for the primary.
Active geo-replication allows clients to connect to the secondary server for read only data. This helps systems to run BI related compute intensive jobs on secondary, and help to reduce workload from primary server.
How to configure Geo Replication for SQL Azure
There are couple of ways you can configure Geo Replication for your SQL Azure database.
1. From Azure Portal
2. Using PowerShell
Let’s see one by one.
Configure From ARM Portal
You can configure Geo Replication from ARM portal for existing SQL Azure database. Lets see step by step how can achieve that.
Step 1: Create SQL Azure database
To more about how to create SQL Azure database please refer article Create and use SQL Azure Database
Step 2: Configure Geo replication
You need to navigate to the properties of existing SQL Azure database, in the properties blade select Geo Replication option.
You will be shown another blade with your primary database region and option to select region for your secondary database.
Select the desired Azure data center location, it by default recommends you the nearest data center so that if you want to use as a read only source it would give better performance.
Step 3: Select Secondary Type
As my primary database is in West India data center, i am recommended to replicate to nearest which is South India.
once you select the region, next is to select the type of secondary database (Readable or Non-Readable)
I have opted for readable option here, so that i use my secondary database for reporting purpose.
Step 4: Create Secondary Server
Once you select secondary type you need to create backend SQL Server which will be used to create and host your database copy.
once all the settings are configured, click on the OK button to process the request of Geo Replication.
Step 5: Verify Geo Replication
You can verify Geo Replication from ARM portal. You will see, both primary and secondary databases.
Configure Using PowerShell
Another option for you to create online or offline secondary database is using Windows PowerShell with Start-AzureSqlDatabaseCopy cmdlet.
To create an online secondary, use the following command
Start-AzureSqlDatabaseCopy -ServerName "SourceServer" -DatabaseName "SourceDB" -PartnerServer "DestinationServer" –ContinuousCopy
To create an offline secondary, use the following command:
Start-AzureSqlDatabaseCopy -ServerName "SourceServer" -DatabaseName "SourceDB" -PartnerServer "DestinationServer" –ContinuousCopy –OfflineSecondary
Products from Amazon.com
- Price: $31.05Was: $39.99
- Price: Check on Amazon
- Price: $44.99Was: $49.99
- Price: $27.48Was: $29.99
- Price: $59.99
- Price: Check on Amazon
- Price: $9.99Was: $39.99
- Price: $45.62Was: $49.99