Testing SCR
Now that we enabled and checked the replication health, we will test and move one of the databases to be mounted on the target server.
Create a test storage group with one database on the source mailbox server, in my example I'll create the storage group Tj-Users at E:\Storage-Group-01\Logs for logs and F:\Storage-Group-01 for the database.
Create a test mailbox, and send emails to it. Send emails with large attachments to quickly generate logs. As we already said, the database will only be created after the first 50 logs have been replicated to the target mailbox server.
Enable and test the replication for this storage group then follow these steps to mount the database at the target server:
Create a temporary Storage Groups on the SCR target server.
New-StorageGroup -Name SCRTj-Users -Server Tj-SCR -LogFolderPath:"D:\SCR\SCRTj-Users" -SystemFolderPath:"D:\SCR\SCRTj-Users"
Create and dismount a temporary Database on the SCR target server.
New-MailboxDatabase -StorageGroup "Tj-SCR\SCRTj-Users" -Name "SCRTj-scrDB" -EdbFilePath D:\SCRDBs\SCRTj-Users\SCRTj-scrDB.edb
Dismount-Database SCRTj-Users\SCRTj-scrDB
Dismount the Source database (if the source server is available).
Activate the Storage Groups on the target server:
Restore-StorageGroupCopy Tj-Ex1\Tj-Users -StandbyMachine Tj-SCR
You may need to use the "-Force" parameter if the source server can't be contacted.
Restore-StorageGroupCopy Tj-Ex1\Tj-Users -StandbyMachine Tj-SCR -Force
Check if the database is in a Clean Shutdown state:
eseutil /mh F:\Storage-Group-01\Database-01.edb
Note that the path is the same as the source database on the source server.
If the database is in a Dirty Shutdown state, then we need to fix it using the command:
eseutil /r E08 /dF:\Storage-Group-01\Database-01.edb /lE:\Storage-Group-01\Logs
Check again if the database is in a Clean Shutdown state:
eseutil /mh F:\Storage-Group-01\Database-01.edb
Set the paths of the storage group and the database on the target SCR server to the path of the replicated storage group and database:
Move-StorageGroupPath Tj-SCR\SCRTj-Users -SystemFolderPath E:\Storage-Group-01\Logs -LogFolderPath E:\Storage-Group-01\Logs -ConfigurationOnly
Move-DatabasePath Tj-SCR\SCRTj-Users\SCRTj-scrDB -EdbFilePath F:\Storage-Group-01\Database-01.edb -ConfigurationOnly
Allow the Databse to be restored
Set-Mailboxdatabase Tj-SCR\SCRTj-Users\SCRTj-scrDB -AllowFileRestore:$true
Mount the Database on the Target SCR Server
Mount-Database Tj-SCR\SCRTj-Users\SCRTj-scrDB
Move the Mailboxes configuration to the Database on the Target SCR server
Get-Mailbox -Database Tj-Ex1\Tj-Users\Database-01 |where {$_.ObjectClass -NotMatch '(SystemAttendantMailbox|ExOleDbSystemMailbox)'}| Move-Mailbox -ConfigurationOnly -TargetDatabase Tj-SCR\SCRTj-Users\SCRTj-scrDB
Replicate the Domain Controllers in both the mail and the DR sites.
Conclusion
In this article we went through a brief overview of SCR. We covered the basic requirements for the source and target servers, enabled and tested the replication between the source and target SCR servers. Finally we also tested moving the database and mounting it at the target SCR server.
References
TechNet: Standby Continuous Replication
TechNet: Managing Standby Continuous Replication