Skip to main content
Skip table of contents

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:

CODE
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. 

When the SQL Server AG virtual database is disabled, the user cannot update the backupBased attribute on the source. 

Enable the SQL Server AG Virtual database

Select the source associated with the AG VDB and enable the AG VDB.

CODE
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.

When a new replica is added to AG, the user should ensure that there is no existing database with the same name as the AG virtual database on this replica for Enable operation to succeed. 

If a critical fault exists on the SQL Server AG virtual database, then Delphix doesn't allow Enable operation on the SQL Server AG virtual database. It is recommended to first fix the issues highlighted, then either wait for environment monitoring to resolve the fault automatically or manually mark the fault as resolved and then attempt the Enable operation

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. 

To understand the consequences of updating the backupBased attribute value, please refer to the Provisioning a SQL Server AG virtual database page.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.