Home   Kaiming



 


Local Continuous Replication

new-StorageGroup -Server 'HI' -Name 'SG Vanarts' -LogFolderPath 'C:\Vanarts\logs' -SystemFolderPath 'C:\vanarts\systems'
new-mailboxdatabase -StorageGroup 'HI\SG Vanarts' -Name 'DB Vanarts' -EdbFilePath 'C:\Vanarts\Mailbox\DB Vanarts.edb'
mount-database 'HI\DB Vanarts'

00

Enable-DatabaseCopy 'HI\DB Vanarts' -CopyEdbFilePath "E:\Vanarts\Mailbox\DB Vanarts.edb"
Enable-StorageGroupCopy 'HI\SG Vanarts' -CopyLogFolderPath "E:\vanarts\Logs" -CopySystemFolderPath "E:\vanarts\systems"

01

$password=ConvertTo-SecureString 'a' -AsPlainText -Force
New-Mailbox -Name 'Tamil Tiger' -Alias 'TTiger' -OrganizationalUnit '1ask2.com/Vanarts OU' -UserPrincipalName 'TTiger@1ask2.com' -SamAccountName 'TTiger' -FirstName 'Tamil' -LastName 'Tiger' -Password $password -Database 'HI\SG Vanarts\DB Vanarts'

Send mail to TTiger@1ask2.com

Assuming all the log files under c:\vanarts\logs folder are intact and the "DB Vanarts.edb" is corrupted. We could activate the passive copy of "DB Vanarts.edb".

Dismount-Database 'HI\DB Vanarts'

Restore-StorageGroupCopy -Identity 'HI\SG Vanarts' -ReplaceLocations:$True

Mount-Database 'HI\DB Vanarts'

03

You can access the TTiger@1ask2.com mailbox within no time.

The Local Continuous Copy is disabled when running Restore-StorageGroupCopy.

rm 'c:\vanarts'

Enable-DatabaseCopy 'HI\DB Vanarts' -CopyEdbFilePath "C:\Vanarts\Mailbox\DB Vanarts.edb"
Enable-StorageGroupCopy 'HI\SG Vanarts' -CopyLogFolderPath "C:\vanarts\Logs" -CopySystemFolderPath "C:\vanarts\systems"

Send mail to TTiger@1ask2.com

and wait for 5 mins

Assuming the E:\vanarts\logs folder is gone,

Dismount-Database 'HI\DB Vanarts'

rm 'e:\vanarts\logs'

Restore-StorageGroupCopy -Identity 'HI\SG Vanarts' -ReplaceLocations:$True -Force

Mount-Database 'HI\DB Vanarts'

Even though some data loss occurs, HI\DB Vanarts.edb is accessible.


There is no Local Continuous Replication enabled on both HI.1ask2.com and house.1ask2.com.

Scenario 1: Standby Continuous Replication with each other

01


new-StorageGroup -Server 'HI' -Name 'SG Telus' -LogFolderPath 'C:\Telus\logs' -SystemFolderPath 'C:\Telus\systems'

The prefix of log files is E02.

new-StorageGroup -Server 'House' -Name 'SG Shaw' -LogFolderPath 'C:\Shaw\logs' -SystemFolderPath 'C:\Shaw\systems'

new-mailboxdatabase -StorageGroup 'HI\SG Telus' -Name 'DB Telus' -EdbFilePath 'C:\Telus\Mailbox\DB Telus.edb'
new-mailboxdatabase -StorageGroup 'House\SG Shaw' -Name 'DB Shaw' -EdbFilePath 'C:\Shaw\Mailbox\DB Shaw.edb'

mount-database -Identity 'Hi\DB Telus'
mount-database -Identity 'House\DB Shaw'

Warning:

The built-in lag time of 50 log files, and the value of the ReplayLagTime parameter has implications for the creation of the initial SCR target database. An SCR target database will not be created until 50 transaction log files have been replicated to the SCR target computer, and until the time period specified by ReplayLagTime (or the default ReplayLagTime of 24 hours) has elapsed. This is why the ReplayLagTime is set to 0.0:00:05 (5 seconds).

