Monday, 18 January 2016

Create new queue database in Exchange 2016

Introduction


The queue database is a JET database that includes emails that are held in any of the queues on an Exchange mailbox or edge transport server. This queue database can grow to be quite large and may impact disk space which causes a problem with back pressure where the Exchange server may start to reject email.

In this post, I’ll demonstrate how to create a new queue database in Exchange 2016. These instructions also apply to Exchange 2007, 2010 and Exchange 2013.

How to create a new queue database (mail.que) or shrink the queue database in Exchange 2016


The queue database is stored on the C drive in default installations: C:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\data\Queue.

You can see the contents of this folder below. Note that there is a 500MB mail.que file.

image

To recreate the queue database, we can go through the steps below:

Stop the Exchange Transport Service:

Stop-Service MSExchangeTransport

image

Move the contents of C:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\data\Queue to another location.

Once done, we can restart the transport service:

Start-Service MSExchangeTransport

image

We can now see that the mail.que database and related transaction log files have been recreated and we have a queue database which is only 8MB in size:

image

Once the service starts up, you can delete the original queue database and transaction logs as they are no longer needed by Exchange.

Conclusion


In this post, I’ve demonstrated how to recreate or shrink the mail.que queue database on Exchange 2016. The same instructions also apply to Exchange 2007, 2010 and 2013.

3 comments:

  1. Hi Mark,
    if there are any emails in the old queue, did it will be delivered after we copy old queue to another place?

    ReplyDelete
  2. i was just browsing along and came upon your blog. just wanted to say good blog and this article really helped me.
    heathrow to london minicab service

    ReplyDelete