locked
Exchange 2007 - Mounted restored EDB shows no mailboxes - Please help. RRS feed

  • Question

  • We had a database get dismounted and its .edb file get deleted by accident.

    Fortunately I was able to restore from a file-level back up the necessary files to put a backup of the .edb file into a clean state. 

    Before the database had been deleted, its name was DB2. And there were users who connected to this database for their mailboxes. After it got deleted, they lost all access to their mailbox. 

    So what I tried to do here is create a new database as the same name, "DB2", dismounted.

    I copied the large .edb file into this new database's folder, and I was able to mount it.

    However, now, I don't show any mailboxes in this database, even though the .edb is many GB in size. 

    How do I get the mailboxes to show up? Exchange Management Console isn't showing. Powershell retrieves no results for get-mailbox against this database, either. 

    I tried to set some of the known users' HomeMDB value in ADSI to point to this database, which makes them show up as a mail user in the database, however they have NO data in their mailbox. It's like it's brand new, but the account is not "picking up" the mailbox that I know is inside the .edb file. 

    What can I do? Please help. 

    edit: 

    Ok just realized, that the .edb path for the database I created is pointing to a new, different edb that's like 600MB in size.   
    Could I change the database path for the mailbox database to another edb file that has the mailboxes? Will that overwrite the edb file and create a new one? 
    • Edited by JGQ85 Tuesday, May 19, 2015 3:14 AM
    Tuesday, May 19, 2015 3:01 AM

Answers

  • You have mailboxes that show as disconnected in the EDB right now.  You want to attach these to the existing accounts, but the commands aren't working because you can't connect a mailbox to an account that already has mailbox attributes.  So, mailbox disable one of the accounts that matches one of your disconnected mailboxes.  Once the account has been mailbox disabled, select the matching disconnected mailbox and attach it to the account.  In your PowerShell above, you would run the following:

    Disable-Mailbox -Identity "Paul Abram Shrogin" -DomainController sub.domain.com
    Connect-Mailbox -Identity "Paul Abram Shrogin" -Database "DB2" -User "PShrogin" -ManagedFolderMailboxPolicyAllowed -DomainController sub.domain.com

    See if that helps you.


    Will Martin ...
    -join ('77696c6c406d617274696e2d66616d696c6965732e6f7267' -split '(?<=\G.{2})' | ? { $_ } | % { [char][int]"0x$_" })

    • Marked as answer by JGQ85 Tuesday, May 19, 2015 8:11 PM
    Tuesday, May 19, 2015 5:32 PM
  • Well thank you again, you've no idea how much it means. 

    Since Saturday night I've been so wrecked over this mistake, I saw no light at the end of the tunnel. 

    Since there were like 750 mailboxes, disabled all of them, then the command helped:

    get-mailboxstatistics -database DB2| where { $_.DisconnectDate -ne $null } | connect-mailbox -database DB2-DomainController sub.domain.com

    Tuesday, May 19, 2015 7:58 PM

