In this article, we are going to see what exactly the Exchange server database is and its working functionality. It will be a kind of deep dive into the concept to make you understand better.
Ever wondered how your mails are getting stored in the Exchange server? What exactly happening in the background? If you are not sure then no worries, this article will clearly explain how it is happening in the background.
We need to look at the various stages in order to understand its flow. Without giving you any more hype, let’s get started.
So let’s consider an example. Admin (mailbox) is sending an email to User B. We are not going to see the mail flow design in this article. So our focus is going to be with only Admin mailbox. We will cover the mail flow part later in this series, as of now we will see how the information is getting stored in the database.
You can see that email is getting showed in admin’s sent item. In Recipient’s mailbox it will show it in Inbox (sometimes in Junk folder if it is detected as SPAM!!). The user mailboxes are a logical container which is getting stored in the Mailbox database. Each transaction will first stored as a logs and get played to the database later which we will see in detailed below.
Log Files (LOG):
In the background, each transactions will be recorded as a log files. In the following screenshot, you can see E00.log file. Each database will have its own numbers. We have only one database so we can see E00. If we have 4 databases then we can have E00, E01, E02, and E03.
Following E00, we can see the sequence of log files namely E0000000001 and so on. Each log is 1 MB in size. Once the file reaches its full size that is 1 MB, then the next file E0000000002 will get generated. So all our transactions will be recorded here in these log format first. For instance, all emails that is received, deleted, moved to a different folders, marked as spam, calendars, notes, etc., will be saved in logs.
You can also see the .jrs files which are the temporary reserved files by Exchange server. In case there are no spaces for new logs, then it will use this .jrs files to store the information.
Exchange Database (EDB):
Exchange database file format is .edb. You can see two edb files. The primary one with the database name which is exactly matching the name in Exchange management console, and the other one is temporary database. When a new database got created in Exchange management console or Exchange management shell, we can see these files in the folder called Mailbox folder (Under Exchange installed location – C:\Program Files\Microsoft\Exchange Server\V14\Mailbox\Mailbox Database 1913922047)
When each log is getting generated, the old one will get played into the database. For this reason, the database will constantly grow. There is no restriction in size but it’s always recommended to keep it at some level so that it will be easy to manage and do Exchange recovery in case of any failures. Moveover, we need to have a regular backup as you see these files got all our information.
Check Point (CHK) file:
You can also see in the previous screenshot that there is a file called E00.chk. This file is nothing but a check point file. This file will have the information about which logs are already played into the database and which one yet to be played. This is the crucial information while taking backup. Backup software will freeze this file in order to purge all the backed up (played) files and leave the other which are yet to be played.
Now you understood how the transactions are getting stored at the back end. After the logs are played, the mailbox stored in the database will get updated with the recent information. In order to access the mailbox, the client will contact the Client Access Server (CAS) first and the CAS will contact the Mailbox server then. After this, you will be able to see the mailbox in your client program (outlook or similar).
Sophia Mao is a data recovery expert in DataNumen, Inc., which is the world leader in data recovery technologies, including outlook recovery and word recovery software products. For more information visit www.datanumen.com