HIGH AVAILABILITY CMDLETS AND SCRIPTS Database Availability Groups
HIGH AVAILABILITY CMDLETS AND SCRIPTS
Database Availability Groups New-Database. Availability. Group Create a DAG in Active Directory Get-Database. Availability. Group View DAG properties Set-Database. Availability. Group Configure DAG properties Remove-Database. Availability. Group Delete a DAG from Active Directory Database Availability Group Membership Add-Database. Availability. Group. Server Add a Mailbox server to a DAG Remove-Database. Availability. Group. Server Remove a Mailbox server from a DAG
Database Availability Group Networks New-Database. Availability. Group. Network Create a DAG network Get-Database. Availability. Group. Network View properties of a DAG network Set-Database. Availability. Group. Network Configure properties of a DAG network Remove-Database. Availability. Group. Network Delete a DAG network Mailbox Database Copies Add-Mailbox. Database. Copy Create a passive copy of a mailbox database Set-Mailbox. Database. Copy Configure properties of a mailbox database copy Remove-Mailbox. Database. Copy Delete a passive copy of a mailbox database
Mailbox Database Copies Suspend-Mailbox. Database. Copy Suspends continuous replication and/or activation for a passive copy of a mailbox database Resume-Mailbox. Database. Copy Resumes continuous replication and/or activation for a passive copy of a mailbox database Update-Mailbox. Database. Copy Seeds a passive copy of a mailbox database and/or it’s content index catalog Move-Active. Mailbox. Database Perform a database or server switchover and activates passive copy(ies) of mailbox database(s)
DAGs and DAG Members Start. Dag. Server. Maintenance. ps 1 Put a DAG member into maintenance mode to being a scheduled outage Stop. Dag. Server. Maintenance. ps 1 Take a DAG member out of maintenance mode to end a scheduled outage Redistribute. Active. Databases. ps 1 Balance a DAG that has become un-balanced over time
DAGs and Continuous Replication Get-Mailbox. Database. Copy. Status View health and status information for a replicated mailbox database Test-Replication. Health Check health of all aspects of replication, replay and cluster for a DAG Collect. Over. Metrics. ps 1 Gather information about database mounts, moves, and failovers over a specific time period Collect. Replication. Metrics. ps 1 Collect performance metrics for continuous replication in real-time Check. Database. Redundancy. ps 1 Checks for and alerts on condition where you are down to a single copy of a replicated database
Site Resilience / Datacenter Switchovers Stop-Database. Availability. Group Mark DAG members as down during a datacenter switchover Restore-Database. Availability. Group Shrink DAG and restore quorum to surviving DAG members during a datacenter switchover Start-Database. Availability. Group Reincorporate recovered or restored DAG members during reactivation of (failback to) a primary datacenter Move-Active. Mailbox. Database Perform a database or server switchover and activate passive copy(ies) of mailbox database(s)
Auto database mount dial / Database activation policy Get-Mailbox. Server View properties of a Mailbox server (Auto. Database. Mount. Dial, Database. Copy. Auto. Activation. Policy, Maximum. Active. Databases, and DAG membership) Set-Mailbox. Server Configure Auto. Database. Mount. Dial, Maximum. Active. Databases or Database. Copy. Auto. Activation. Policy for a DAG Get-Mailbox. Database View properties of a mailbox database (Data. Move. Replication. Constraint) Set-Mailbox. Database Configure Data. Move. Replication. Constraint for a replicated mailbox database
OPERATIONAL BEST PRACTICES
MSExchange DatabaseI/O Database Reads (Attached) Average Latency MSExchange DatabaseI/O Database Writes (Attached) Average Latency DatabaseDatabase Page Fault Stalls/sec
MSExchange DatabaseIO Log Writes Average Latency DatabaseLog Record Stalls/sec DatabaseLog Threads Waiting
MSExchange DatabaseI/O Database Reads (Recovery) Average Latency MSExchange DatabaseI/O Database Writes (Recovery) Average Latency DatabaseDatabase Page Fault Stalls/sec MSExchange DatabaseIO Log Reads Average Latency
http: //technet. microsoft. com/enus/library/ff 367871. aspx
Check. Database. Redundancy. ps 1 -Mailbox. Database. Name DB 1
http: //technet. microsoft. com/enus/library/dd 351258. aspx#Check. DBRedun
Server Active databases Passive databases Mounted databases Dismounted databases Preference count list EX 1 5 11 5 0 4, 4, 3, 5 EX 2 1 15 1 0 1, 8, 6, 1 EX 3 12 4 12 0 13, 2, 1, 0 EX 4 1 15 1 0 1, 1, 5, 9
Balance. Dbs. By. Activation. Preference Balance. Dbs. By. Site. And. Activation. Preference Server Active databases Passive databases Mounted databases Dismounted databases Preference count list EX 1 5 4 11 12 5 4 0 4, 4, 3, 4, 5 4 EX 2 1 4 15 12 1 4 0 1, 4, 8, 4, 6, 4, 1 4 EX 3 12 4 4 12 12 4 0 13, 2, 4, 1, 40 4, 4, EX 4 15 12 1 4 0 1, 4, 5, 4, 9 4
http: //technet. microsoft. com/en-us/library/dd 335158. aspx Server Active databases Passive databases Mounted databases Dismounted databases Preference count list EX 1 4 12 4 0 4, 4, 4, 4 EX 2 4 12 4 0 4, 4, 4, 4 EX 3 4 12 4 0 4, 4, 4, 4 EX 4 4 12 4 0 4, 4, 4, 4
REAL-WORLD OPERATIONAL HOW-TO’S
CONFIGURATION TASKS
Set-Database. Availability. Group -Identity DAG 1 -Alternate. Witness. Directory C: DAGFSWDAG 1. contoso. com -Alternate. Witness. Server EXHUB 3 Set-Database. Availability. Group -Identity DAG 1 -Database. Availability. Group. Ip. Addresses 10. 0. 0. 8, 10. 0. 1. 8 Set-Database. Availability. Group -Identity DAG 1 -Datacenter. Activation. Mode Dag. Only Set-Database. Availability. Group -Identity DAG 1 -Replication. Port 63132 Set-Database. Availability. Group –Identity DAG 1 -Discover. Networks
1. Set-Database. Availability. Group. Network -Identity DAG 2DAGNetwork 02 -Replication. Enabled: $false -Ignore. Network: $true 2. Cluster network Cluster. Network. Name /prop Role=0
Set-Mailbox. Server EX 1 -Auto. Database. Mount. Dial Good. Availability
MONITORING TASKS
Get-Database. Availability. Group DAG 1 | %{ $_. Servers | %{ Get. Mailbox. Database. Copy. Status -Server $_ } }
Get-Database. Availability. Group DAG 1 | %{ $_. Servers | %{ Test. Replication. Health -Server $_ } }
Get-Mailbox. Database -Status | ft Name, Server, *Backup* $Databases = Get-Mailbox. Database -Server <Server. Name> -Status $Databases | ft Name, *Backup*
Redistribute. Active. Databases. ps 1 -Dag. Name DAG 1 -Show. Database. Distribution. By. Server | ft Redistribute. Active. Databases. ps 1 -Dag. Name DAG 1 -Balance. Dbs. By. Activation. Preference -Show. Final. Database. Distribution
RECOVERY AND MAINTENANCE TASKS
Move-Active. Mailbox. Database -Server MBX 1 Move-Active. Mailbox. Database -Server MBX 4 -Activate. On. Server MBX 5
Move-Active. Mailbox. Database DB 3 -Activate. On. Server MBX 4 Move-Active. Mailbox. Database DB 4 -Activate. On. Server MBX 3 -Mount. Dial. Override: Good. Availability Move-Active. Mailbox. Database DB 5 MBX 6 –Skip. Client. Experience. Checks Move-Active. Mailbox. Database DB 5 MBX 6 -Skip. Lag. Checks
OPERATIONAL NOTES
An adm databas Active. M The tas Exchan (based ms. Exch If serve referred PAM co PAM se consult
If the ser the PAM • If the reque servic • If the reque When the and upda persisten PAM Rep service o active co
The Sou remainin The Targ request service The Info and mou The Targ success service The Targ success The PAM remote P Remote failure m
Get-Database. Availability. Group DAG 1 | fl Primary. Active. Manager Move-Cluster. Group “Cluster Group” -Node MBX 2 Cluster group “cluster group” /move
Skip. Health. Checks Skip. Lag. Checks Skip. Client. Experience. Checks
Update-Mailbox. Database. Copy -Identity DB 1MBX 1 -Source. Server MBX 2 -Network DAG 1Replication –Network. Compression. Override: Off Update-Mailbox. Database. Copy -Identity DB 1MBX 1 -Source. Server MBX 2 -Network DAG 1Replication –Network. Encryption. Override: Use. DAGDefault
QUESTIONS?
http: //blogs. technet. com/b/exchange http: //technet. microsoft. com/en-us/exchange/default. aspx http: //technet. microsoft. com/en-us/lync http: //blogs. technet. com/b/lync/
Resources Connect. Share. Discuss. http: //northamerica. msteched. com Sessions On-Demand & Community Microsoft Certification & Training Resources www. microsoft. com/teched www. microsoft. com/learning Resources for IT Professionals Resources for Developers http: //microsoft. com/technet http: //microsoft. com/msdn
- Slides: 58