Enable-StorageGroupCopy -Identity 'HI\SG Telus' -StandbyMachine House -ReplayLagTime 0.0:00:05
Enable-StorageGroupCopy -Identity 'House\SG Shaw' -StandbyMachine HI -ReplayLagTime 0.0:00:05

02

Because both the source and target computers have the C drives, the folder C:\Telus is automatically created on HOUSE computer and the folder c:\Shaw is automatically created on HI computer.

DSAdd OU "OU=Telus OU,DC=1ask2,DC=COM"

DSAdd OU "OU=Shaw OU,DC=1ask2,DC=COM"


$password=ConvertTo-SecureString 'a' -AsPlainText -Force
New-Mailbox -Name 'George Malin' -Alias 'GMalin' -OrganizationalUnit '1ask2.com/Telus OU' -UserPrincipalName 'GMalin@1ask2.com' -SamAccountName 'GMalin' -FirstName 'George' -LastName 'Malin' -Password $password -Database 'HI\SG Telus\DB Telus'

$password=ConvertTo-SecureString 'a' -AsPlainText -Force
New-Mailbox -Name 'Palin Clinton' -Alias 'PClinton' -OrganizationalUnit '1ask2.com/Telus OU' -UserPrincipalName 'PClinton@1ask2.com' -SamAccountName 'PClinton' -FirstName 'Palin' -LastName 'Clinton' -Password $password -Database 'HI\SG Telus\DB Telus'

$password=ConvertTo-SecureString 'a' -AsPlainText -Force

New-Mailbox -Name 'Sasha Belimont' -Alias 'SBelimont' -OrganizationalUnit '1ask2.com/Shaw OU' -UserPrincipalName 'SBelimont@1ask2.com' -SamAccountName 'SBelimont' -FirstName 'Sasha' -LastName 'Belimont' -Password $password -Database 'House\SG Shaw\DB Shaw'

Test-ReplicationHealth

Get-StorageGroupCopyStatus "HI\SG Telus" -StandbyMachine House

05

Send mail with large attachment to Gmalin@1ask2.com for many times until the number of log files reach 50 or more.

08

As seen, not all log files are replayed into the Passive Database (DB Telus.edb).

SCR Target Activation

Assuming the SCR Source database (Hi\Telus\DB Telus.edb) cannot be mounted. In the test environment, I run Dismount-database "HI\DB Telus".

To restore the database availability by creating a temporary storage group and database. I use the same name but in different folders.

The prefix of the Log files is E01.

Because the prefix of log files on Active Storage Group is E02 and the prefix of log files on Temporary Storage Group on HOUSE computer is E01. I have to run ESEUTIL.EXE /R for soft replay the log files into the DB Telus.edb.

10

--Database Recovery Management tool

--Verify the database and transaction log files -- Select "SG Telus" Storage Group -- Select "DB Telus" Database

--Click "Analyze selected databases"

06


Another experiment

Test1.work.com: Domain Controller and Exchange 2007 SP1: mailbox, transport, and client access

Win641.work.com: Mailbox


new-StorageGroup -Server 'TEST1' -Name 'SG Pavilion' -LogFolderPath 'C:\Pavilion\Logs' -SystemFolderPath 'C:\Pavilion\Systems'

new-mailboxdatabase -StorageGroup 'TEST1\SG Pavilion' -Name 'DB Pavilion' -EdbFilePath 'C:\Pavilion\Mailbox\DB Pavilion.edb'

mount-database -Identity "Test1\SG Pavilion\DB Pavilion"

Get-StorageGroup "Test1\SG Pavilion" | fl Name,LogFilePrefix

Name : SG Pavilion
LogFilePrefix : E02

Enable-StorageGroupCopy -Identity 'Test1\SG Pavilion' -StandbyMachine Win641 -ReplayLagTime 0.0:00:05

DSAdd OU "OU=Pavilion OU,DC=Work,DC=COM"

$password=ConvertTo-SecureString 'a' -AsPlainText -Force
New-Mailbox -Name 'Simon Gu' -Alias 'SGu' -OrganizationalUnit 'work.com/Pavilion OU' -UserPrincipalName 'SGU@work.com' -SamAccountName 'SGU' -FirstName 'Simon' -LastName 'GU' -Password $password -Database 'Test1\SG Pavilion\DB Pavilion'

