Exchange Server 2007 High Availability Part 5 – Standby Continuous Replication
Written by Paul Cunningham on August 6, 2009So far in this series of posts I have discussed the basic concepts of Exchange Server 2007 high availability, how to use Local Continuous Replication to protect mailbox databases on a single server, and how to cluster Exchange mailbox servers with Single Copy Clusters and Cluster Continuous Replication. In this final post in the series I will discuss Exchange Server 2007 Standby Continuous Replication.
What is Standby Continuous Replication?
Standby Continuous Replication (SCR) for Exchange Server 2007 is a feature that was introduced with Service Pack 1. SCR occurs between two servers – a source server and a target server. The source server holds the active storage group and mailbox database, while the target server holds a replica of that storage group and mailbox database.

Exchange storage group and mailbox database information is replicated between the source and target server using asynchronous log shipping. I described asynchronous log shipping in part one of this series on the fundamental concepts of Exchange Server 2007 high availability. The same log shipping occurs in Local Continuous Replication and Cluster Continuous Replication.
SCR does not work like a cluster with automated fail over, rather it is much like LCR in that manual intervention is required in the event that the SCR source server experiences a failure.
There are many considerations when deploying SCR, but these are a few of the important ones:
- SCR is available in both Standard and Enterprise edition of Exchange Server 2007 with Service Pack 1.
- The SCR source server can be a standalone mailbox server or either an SCC or CCR cluster, however it cannot have LCR enabled on the storage group being replicated.
- The SCR target server can be a standalone mailbox server or either an SCC or CCR cluster as well.
- Unlike SCC and CCR, SCR does not in itself prevent a mailbox server from performing other Exchange roles such as Client Access server or Hub Transport server.
- SCR can be used for Public Folder databases as long as only one Public Folder database exists in the organization. Otherwise Public Folder replication is used instead.
- An SCR source can have multiple target servers; likewise an SCR target can have multiple source servers.
- A server can be both an SCR source and target at the same time.
- SCR target servers require a matching disk layout (eg drive letters) and disk capacity as the source server.
How to Enable Standby Continuous Replication
In this example two Exchange mailbox servers have been configured:
- EXCHCMS is a CCR cluster and will be the SCR source server
- EXCHMAILBOX is a standalone server and will be the SCR target server
All SCR operations are performed using the Exchange Management Shell. Some of these commands can be run on either the source or target server, but some can only be run on the target server, therefore we will run all commands on the target server.
[PS] C:>Enable-StorageGroupCopy "exchcmsFirst Storage Group" -StandbyMachine EXCHMAILBOX
Initial replication will typically take 24 hours to begin because log shipping does not commence until there are at least 50 log files on the source server, and the default log replay interval is 24 hours which means that none of the logs will be written to the replica database until that time. Once replication is fully operational you can check the status.
[PS] C:>Get-StorageGroupCopyStatus -Server EXCHCMS
-StandbyMachine EXCHMAILBOX
Name SummaryCopy CopyQueue ReplayQueue
Status Length Length
---- ----------- --------- ------------
First Storage Group Healthy 0 11
*** Activating the SCR Target Server
In a disaster situation the SCR source server may be unavailable, and the organization will want to activate the SCR target to continue email operations. First we must make the replica database viable for mounting.
[PS] C:>Restore-StorageGroupCopy "exchcmsFirst Storage Group" -StandbyMachine EXCHMAILBOX -Force
Note that the -force parameter is required when the SCR source is unavailable.
Next we create a new storage group and mailbox database. These must be created in disk locations other than the path of the SCR replica files.
[PS] C:>New-StorageGroup "SG1" -SystemFolderPath D:SG1Logs -LogFolderPath D:SG1Logs Name Server Replicated Recovery ---- ------ ---------- -------- SG1 EXCHMAILBOX None False
[PS] C:>New-MailboxDatabase "Mailbox Database" -StorageGroup SG1 -EdbFilePath "D:SG1DataMailbox Database.edb" Name Server StorageGroup Recovery ---- ------ ------------ -------- Mailbox Database EXCHMAILBOX SG1 False
Now we can move the paths for the new storage group and database to match the location of the replicated log files and database from the SCR source server.
[PS] C:>Move-StorageGroupPath EXCHMAILBOXSG1 -SystemFolderPath "D:SG1First Storage Group" -LogFolderPath "D:SG1First Storage Group" -ConfigurationOnly
[PS] C:>Move-DatabasePath "SG1Mailbox Database" -EdbFilePath "D:SG1First Storage GroupMailbox Database.edb" -ConfigurationOnly
Note that the use of the -ConfigurationOnly parameter means that only the attributes of the object are changed, no actual files are moved.
Next, set the mailbox database to allow it to be overwritten by a restore.
[PS] C:>Set-MailboxDatabase "SG1Mailbox Database" -AllowFileRestore $true
The database can now be mounted.
[PS] C:>Mount-Database "SG1Mailbox Database"
Now that the database has been brought online for the SCR target server the user mailboxes must be re-homed so that they can connect to the new server name.
[PS] C:>Get-Mailbox -Database "EXCHCMSFirst Storage Group
Mailbox Database" |where {$_.ObjectClass -NotMatch
'(SystemAttendantMailbox| ExOleDbSystemMailbox)'}|
Move-Mailbox -ConfigurationOnly -TargetDatabase
"EXCHMAILBOXSG1Mailbox Database"
Clients that are running Outlook 2007 will automatically connect to the new server thanks to the Autodiscover service. Clients on earlier versions of Outlook will only automatically connect if the old server is still online to redirect them, otherwise they will require a manual update of their Outlook profile.
Other Considerations for Standby Continuous Replication
SCR is a useful disaster recovery feature of Exchange Server 2007 but requires careful planning and operation. If not properly configured SCR can cause backup problems for your Exchange environment.
Also, after an SCR target has been brought online an organization may need to take extra steps to re-add high availability to the Exchange environment, such as by configuring a new SCR target for the server or by expanding the server to a cluster configuration.



August 7th, 2009 at 6:32 am
[...] Part 5 – How to use Standby Continuous Replication [...]