Skip to main content
Delphix

SQL Server VDB Cannot be Enabled After a Force Disable Operation

Issue

After disabling a SQL Server virtual database (VDB) on the Delphix Engine with the Force Disable option selected, subsequent attempts to enable the VDB fail with the following message.

 

The operation could not be completed because the virtual database "<VDB_name>" is disabled.

Cause

When using the Force Disable option to disable a VDB, the Delphix Engine marks the VDB as 'disabled' on the Engine and disables the shared iSCSI volumes, but it makes no changes on the target host nor to the SQL Server instance. SQL Server therefore still believes that the database is attached.  Attempts to access the database will leave it in the 'Recovery Pending' state, seen via the SQL Server Management Studio.

A VDB disabled without the Force Disable option selected should no longer appear in the list of databases within SQL Server Management Studio.

The Force Disable option should therefore only be used in situations where a normal disable operation would fail. Such situations may include the SQL Server instance being down or the target host not being reachable over the network.

Resolution

Use the following steps to bring the VDB back online.

 

  1. In SQL Server Management Studio, perform a 'Take offline' operation on the VDB.

 

2. In SQL Server Management Studio, perform a 'Detach' operation on the VDB. DO NOT select the options to either Update Statistics or Drop Connections. The detach operation may complete with an error, depending upon whether the VDB's iSCSI volumes are still mounted from the Delphix Engine. Once the detach operation completes, the VDB should no longer appear in the list of databases.

3. Enable the VDB as normal on the Delphix Engine.

If the VDB enable job continues to fail, further investigation may be required via a Delphix Support case.