Topic Last Modified: 2014-02-05

Failover for Persistent Chat Server is designed to be mainly a manual process.

The failover procedure is based on the assumption that the secondary data center is up and running, but the Persistent Chat Server services where the primary Persistent Chat database is located are completely unavailable, including the following:

The procedure is based on two basic steps:

The Persistent Chat compliance database (mgccomp) is not failed over. The contents of this database are transient and are purged as the compliance adapter processes the data. It is your responsibility, as Persistent Chat Administrator, to correctly manage the adapter output to avoid data loss.

To fail over Persistent Chat Server

  1. Remove log shipping from the Persistent Chat Server Backup Log Shipping database.

    1. Using SQL Server Management Studio, connect to the database instance where the Persistent Chat Server backup mgc database is located.

    2. Open a query window to the master database.

    3. Use the following command to drop log shipping:

      Copy Code
      exec sp_delete_log_shipping_secondary_database mgc
      
  2. Copy any uncopied backup files from the backup share to the copy destination folder of the backup server.

  3. Apply any unapplied transaction log backups in sequence to the secondary database. For details, see "How to: Apply a Transaction Log Backup (Transact-SQL)" at http://go.microsoft.com/fwlink/p/?linkid=247428.

  4. Bring the backup mgc database online. Using the query window that opens in step 1b, do the following:

    1. End all connections to the mgc database, if there are any:

      1. exec sp_who2 to identify connections to the mgc database.

      2. kill <spid> to end these connections.

    2. Bring the database online:

      1. restore database mgc with recovery.

  5. In Lync Server Management Shell, use the command Set-CsPersistentChatState -Identity "service:atl-cs-001.litwareinc.com" –PoolState FailedOver to fail over to the mgc backup database. Be sure to substitute the fully qualified domain name of your Persistent Chat pool for atl-cs-001.litwareinc.com.

    The mgc backup database now serves as the primary database.

  6. In Lync Server Management Shell, use the Install-CsMirrorDatabase cmdlet to establish a high availability mirror for the backup database that now serves as the primary database. Use the backup database instance as the primary database and the backup mirror database instance as the mirror instance. This is not the same mirror as the one that was initially configured for the primary database during setup. For details, see the section "Using Lync Server Management Shell Cmdlets" in Deploying SQL Mirroring for Back End Server High Availability.

  7. Set the Persistent Chat Server active servers. From the Lync Server Command Shell, use the Set-CsPersistentChatActiveServer cmdlet to set the list of active servers.

    Important:
    All the active servers must be located within the same data center as the new primary database, or in a data center that has a low latency/high bandwidth connection to the database.

    At this point, the failover from the Persistent Chat Server primary database to the Persistent Chat Server backup database completes successfully.