Enabling and Disabling the SQL Server AG virtual database
Disable the AG Virtual database
Select the source associated with the AG VDB and disable the AG VDB:
delphix> source "vexample"
delphix source 'vexample'> disable
delphix source 'vexample' disable *> commit
Disabling the SQL Server AG virtual database is similar to a standalone VDB. It involves removing the replica databases from the AG, dropping the replica databases, and cleaning up of mounts and directories. For the SQL Server AG virtual database, the Force disable is not supported. This practice is consistent with the provisioning procedures used for FCI clusters.
Enable the SQL Server AG Virtual database
Select the source associated with the AG VDB and enable the AG VDB.
delphix> source "vexample"
delphix source 'vexample'> enable
delphix source 'vexample' enable *> commit
There are two strategies for enabling the SQL Server AG virtual database. Depending on how the backupBased attribute is configured during the SQL Server AG virtual database provision, Enable can be a time-intensive operation or a quick operation.
When the backupBased attribute is set to true, Delphix effectively re-runs the provisioning process during AG virtual database enable, a full backup is performed on the primary replica database and restored on each available secondary replica. Therefore, making it a time-intensive operation.
When the backupBased attribute is set to false, Delphix utilizes a healthy secondary replica to recreate the complete SQL Server AG virtual database without the need to take any backups and perform the restoration. This makes it a quick operation.
Use the Enable operation to recreate the SQL Server AG virtual database on the latest set of replicas participating in the SQL Server AG. Thus, it will lead to changes in mount paths and replica source names.
If the user is not able to perform Disable/Enable because of a disable failure, it is worth checking the backupBased attribute. If the value of backupBased is set to false, try changing the value to true and attempt Disable/Enable again.