#send mail to SGU@work.com

#create a temporary storage group and a temporary database

new-StorageGroup -Server 'Win641' -Name 'SG Pavilion' -LogFolderPath 'C:\tmp1\Logs' -SystemFolderPath 'C:\tmp1\Systems'

new-mailboxdatabase -StorageGroup 'Win641\SG Pavilion' -Name 'DB Pavilion' -EdbFilePath 'C:\Tmp1 \Mailbox\DB Pavilion.edb'

mount-database -Identity "Win641\SG Pavilion\DB Pavilion"

Dismount-database "Win641\SG Pavilion\DB Pavilion"

Get-StorageGroup "Win641\SG Pavilion" | fl Name,LogfilePrefix

Name : SG Pavilion
LogFilePrefix : E02

#test the activation of passive storage group

Dismount-Database "Test1\SG Pavilion\DB Pavilion"

#the log folder on Test1 is still accessible. At Win641 machine, run Restore-StorageGroupCopy

Restore-StorageGroupCopy "Test1\SG Pavilion" -StandbyMachine "Win641"

#Pointing the path to passive copy folders for the temporary storage group and temporary database

Move-StorageGroupPath "Win641\SG Pavilion" -SystemFolderPath "C:\Pavilion\Systems" -LogFolderPath "C:\Pavilion\Logs" -ConfigurationOnly

Move-DatabasePath "Win641\SG Pavilion\DB Pavilion" -EdbFilePath "C:\Pavilion\Mailbox\DB Pavilion.EDB" -ConfigurationOnly

Set-Mailboxdatabase "Win641\SG Pavilion\DB Pavilion" -AllowFileRestore:$true

#verify the database of "Win641\SG Pavilion\DB Pavilion"

11

Mount-Database "Win641\SG Pavilion\DB Pavilion"

#Because all necessary log files are present, when the database mounts, they are automatically replayed into "DB Pavilion.EDB" database file.

Get-Mailbox -Database "Test1\SG Pavilion\DB Pavilion" |where {$_.ObjectClass -NotMatch '(SystemAttendantMailbox|ExOleDbSystemMailbox)'}| Move-Mailbox -ConfigurationOnly -TargetDatabase "Win641\SG Pavilion\DB Pavilion"


House computer does not have G: drive.

new-StorageGroup -Server 'HI' -Name 'SG Rogers' -LogFolderPath 'G:\Rogers' -SystemFolderPath 'G:\Rogers'

new-mailboxdatabase -StorageGroup 'HI\SG Rogers' -Name 'DB Rogers' -EdbFilePath 'G:\Rogers\DB Rogers.edb'

mount-database -Identity 'Hi\DB Rogers'

When you run Enable-StorageGroupCopy -Identity 'HI\SG Rogers' -StandbyMachine House, the following error occurs:

"Enable-StorageGroupCopy : The location for CopyLogFolderPath is not on a fixed
drive.
At line:1 char:24
+ Enable-StorageGroupCopy <<<< -Identity 'HI\SG Rogers' -StandbyMachine House
"

////////////////////////////////////////////////////////////////////////////////These codes are fine.//////////////////////////////////////////////////////////////////

new-StorageGroup -Server 'HI' -Name 'SG Rogers' -LogFolderPath 'C:\Rogers' -SystemFolderPath 'C:\Rogers'

new-mailboxdatabase -StorageGroup 'HI\SG Rogers' -Name 'DB Rogers' -EdbFilePath 'C:\Rogers\DB Rogers.edb'

mount-database -Identity 'Hi\DB Rogers'

Enable-StorageGroupCopy -Identity 'HI\SG Rogers' -StandbyMachine House

/////////////////////////////////////////////////////////////////////////////////These codes are fine./////////////////////////////////////////////////////////////////


Disable-StorageGroupCopy 'hi\sg telus' -StandbyMachine house

Disable-StorageGroupCopy 'hi\sg rogers' -StandbyMachine house

Disable-StorageGroupCopy 'house\SG Shaw' -StandbyMachine hi