Exchange 2010 DAG Status
Hello
We're running Exchange 2010 SP1, we have 100 DB's in our DAG in Germany spread over multiple servers across two sites. For each DB, we have a primary copy, replication copies and a lag copy. All our databases are named BERMB1, BERMB2, .....BERMB100
I would like to run a Powershell that tells me that whether each DB is mounted, that's all. I don't need to know whether their copies are ok, just that they are mounted. This is an emergency test if you like.
I find that if I run
Get-mailboxdatabasecopystatus -Identity BERMB*
Then I am returned values for ALL the copies. How can I just get returned the names of the DB's, confirmation that they are mounted, and theserver they are mounted on?
January 7th, 2012 2:48pm
This should get you the DB's that are mounted, and their respective servers that they are mounted on:
Get-MailboxDatabaseCopyStatus BERMB* | where {$_.Status -eq "mounted"} | ft databasename, status, activedatabasecopy
Free Windows Admin Tool Kit Click here and download it now
January 7th, 2012 3:40pm
Hi,
try out my script. It is for monitoring the database statux with NAGIOS. But I think it should give youe the status result you need.
http://sus42.wordpress.com/2011/01/06/monitoring-microsoft-exchange-2010-with-nagios/
regards Thomas Paetzold visit my blog on: http://sus42.wordpress.com
January 7th, 2012 5:44pm
Thank you both.
Regarding this script here:
Get-MailboxDatabaseCopyStatus BERMB* | where {$_.Status -eq "mounted"} | ft databasename, status, activedatabasecopy
This wouldn't show if a mailbox was dismounted though would it? I would like to know the status of all my databases, whether they are mounted or not?
Thanks again!
Free Windows Admin Tool Kit Click here and download it now
January 7th, 2012 8:21pm
On Sun, 8 Jan 2012 01:16:05 +0000, Smith1974 wrote:
>
>
>Thank you both.
>
>Regarding this script here:
>
>Get-MailboxDatabaseCopyStatus BERMB* | where {$_.Status -eq "mounted"} | ft databasename, status, activedatabasecopy
>
>This wouldn't show if a mailbox was dismounted though would it? I would like to know the status of all my databases, whether they are mounted or not?
Then just omit the "| where {....}" and pipe the output of the
get-mailboxdatabasecopystatus right into the FT cmdlet.
---
Rich Matheisen
MCSE+I, Exchange MVP
--- Rich Matheisen MCSE+I, Exchange MVP
January 7th, 2012 10:37pm
@ Smith1974 - yes, you are correct, the cmd I mentioned would not show a dismounted database. If all you want to see are JUST mounted and dismounted databases (ie: not healthy copies, failed copies, etc), you could try the following
cmd:
Get-MailboxDatabaseCopyStatus BERMB* | where {$_.Status -like "*mounted"} | ft databasename, status, activedatabasecopy
-Matt
Free Windows Admin Tool Kit Click here and download it now
January 8th, 2012 10:12am
If all you need is to see if a DB is mounted or not, the easiest way is:
Get-MailboxDatabase -Status | Select Name, Mounted
For a single DB:
Get-MailboxDatabase MDB1 -Status | Select Mounted
http://LetsExchange.blogspot.com
January 8th, 2012 10:48am
@ Smith1974 - yes, you are correct, the cmd I mentioned would not show a dismounted database. If all you want to see are JUST mounted and dismounted databases (ie: not healthy copies, failed copies, etc), you could try the following
cmd:
Get-MailboxDatabaseCopyStatus BERMB* | where {$_.Status -like "*mounted"} | ft databasename, status, activedatabasecopy
-Matt
Free Windows Admin Tool Kit Click here and download it now
January 8th, 2012 6:06pm
If all you need is to see if a DB is mounted or not, the easiest way is:
Get-MailboxDatabase -Status | Select Name, Mounted
For a single DB:
Get-MailboxDatabase MDB1 -Status | Select Mounted
http://LetsExchange.blogspot.com
January 8th, 2012 6:42pm
Hi Smith,
Any updates?Frank Wang
TechNet Community Support
Free Windows Admin Tool Kit Click here and download it now
January 9th, 2012 10:40pm
Thanks everyone..
Just before we finish, does anyone know what states the active copy of a database can be? I was thinking Mounted, Dismounted, and Mounting? Basically, all I want to know if the state of the ACTIVE database?
January 10th, 2012 4:47pm
There are a lot more! :) I guess if a DB is active it has to be mounted otherwise it is not the active one, unless you are talking about the
ContentIndexState as well.
You can check them all here:
Monitor Databases in DAGshttp://LetsExchange.blogspot.com
Free Windows Admin Tool Kit Click here and download it now
January 10th, 2012 4:53pm