Delete Exchange 2016 database

Andy 1,026 Reputation points
2022-01-04T12:58:59.317+00:00

Hello,
Environment:
2 mail servers
1 Exchange 2016
1 Exchange 2019
Hybrid

Migration to Exchange 2019 is finished and now I need to uninstall Exchange 2016.

First step is to dismount and delete Exchange 2016 database and than uninstall Exchange 2016 but when I try to delete 2016 database error is:
This mailbox database contains one or more mailboxes…
https://techcommunity.microsoft.com/t5/exchange-team-blog/this-mailbox-database-contains-one-or-more-mailboxes-8230/ba-p/587212

Checking for regular,archive,arbitration.. mailboxes reveals nothing:
Get-Mailbox -Database ex16db01
Get-Mailbox -Archive -Database ex16db01
Get-Mailbox -PublicFolder -Database ex16db01
Get-Mailbox -Arbitration -Database ex16db01

But If I check
Get-Mailbox | where {$_.ArchiveDatabase -eq "<databaseName>"}
Output is:
162206-1.png

I assume that this is the reason why I cant delete 2016 server database but Im not sure.
What kind of legacy system mailboxes are this?
If I run command „Get-Mailbox -Arbitration | select name,database“ all system mailboxes are located on 2019 server.
162209-2.png
Any advice?

Exchange Exchange Server Management
0 comments No comments
{count} votes

Accepted answer
  1. Aaron Xue-MSFT 2,596 Reputation points Microsoft External Staff
    2022-01-05T07:48:44.297+00:00

    Hi @Andy ,

    Not only the health mailbox, but also you need to move the auditlog mailbox to another database before removing the old database.

    Run below command in EMS to migrate it.
    Get-Mailbox -Database databasename -AuditLog | New-MoveRequest –TargetDatabase DBname

    Here's a similar case for you reference.
    https://social.technet.microsoft.com/Forums/office/en-US/631ba4c4-fc03-476e-86d6-20ff1121aca5/deleting-default-mailbox-database-exchange-2016?forum=Exch2016Adm


    If the response is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.
    0 comments No comments

4 additional answers

Sort by: Most helpful
  1. Andy David - MVP 157.4K Reputation points MVP Volunteer Moderator
    2022-01-04T14:33:10.16+00:00

    There is no need to remove those, but if you want to, you can simply delete them.

    Once you restart the health monitoring service on the new server they get recreated.

    https://learn.microsoft.com/en-us/answers/questions/60635/healthmailbox-cleanup.html

    Get-Mailbox -Monitoring | Remove-Mailbox

    Make sure you also read this and give the necessary permissions so the AD objects are removed:
    https://learn.microsoft.com/en-us/exchange/troubleshoot/administration/remove-mailboxdatabase-cannot-remove-health-mailboxes

    Otherwise, remove the AD objects manually

    Then restart the Microsoft Exchange Health Manager, MSExchangeHM service on each 2019 server to recreate them.

    2 people found this answer helpful.
    0 comments No comments

  2. Andy David - MVP 157.4K Reputation points MVP Volunteer Moderator
    2022-01-04T13:59:30.233+00:00

    Do those databases still exist?

    You can check:

    get-mailboxdatabase <guid>
    

    GUID is the value between the {}

    If not, you can delete the corresponding System Mailbox.

    1 person found this answer helpful.
    0 comments No comments

  3. Andy 1,026 Reputation points
    2022-01-04T14:31:30.333+00:00

    OK
    I found something else....
    According to this article monitoring system mailboxes need to be disabled before delete database
    https://www.alitajran.com/cannot-delete-mailbox-database-exchange-2016/
    and Audit Log mailbox need to be migrated
    Where I can find official Microsoft KB about disabling monitoring mailboxes?
    162245-3.png

    0 comments No comments

  4. Andy 1,026 Reputation points
    2022-01-05T09:27:01.25+00:00
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.