Skip to main content
Delphix

Reconnecting a SQL Server dSource Following a Mirroring Failover (KBA1390)

 

KBA

KBA#1390

Applicable Delphix Versions

Click here to view the versions of the Delphix engine to which this article applies
Major Release All Sub Releases
6.0 6.0.0.0, 6.0.1.0, 6.0.1.1, 6.0.2.0, 6.0.2.1, 6.0.3.0, 6.0.3.1, 6.0.4.0, 6.0.4.1, 6.0.4.2, 6.0.5.0, 6.0.6.0, 6.0.6.1, 6.0.7.0, 6.0.8.0, 6.0.8.1, 6.0.9.0, 6.0.10.0, 6.0.10.1, 6.0.11.0

5.3

5.3.0.0, 5.3.0.1, 5.3.0.2, 5.3.0.3, 5.3.1.0, 5.3.1.1, 5.3.1.2, 5.3.2.0, 5.3.3.0, 5.3.3.1, 5.3.4.0, 5.3.5.0 5.3.6.0, 5.3.7.0, 5.3.7.1, 5.3.8.0, 5.3.8.1, 5.3.9.0

5.2

5.2.2.0, 5.2.2.1, 5.2.3.0, 5.2.4.0, 5.2.5.0, 5.2.5.1, 5.2.6.0, 5.2.6.1

5.1

5.1.0.0, 5.1.1.0, 5.1.2.0, 5.1.3.0, 5.1.4.0, 5.1.5.0, 5.1.5.1, 5.1.6.0, 5.1.7.0, 5.1.8.0, 5.1.8.1, 5.1.9.0, 5.1.10.0

5.0

5.0.1.0, 5.0.1.1, 5.0.2.0, 5.0.2.1, 5.0.2.2, 5.0.2.3, 5.0.3.0, 5.0.3.1, 5.0.4.0, 5.0.4.1 ,5.0.5.0, 5.0.5.1, 5.0.5.2, 5.0.5.3, 5.0.5.4

Troubleshooting Reattaching a dSource to a SQL Server Source Database

This article provides information on how to reattach a dSource to a SQL Server Source Database following the failover of a SQL Server Mirrored Database.

If a SQL Server database in a Database Mirroring configuration is failed over to the mirror server, the Delphix Engine will report that it is no longer able to contact the Source database, with the message "dSource - Cannot contact source":

MyDsources.png

This is because the source database linked and connected to the Delphix Engine, as the dSource, is no longer the active database, but the standby (mirrored) database. The mirrored database is in NORECOVERY mode and can no longer be queried by the Delphix Engine.

Using the steps provided in this document, a dSource can be reconnected to the new active database.

Resolution 

To reconnect to the Source Database following a failover, the dSource must be unlinked from the existing Source Instance, and then reattached to the SQL Server instance which now hosts the Primary copy of the database.

This involves the following steps:

  • Adding the new environment to the Delphix Engine
  • Recording the current dSource Configuration
  • Detaching the dSource
  • Attach the dSource to the new environment
  • Additional steps for forced mirroring failovers

Adding the new environment to the Delphix Engine 

The host will need to be added as an Environment to the Delphix Engine, if this has not already been done. This can be performed from the Manage -> Environments screen, using the Add Environment button.

DelphixManagement.png

The new environment will need to meet the same requirements as any other Windows Source Environment, as described in Overview of Requirements for SQL Server Environments.

Recording the current dSource Configuration 

From the Manage -> My Datasets screen, browse to the Configuration tab of the dSource, and note the value of all editable fields, including:

  • Database User (DB User)
  • Validated Sync Mode
  • Staging Environment
  • Autodiscover Backup Path setting, and/or the configured Backup Path

In most cases, you will want to replicate these settings when reattaching the dSource.

Most of these settings can be found in the Source and Data Management tabs.

MirroredDB.png

If you are using a Database User Type of "Database User", please note that the user password cannot be extracted from the Delphix Engine. You will need to retrieve this password from your own records for entry in a later step.

Detaching the dSource 

The dSource can be detached using Unlink dSource button of the dSource, accessible from the ellipsis (...) menu.

MirroredDBUnlink.png

Once this is complete, the dSource will appear in the left-hand dataset lists as Detached.

Attaching the dSource to the new environment 

The dSource can then be reattached to the new environment using the Link dSource button, accessible from the ellipsis (...) menu.

MirroredDBLinkdSource.png

This will allow you to reattach the Delphix Engine to the current Primary mirroring node.

LinkdSource.png

For more information on this process, please see the document Detaching and Reattaching SQL Server dSources.

 

Note

Note:

Earlier releases of the Delphix Engine (prior to 5.3) do not provide GUI support for reattaching SQL Server dSources, and it may be necessary to reattach the database using the Command Line Interface.

For more information, please refer to the document CLI Cookbook: Detaching and Attaching a SQL Server dSource.

This will trigger an "Attach source" action:

RunningActions.png

Once this action is complete, you should check each setting in the Configuration tab of the dSource, changing settings to match those that you noted earlier or adjusting them as required to suit your new Source Environment.

Additional steps for forced mirroring failovers

Initiating a forced failover of a mirrored database, where the FORCE_SERVICE_ALLOW_DATA_LOSS option is used, may trigger a Recovery Fork in SQL Server.

If this occurs, using the steps above may cause the Delphix Engine to raise a Fault with the title "The recovery fork GUID of the source database has changed".

This fault will prevent the Delphix Engine from automatically taking new snapshots as part of Validated Sync, until a new Snapshot is taken using a full database backup.

For more information on this behavior, please see Resolving Issues with MSSQL Backups When Recovery Fork GUID Changes on the Source Database (KBA1044).