All replies

  • You can change the path - make sure when you do this that you select This database can be overwritten by a restore, or you will have problems.

    Will Martin ...
    -join ('77696c6c406d617274696e2d66616d696c6965732e6f7267' -split '(?<=\G.{2})' | ? { $_ } | % { [char][int]"0x$_" })

    Tuesday, May 19, 2015 12:29 PM
  • You can change the path - make sure when you do this that you select This database can be overwritten by a restore, or you will have problems.

    Will Martin ...
    -join ('77696c6c406d617274696e2d66616d696c6965732e6f7267' -split '(?<=\G.{2})' | ? { $_ } | % { [char][int]"0x$_" })

    Ok I was successfull in doing it and the proper edb is mounted, except no mailboxes are showing on the database.

    I show some mailboxes have trickled into the "disconnected mailboxes" section, but when I try to connect one that had been pointed to the same database name, there is no listed user anywhere that matches their username. 

    It's like they have a mailbox, but they're not connected to it, and I've no way to connect them to it. 

    Tuesday, May 19, 2015 1:01 PM
  • Unless the AD objects had the mailboxes removed, this should work.  Before you do anything, I highly suggest you set the database to hold disconnected mailboxes for at least a year - otherwise, you're going to start losing them.  Can you connect one of the disconnected mailboxes to any account (not just the matching one)?

    Will Martin ...
    -join ('77696c6c406d617274696e2d66616d696c6965732e6f7267' -split '(?<=\G.{2})' | ? { $_ } | % { [char][int]"0x$_" })

    Tuesday, May 19, 2015 2:41 PM
  • Unless the AD objects had the mailboxes removed, this should work.  Before you do anything, I highly suggest you set the database to hold disconnected mailboxes for at least a year - otherwise, you're going to start losing them.  Can you connect one of the disconnected mailboxes to any account (not just the matching one)?

    Will Martin ...
    -join ('77696c6c406d617274696e2d66616d696c6965732e6f7267' -split '(?<=\G.{2})' | ? { $_ } | % { [char][int]"0x$_" })

    Yeah only the database had been dismounted, removed, and its .edb file deleted. 

    Nobody's mailbox was removed

    In Exchange Management Console: 

    When I try to right-click their mailbox and choose Connect, I'm not seeing any matching names to match them to

    Then in Powershell:

    Connect-Mailbox -Identity "Paul Abram Shrogin" -Databas
    e "DB2" -User "PShrogin" -ManagedFolderMailboxPolicyAllowed -DomainContr
    oller sub.domain.com and get:

    Connect-Mailbox : The mailbox that you specified is connected to "Paul Abram Sh
    rogin". Only disconnected mailboxes can be reconnected. Specified mailbox: "1b9
    6d175-f3d1-447d-b279-8edeffa566d4".
    At line:1 char:16
    + Connect-Mailbox <<<<  -Identity "Paul Abram Shrogin" -Database "DB2"
    -User "PShrogin" -ManagedFolderMailboxPolicyAllowed -DomainController sub.domain.com
        + CategoryInfo          : InvalidOperation: (:) [Connect-Mailbox], Invalid
       OperationException
        + FullyQualifiedErrorId : 768ADF4B,Microsoft.Exchange.Management.MapiTasks
       .ConnectMailbox

    And when I just simply try:

    Get-mailbox -database DB2, no results are returned
    And 
    Get-mailbox -database DB2 -domaincontroller DC.sub.domain.com
    no results returned either

    But I know without a doubt the mailboxes are in the EDB file, because I was able to use a third-party EDB explorer type program that can export to PST, and I can see the mailboxes. 
    Restoring PSTs for hundreds of people though will not be efficient, sadly :( :( :(



    • Edited by JGQ85 Tuesday, May 19, 2015 4:13 PM
    Tuesday, May 19, 2015 4:11 PM
  • If the account has mailbox attributes enabled, you can't add a mailbox to it.  Have you tried mailbox-disabling an account, then attaching its disabled mailbox from your backup?

    Will Martin ...
    -join ('77696c6c406d617274696e2d66616d696c6965732e6f7267' -split '(?<=\G.{2})' | ? { $_ } | % { [char][int]"0x$_" })

    Tuesday, May 19, 2015 5:03 PM
  • If the account has mailbox attributes enabled, you can't add a mailbox to it.  Have you tried mailbox-disabling an account, then attaching its disabled mailbox from your backup?

    Will Martin ...
    -join ('77696c6c406d617274696e2d66616d696c6965732e6f7267' -split '(?<=\G.{2})' | ? { $_ } | % { [char][int]"0x$_" })

    Ok well man this is a tough one, I've been so stressed over this. Your help means a lot. 

    As far as disabling, are you saying disable the AD account? Then what should I do, I'm not sure what meant by disabled mailbox from the backup. It's just a mounted .edb file that should contain the mailbox but I can't see any mailboxes when I list in EMC or the SHell 

    Tuesday, May 19, 2015 5:20 PM
  • You have mailboxes that show as disconnected in the EDB right now.  You want to attach these to the existing accounts, but the commands aren't working because you can't connect a mailbox to an account that already has mailbox attributes.  So, mailbox disable one of the accounts that matches one of your disconnected mailboxes.  Once the account has been mailbox disabled, select the matching disconnected mailbox and attach it to the account.  In your PowerShell above, you would run the following:

    Disable-Mailbox -Identity "Paul Abram Shrogin" -DomainController sub.domain.com
    Connect-Mailbox -Identity "Paul Abram Shrogin" -Database "DB2" -User "PShrogin" -ManagedFolderMailboxPolicyAllowed -DomainController sub.domain.com

    See if that helps you.


    Will Martin ...
    -join ('77696c6c406d617274696e2d66616d696c6965732e6f7267' -split '(?<=\G.{2})' | ? { $_ } | % { [char][int]"0x$_" })

    • Marked as answer by JGQ85 Tuesday, May 19, 2015 8:11 PM
    Tuesday, May 19, 2015 5:32 PM
  • You have mailboxes that show as disconnected in the EDB right now.  You want to attach these to the existing accounts, but the commands aren't working because you can't connect a mailbox to an account that already has mailbox attributes.  So, mailbox disable one of the accounts that matches one of your disconnected mailboxes.  Once the account has been mailbox disabled, select the matching disconnected mailbox and attach it to the account.  In your PowerShell above, you would run the following:

    Disable-Mailbox -Identity "Paul Abram Shrogin" -DomainController sub.domain.com
    Connect-Mailbox -Identity "Paul Abram Shrogin" -Database "DB2" -User "PShrogin" -ManagedFolderMailboxPolicyAllowed -DomainController sub.domain.com

    See if that helps you.


    Will Martin ...
    -join ('77696c6c406d617274696e2d66616d696c6965732e6f7267' -split '(?<=\G.{2})' | ? { $_ } | % { [char][int]"0x$_" })

    Please give me your paypal or contact info to give you a donation for your help.

    Btw, yes this appears to be working. 

    Know what? My boss had me call Microsoft a couple mins before you posted this resolution, so I hadn't had time to try it out. 

    And guess what the Engineer at Microsoft did to resolve the issue? Hint: See your very own post. 


    Tuesday, May 19, 2015 6:58 PM
  • I worked for Microsoft for 13 years, all of it with Exchange.  As for a donation, share it forward.  When you see something you can help with, consider it partial payment.  😊  Glad I was able to help out ...

    Will Martin ...
    -join ('77696c6c406d617274696e2d66616d696c6965732e6f7267' -split '(?<=\G.{2})' | ? { $_ } | % { [char][int]"0x$_" })

    Tuesday, May 19, 2015 7:53 PM
  • Well thank you again, you've no idea how much it means. 

    Since Saturday night I've been so wrecked over this mistake, I saw no light at the end of the tunnel. 

    Since there were like 750 mailboxes, disabled all of them, then the command helped:

    get-mailboxstatistics -database DB2| where { $_.DisconnectDate -ne $null } | connect-mailbox -database DB2-DomainController sub.domain.com

    Tuesday, May 19, 2015 7:58 PM