Search code examples
sql-servergoogle-cloud-platformgoogle-cloud-sql

AlwaysOn feature in CloudSQL-SQLServer


I'm migrating a SQLServer DB which uses AlwaysOn feature for high availability in cluster on-premises. How to enable this in CloudSQL-SQLServer?, if not possible, is there any workaround ? I'm a little confuse with HA and replica approaches and not sure if the combination of both could help on this.


Solution

  • The primary reason for using replication is to scale the use of data in a database without degrading performance. Other reasons include migrating data between regions.

    • Additionally, if an original instance is corrupted, a replica could be promoted to a standalone instance (in which case, existing replicas would not consider that instance as primary).
    • When referring to a Cloud SQL instance, the instance that is replicated is called the primary instance and the copies are called read replicas. The primary instance and read replicas all reside in Cloud SQL.

    Replication in Cloud SQL : SQL Server is currently in Pre-General Availability stage. SQL Server replication is implemented using SQL Server Read Scale Availability Groups.This feature only applies to the SQL Server 2017 Enterprise version of Cloud SQL for SQL Server. The preview is limited to the instances created or cloned on or after June 21, 2021.

    • The document reference for the same is here.

    However, the purpose of an HA configuration is to reduce downtime when a zone or instance becomes unavailable. This might happen during a zonal outage, or when an instance becomes corrupted. With HA, your data continues to be available to client applications. The HA configuration, sometimes called a cluster, provides data redundancy.

    • The document reference for configuring HA for new/existing SQL Server instances is here.

    Note : Once you start the high availability configuration on an instance, you cannot stop it.