Building a Standby CommServe Using Log Shipping

Table of Contents

Overview

Requirements

Setup the CommServe

Setting up the Primary CommServe

Setting up the Standby CommServe

Setting up the Standby CommServe Database

Switching the CommServe from Primary to Standby in Case of failures

Switching the CommServe Back From Standby to Primary When the Failure Condition is Cleared

Overview

A standby CommServe can be built to maintain an up-to-date copy of the Primary CommServe to minimize disruption and down time due to the failure of the primary CommServe. Note SRM Server data cannot be protected using log shipping.

Requirements

Review the following requirements before setting up the primary and standby CommServe:

Setup the CommServe

Setting up the Primary CommServe

1. Install the CommServe software on the primary CommServe computer.

The primary CommServe must be setup using the Dual IP license. (See Licensing and Disaster Recovery for more information.)

In order to run transaction log backups, both the Primary and Standby CommServe need to be set to FULL Recovery model.

See Deployment - CommServe for more information on installing the CommServe software.

See Set Full Recovery Model for more information about setting the CommServe to Full Recovery Model.

2. Install the SQL Server iDataAgent on the primary CommServe. See Getting Started - Microsoft SQL Server Deployment for more information on installing the SQL Server iDataAgent.

Setting up the Standby CommServe

3. Install the CommServe software on the standby CommServe computer.
  • Note down the CommServe Client Name and the CommServe Host Name provided in the CommServe Name dialog box during the installation.
  • Make sure that all the updates installed in the primary CommServe are also installed on the standby CommServe.
See Deployment - CommServe for more information on installing the CommServe software
4. Stop all Services on the standby CommServe.

You cannot have services running on both the primary and standby computers.

In order to run transaction log backups, both the Primary and Standby CommServe need to be set to FULL Recovery model.

See Stop Services on Windows for step-by-step instructions.

See Set Full Recovery Model for more information about setting the CommServe to Full Recovery Model.

5. Install the SQL Server iDataAgent software as a client of the primary CommServe. This can be done as follows:
  1. Configure the bAllowMultiInstances registry key to allow the SQL Server iDataAgent software to be installed as a client of the primary CommServe.
  2. Install the SQL Server iDataAgent software.
    • Provide the primary CommServe in the CommServe Host Name Information dialog box. This will enable the SQL Server iDataAgent to connect to the primary CommServe.
    • Provide a different client and hostname in the Communication Interface Name dialog box. This name should not be the same name provided during the installation of the CommServe software in step 3.
See Getting Started - Microsoft SQL Server Deployment for more information on installing the SQL Server iDataAgent..

See Also:

Multi Instancing for more information on the bAllowMultiInstances registry key.

Setting up the Standby CommServe Database

6. Using the SQL Server iDataAgent, perform a full backup of the SQL database in the primary CommServe and restore it to the SQL Server in the standby CommServe. The database must be in the standby state after the restore. See Getting Started - Microsoft SQL Server Backup for step-by-step instructions on performing a full backup using the SQL Server iDataAgent.

See Getting Started - Microsoft SQL Server Restore for step-by-step instructions on restoring data using the SQL Server iDataAgent.

7. Using the SQL Server iDataAgent, schedule frequent backups of the Transaction Logs in the primary server. It is recommended to schedule backups every 30 minutes.

Schedule a restore of the transaction log to be run after each backup. The database must be in the standby state after every Transaction Log restore.

NOTES

  • If possible, choose a magnetic storage policy for performance reasons.
  • Make sure to periodically verify the scheduled jobs to ensure that the transaction log backup and restore complete successfully.
See Start a Transaction Log Backup for for step-by-step instructions.

See Also:

Replication Using Warm Database Restore for more information on the performing this type of restore.

Switching the CommServe from Primary to Standby in Case of failures

1. You can write a script that automatically detects and runs the following steps, when the primary CommServe goes down.

For manual fail-over, you would need to perform following actions on the Primary CommServe which would still be up.

  • Stop and disable all activity from the CommCell Console.
  • Stop all services on the CommServe computer.
  • Disable the scheduled backup job for SQL Server iDataAgent
  • Kill all running jobs
For step-by-step instructions, see Enable or Disable Operations. See Stop Services on Windows for step-by-step instructions.
2. On the standby CommServe, bring the CommServe database to regular mode from standby mode.

To bring the Standby CommServe services up in case of disaster in primary site we need to change the CommServ database in the standby site from Standby/read-only to full recovery mode. This can be accomplished by running the following command:

Use master

ALTER DATABASE [CommServ] SET ONLINE

RESTORE DATABASE [CommServ] WITH RECOVERY

See the SQL Server Management Studio help for information on bringing the database online.
3. Navigate to the base directory and run the CommserveDisasterRecoveryGUI to perform the name change. This will change the CommServe host name from the Primary CommServe name to the StandBy CommServe name.

On the Standby CommServe, start the services.

See start Start Services on Windows for step-by-step instructions.
4. On the standby CommServe, change the name in the database using the command line or using the Name Management option from the Control Panel.

Alternatively, you can update the DNS entry to change IP address of the primary computer to point to the standby computer, and then use the ipconfig /flushdns command to update the clients of the CommServe name change.

See Changing the CommServe Name for instructions.

See Change the Name of CommServe in a multiple MediaAgents/Clients for set-by-step instructions to inform the clients of the CommServe Hostname change.

5. Disable the scheduled backup job for the SQL Server iDataAgent in the primary CommServe and kill any jobs that are already running.  

Switching the CommServe Back From Standby to Primary When the Failure Condition is Cleared

1. Stop all running jobs and and disable all activity from the CommCell Console. See Enable or Disable Operations for step-by-step instructions.
2. Stop all services on the standby CommServe. See Stop Services on Windows for step-by-step instructions.
3. In the standby CommServe, using the SQL Server Management Studio, backup the CommServ database and create a .dmp file. See the SQL Server Management Studio help for information on backing up a database.

Alternatively you can use the following command line in a batch file:

<sql install path>\osql -S <SQL ServerName> -U sa -P <sapwd> -Q "BACKUP DATABASE [CommServ] TO DISK = 'C:\cs.dmp'"

This should create a dump file c:\cs.dmp.

You can choose the folder in which the .dmp file is created.

4. In the primary CommServe, using the SQL Server Management Studio, restore the CommServ database.

Set the database into Full recovery model (See step 2 under Switching the CommServe from Primary to Standby in Case of failures)

See the SQL Server Management Studio help for information on restoring a database.
5 Navigate to the base directory and run the CommserveDisasterRecoveryGUI to perform the name change. This will change the CommServe host name from the Standby CommServe name to the Primary CommServe name.

In the standby CommServe, use the Name Management option from the Control Panel to Update the Clients with the Primary CommServe name

Alternatively, you can update the DNS entry to change IP address of the primary computer to point to the standby computer, and then use the ipconfig /flushdns command to update the clients of the CommServe name change.

See Informing Clients of CommServe Name Change for set-by-step instructions to inform the clients of the CommServe name change.
6. In the primary CommServe, start the services. See start Start Services on Windows for step-by-step instructions.
7. Enable the scheduled backup job for the SQL Server iDataAgent in the primary CommServe.  

Back to Top