locked
What are the steps to remove the mailbox database from exchange server and purge the transaction logs? RRS feed

  • Question

  • Dear Exchange Server Expert,

    Currently we have on premise Exchange Server 2010 SP3 and it is running hybrid for migration to office 365. previously, we built a hybrid server and actually created a mailbox database called "Hybrid1" for the purpose of migration whereby we are moving the mailboxes to the hybrid server and then from the hybrid server we are migrating up to the office 365.

    Our environment mailbox databases have the DAG configured. In total, we have 8 DB that are running DAG between multiple countries.

    Because of the migration, the "Hybrid1" database is getting full and it almost occupy the whole HDD partition. I would like to actually remove the transaction logs file created during migration or maybe remove the whole database and recreate again a new database for this migration purpose. however, i don't know what is the proper way to do that:

    1. should i go to EMC and right click the DB first  to dismount the DB then followed by remove the DB?

    FYI, I have run the command get-mailboxdatabase "Hybrid1" | get-mailbox to ensure that there is no maiboxes are resided in this database and confirm that this DB is actually blank and there are no mailboxes inside.

    2. when performing Remove DB from the EMC, will the DB files or the log files being purged automatically? or i need to go to the DB folder and purge everything inside?

    3. how to find the correct path whereby the DB and those logs located and delete them?

    4. if after deleting the empty DB and i would like to create a new DB, will the new DB will get any impacts with the production DB which are on DAG? from what my understanding, since the new created DB is not part of DAG, then it should not perform any replications with the Production DBs that are on DAG. am i right here?

    Thanks all for the attention.

    Regards,

    Monday, May 2, 2016 3:14 AM

Answers

  • Hi,

    First make sure that there is no "hidden" mailboxes left, check with

    Get-Mailbox -Arbitration -Database "Hybrid1"

    If it exists you have to move them away before you can continue with 

    Get-Mailbox -Arbitration -Database "Hybrid1" | New-MoveRequest -TargetDatabase "XXX"

    Verify that it completes, Remove move request

    Also verify if there is any archive mailboxes and if so move them

    Get-mailbox -archive -database "Hybrid1"
    Get-mailbox -archive -database "Hybrid1" | New-MoveRequest -ArchiveTargetDatabase 'XXXX' -ArchiveOnly

    Verify that it completes, Remove move request

    1. You can just click "Remove" it will dismount the database for you

    2. No all files will be left

    3. You can get the path by running 

    Get-MailboxDatabase -database "Hybrid1" | fl Name,EdbFilePath,LogFolderPath

    4. It will not be part of the DAG, it will have the same affect on your production as the current mailbox database Hybrid1...:)


    Patrik


    • Edited by Patrik L Monday, May 2, 2016 7:20 AM
    • Marked as answer by Henry2050 Monday, May 2, 2016 3:13 PM
    Monday, May 2, 2016 7:12 AM

All replies

  • Hi,

    First make sure that there is no "hidden" mailboxes left, check with

    Get-Mailbox -Arbitration -Database "Hybrid1"

    If it exists you have to move them away before you can continue with 

    Get-Mailbox -Arbitration -Database "Hybrid1" | New-MoveRequest -TargetDatabase "XXX"

    Verify that it completes, Remove move request

    Also verify if there is any archive mailboxes and if so move them

    Get-mailbox -archive -database "Hybrid1"
    Get-mailbox -archive -database "Hybrid1" | New-MoveRequest -ArchiveTargetDatabase 'XXXX' -ArchiveOnly

    Verify that it completes, Remove move request

    1. You can just click "Remove" it will dismount the database for you

    2. No all files will be left

    3. You can get the path by running 

    Get-MailboxDatabase -database "Hybrid1" | fl Name,EdbFilePath,LogFolderPath

    4. It will not be part of the DAG, it will have the same affect on your production as the current mailbox database Hybrid1...:)


    Patrik


    • Edited by Patrik L Monday, May 2, 2016 7:20 AM
    • Marked as answer by Henry2050 Monday, May 2, 2016 3:13 PM
    Monday, May 2, 2016 7:12 AM
  • Hi,

    First make sure that there is no "hidden" mailboxes left, check with

    Get-Mailbox -Arbitration -Database "Hybrid1"

    If it exists you have to move them away before you can continue with 

    Get-Mailbox -Arbitration -Database "Hybrid1" | New-MoveRequest -TargetDatabase "XXX"

    Verify that it completes, Remove move request

    Also verify if there is any archive mailboxes and if so move them

    Get-mailbox -archive -database "Hybrid1"
    Get-mailbox -archive -database "Hybrid1" | New-MoveRequest -ArchiveTargetDatabase 'XXXX' -ArchiveOnly

    Verify that it completes, Remove move request

    1. You can just click "Remove" it will dismount the database for you

    2. No all files will be left

    3. You can get the path by running 

    Get-MailboxDatabase -database "Hybrid1" | fl Name,EdbFilePath,LogFolderPath

    4. It will not be part of the DAG, it will have the same affect on your production as the current mailbox database Hybrid1...:)


    Patrik


    Hi Patrik,

    THanks for your advise.

    I have successfully remove and created a new DB as per your advise above.

    Best Regards,

    Monday, May 2, 2016 3:13 PM