Answered by:
Check Exchange 2010 Databases

Question
-
Hi
We have 100 Databases in our DAG within Germany.
All Databases have named BERMB1, BERMB2, .....BERMB100.
They are all part of DAG : BERDAG01.
I would like on each morning to run a quite script that will tell me:
i. That each DB is mounted
ii. The each DB is replicating ok
iii. That each DB is good for connecvitivity
Can anyone think of any other test that maybe worthwhile?
And what script would I run that would return the above, per DB? I would like it all listed along with the DB name.
Any help appreciated.Saturday, December 17, 2011 3:04 AM
Answers
-
Hi
Please tried the following Script, it listed the server the each database is mounted on, if it is not mounted on, it will not displayed, and then it will test the server status health
-------------------------------------------------------------------------------------
$dbs = Get-MailboxDatabaseCopyStatus | ?{$_.Status -eq "Mounted"}
Foreach($db in $dbs)
{
"Database Name: " + $db.DatabaseName
"Status: " + $db.Status
"Server: " + $db.MailboxServer
Test-ReplicationHealth $db.MailboxServer" "
}--------------------------------------------------------------------------------------
Hope it helps
Cheers
Zi Feng
- Edited by Zi FengModerator Monday, December 19, 2011 2:40 AM
- Proposed as answer by Rowen-Xu Tuesday, December 20, 2011 1:13 AM
- Marked as answer by Rowen-Xu Friday, December 23, 2011 7:16 AM
Monday, December 19, 2011 2:39 AMModerator
All replies
-
I would start by looking at the Get-MailboxDatabaseCopyStatus and Test-ReplicationHealth cmdlets. Those should give you what you're looking for.
Mike Pfeiffer | blog: mikepfeiffer.net | twitter: @mike_pfeifferSaturday, December 17, 2011 3:44 AM -
Please find below article for your referance
http://technet.microsoft.com/en-us/library/dd351258.aspx
Please find below article may help you
http://msexchangeguru.com/2011/08/16/monitor-dags/
Run Get-MailboxDatabaseCopyStatus to monitor the overall health check of database copies
Run Test-ReplicationHealth CMDlet to check replication status of DAG.
Girishp
Saturday, December 17, 2011 9:40 AM -
Thanks...
So for all servers BERMB1, BERMB2, .....BERMB100, do you know how I can find out:
1. Which server the DB is mounted on (or indeed if it is mounted)
2. The status of its replication healthUsing one Powershell script?
Saturday, December 17, 2011 8:10 PM -
Hi
Please tried the following Script, it listed the server the each database is mounted on, if it is not mounted on, it will not displayed, and then it will test the server status health
-------------------------------------------------------------------------------------
$dbs = Get-MailboxDatabaseCopyStatus | ?{$_.Status -eq "Mounted"}
Foreach($db in $dbs)
{
"Database Name: " + $db.DatabaseName
"Status: " + $db.Status
"Server: " + $db.MailboxServer
Test-ReplicationHealth $db.MailboxServer" "
}--------------------------------------------------------------------------------------
Hope it helps
Cheers
Zi Feng
- Edited by Zi FengModerator Monday, December 19, 2011 2:40 AM
- Proposed as answer by Rowen-Xu Tuesday, December 20, 2011 1:13 AM
- Marked as answer by Rowen-Xu Friday, December 23, 2011 7:16 AM
Monday, December 19, 2011 2:39 AMModerator