[exchange 2016] Database is mandatory on usermailbox.

Роман Лазарев 26 Reputation points
2022-05-31T09:35:16.783+00:00

Greetings!

There is the exchange server 2016 with an error "Database is mandatory on UserMailbox" when i try to use Get-mailbox command or open mailbox properties from ECP.

What previous administrator did(may be help to understand what happen here):

  1. Old vm died and was reinstalled in recovery mode;
  2. System mailboxes(in users OU) was deleted and recreated with prepare ad
  3. Some dead databases were deleted roughly wish ADSI

I've checked homedb parameter of all of the system mailboxes. Get-mailbox -arbitration give me the same error. In users parameters there are also the right homedb values. Mail flow works good. New mailboxes are created with no problems. I restarted the server na mount/dismouts the bases with no luck. Where shall i look to solve this problem? Thank you!

Exchange Server Management
Exchange Server Management
Exchange Server: A family of Microsoft client/server messaging and collaboration software.Management: The act or process of organizing, handling, directing or controlling something.
7,349 questions
0 comments No comments
{count} votes

Accepted answer
  1. Aholic Liang-MSFT 13,741 Reputation points Microsoft Vendor
    2022-06-02T01:54:05.38+00:00

    Hi @Роман Лазарев ,

    Thank you for answer! But solution is to find all accounts with none empty mail attribute but with empty homeMDB and set homeMDB, delete account or delete mail and legacy exchange DN. Maybe it can help someone in the future! Good luck all!

    Great to know that you've managed to sort it out and really appreciate it for your sharing!

    By the way, since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others.". and according to the scenario introduced here: Answering your own questions on Microsoft Q&A, I would make a brief summary of this thread:

    [[exchange 2016] Database is mandatory on usermailbox.]

    Issue Symptom:

    There is the exchange server 2016 with an error "Database is mandatory on UserMailbox" when i try to use Get-mailbox command or open mailbox properties from ECP.

    Root Cause:

    But solution is to find all accounts with none empty mail attribute but with empty homeMDB and set homeMDB, delete account or delete mail and legacy exchange DN. Maybe it can help someone in the future! Good luck all!

    Get-ADUser -Filter -Properties | where{$.legacyExchangeDN -ne $null -AND $.homeMDB -eq $null} | ft Name  
    

    You could click the "Accept Answer" button for this summary to close this thread, and this can make it easier for other community member's to see the useful information when reading this thread. Thanks!

    0 comments No comments

4 additional answers

Sort by: Most helpful
  1. Aholic Liang-MSFT 13,741 Reputation points Microsoft Vendor
    2022-06-01T05:33:34.217+00:00

    Hi @Роман Лазарев ,

    In my opinion, the main causes of this may be that the original database where the mailboxes were stored has been deleted and the database location has not been changed.
    You could refer to the following steps to locate these mailboxes in the new database.
    (NOTE: The repositioned mailbox will create a brand new empty mailbox!)

    1.Run the following cmdlet to check whether the mailbox database associated with the system mailbox exists or is correct.

    Get-Mailbox –Arbitration | ft Name, ServerName, Database –Auto  
    

    2.Open the Active Directory Users and Computers, check the Advanced Features in the view tab。
    207391-2022-6-1-1.png

    3.Find a new mailbox that confirms there is no such warning and enter the ‘Attribute Editor’ tab in the properties container.

    4.Double click on the homeMDB parameter and copy its value to the text editor.

    5.Go to the mailbox with the warning and use the copied parameter to change it to the homeMDB parameter .
    (Note: Please modify the parameters carefully to avoid unnecessary issues)

    207296-2022-6-1-2.png

    6.Changes can be forced to take effect by restarting the Exchange Information Store service.
    (NOTE: All the users that have their mailbox on the effected databases will lose their Outlook Connection for a short moment.)


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our [documentation][3] to enable e-mail notifications if you want to receive the related email notification for this thread.

    [3]: https://learn.microsoft.com/en-us/answers/articles/67444/email-notifications.html

    0 comments No comments

  2. Роман Лазарев 26 Reputation points
    2022-06-01T16:08:55.907+00:00

    Thank you for answer! But solution is to find all accounts with none empty mail attribute but with empty homeMDB and set homeMDB, delete account or delete mail and legacy exchange DN. Maybe it can help someone in the future! Good luck all!

    Get-ADUser -Filter * -Properties * | where{$.legacyExchangeDN -ne $null -AND $.homeMDB -eq $null} | ft Name

    0 comments No comments

  3. Роман Лазарев 26 Reputation points
    2022-06-05T08:26:18.917+00:00

    Yeah, ty! Accepted your post. Good luck and have a clean event log.

    0 comments No comments

  4. Mduduzi Boqo 0 Reputation points
    2024-03-22T08:12:10.4733333+00:00

    Good day

    I have a similar question I had an Exchange 2010 server that was deleted by mistake and we were unable to restore the deleted server. I then created a new server with OS:2019 and tried to install Exchange 2019. Passed all the prerequisites but am getting this error below.

    The following error was generated when "$error.Clear();

          if ( ($server -eq $null) -and ($RoleIsDatacenter -ne $true) )
    
          {
    
            Update-RmsSharedIdentity -ServerName $RoleNetBIOSName
    
          }
    
        " was run: "Microsoft.Exchange.Data.DataValidationException: Database is mandatory on UserMailbox.
    

    at Microsoft.Exchange.Data.Directory.ADDataSession.Save(ADObject instanceToSave, IEnumerable`1 properties, Boolean bypassValidation)

    at Microsoft.Exchange.Data.Directory.Recipient.ADRecipientObjectSession.Save(ADRecipient instanceToSave, String callerFilePath, Int32 callerFileLine, String memberName)

    at Microsoft.Exchange.Management.Deployment.UpdateRmsSharedIdentity.Link()

    at Microsoft.Exchange.Management.Deployment.UpdateRmsSharedIdentity.InternalProcessRecord()

    at Microsoft.Exchange.Configuration.Tasks.Task.<ProcessRecord>b__91_1()

    at Microsoft.Exchange.Configuration.Tasks.Task.InvokeRetryableFunc(String funcName, Action func, Boolean terminatePipelineIfFailed)".

    0 comments No comments