How to Remove Geo-Replication in SQL Azure Database?
To remove Geo-replication on an Azure database, navigate to the database details page and click on Geo-Replication. Just under the map locate the secondary server and click on Stop Replication. Please refer to the below image.
Alternatively, you can also use the following T-SQL script to remove Geo-Replication between primary and secondary databases. This T-SQL script should be executed on the master database at the primary server.
Replace the database and the secondary Azure SQL server name with yours.
ALTER DATABASE AzureGeoRepl
REMOVE SECONDARY ON SERVER rbc
Geo-Replication on a secondary database.
In case we want to have more than four secondary databases for a given primary database, configure the Geo-Replication on a secondary database so that the secondary database itself will have another secondary database. Execute the following T-SQL script on the master database at the secondary server to create a Geo-Replication from a secondary database to another secondary database.
ALTER DATABASE ActiveGeoRepl
ADD SECONDARY ON SERVER rbc3
WITH ( ALLOW_CONNECTIONS = ALL )
Conclusion
In this article, we explored how to create Geo-Replication on an Azure SQL database, how to manually do a planned failover without data loss and forced failover which may have a data loss. In case you have any questions, please feel free to ask in the comment section below.
In this article, we explored how to create Geo-Replication on an Azure SQL database, how to manually do a planned failover without data loss and forced failover which may have a data loss. In case you have any questions, please feel free to ask in the comment section below.
Comments
Post a Comment