locked
Exchange 2010 DAG Status RRS feed

  • Question

  • 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?

    Saturday, January 7, 2012 7:42 PM

Answers

  • @ 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

    • Proposed as answer by emma.yoyo Tuesday, January 10, 2012 3:33 AM
    • Marked as answer by emma.yoyo Monday, January 16, 2012 1:48 AM
    Sunday, January 8, 2012 3:06 PM
  • 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
    • Proposed as answer by emma.yoyo Tuesday, January 10, 2012 3:33 AM
    • Marked as answer by emma.yoyo Monday, January 16, 2012 1:48 AM
    Sunday, January 8, 2012 3:42 PM

All replies

  • 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

    Saturday, January 7, 2012 8:34 PM
  • 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
    • Edited by Peddy1st Saturday, January 7, 2012 10:39 PM
    Saturday, January 7, 2012 10:38 PM
  • 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!

    Sunday, January 8, 2012 1:16 AM
  • 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
    Sunday, January 8, 2012 3:31 AM
  • @ 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

    • Proposed as answer by emma.yoyo Tuesday, January 10, 2012 3:33 AM
    • Marked as answer by emma.yoyo Monday, January 16, 2012 1:48 AM
    Sunday, January 8, 2012 3:06 PM
  • 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
    • Proposed as answer by emma.yoyo Tuesday, January 10, 2012 3:33 AM
    • Marked as answer by emma.yoyo Monday, January 16, 2012 1:48 AM
    Sunday, January 8, 2012 3:42 PM
  • Hi Smith,

    Any updates?


    Frank Wang

    TechNet Community Support

    Tuesday, January 10, 2012 3:33 AM
  • 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?

    Tuesday, January 10, 2012 9:40 PM
  • 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 DAGs


    http://LetsExchange.blogspot.com
    Tuesday, January 10, 2012 9:46 PM