Introduction to the Exchange Server mail storage system-principles (1)

Source: Internet
Author: User

From the perspective of the basic principles of the database, this article analyzes the Exchange Server Store module to reveal the working principle and maintenance skills of the Exchange Server mail storage system. This article is suitable for professional IT staff with some Exchange Server Management experience. It aims to enable readers to understand and understand the Exchange Server email system.
Hierarchical relationship between Information Store and Extensible Storage Engine
As we all know, in Exchange Server, Information Store (IS) Service IS crucial. This service controls the operation requests for the mailbox and public folder database.
Furthermore, the database system of the Exchange Server is managed by the database Engine Extensible Storage Engine (ESE. This ESE engine is specially developed by Microsoft to store non-relational data and has applications in many Microsoft Systems: for example, the AD database ntds. windows DHCP, Windows WINS, SRS, etc. The background is supported by the ESE database.
520) this. width = 520; "onclick = javascript: window. open (this. src); src = "/files/uploadimg/20051206/1005530 .gif" width = 520 onload =" javascript: if (this. width> 520) this. width = 520; "align = absMiddle border = 0>
We know that the Exchange Server database is composed of edb files, stm files, and many log files. In these files, Microsoft uses an internal data structure named "B + tree". One of the tasks of the ESE engine is that when the Information Store service requests to access the database, convert these requests to read/write access to the internal data structure. The B + Tree features fast access to data stored on disks. One reason Microsoft chose the B + tree as the ESE background structure is to improve the I/O performance when accessing data as much as possible. The structure of these B + trees is transparent to the Exchange Server Store service. Store only needs to send requests to ESE, which will perform operations on these data structures.
In addition, as a database system, ESE has the responsibility to support Transaction-level operations and maintain the integrity and consistency of the entire database. For modern database systems, when we mention transactions, ACID is generally used to describe the features of transactions:
520) this. width = 520; "onclick = javascript: window. open (this. src); src = "/files/uploadimg/20051206/1005531 .gif" onload =" javascript: if (this. width> 520) this. width = 520; "align = absMiddle border = 0>
We will discuss in detail how Exchange Server and ESE meet the above requirements in later sections.
For Information Store Service, ESE encapsulates all the details of database operations. IS can be called Based on interfaces provided by ESE. In Exchange Server, the isservice interface is store.exe, and each Storage groupwill generate an ESE engine instance in the store.exe process.
520) this. width = 520; "onclick = javascript: window. open (this. src); src = "/files/uploadimg/20051206/1005532 .gif" width = 520 onload =" javascript: if (this. width> 520) this. width = 520; "align = absMiddle border = 0>
New features of the Exchange Server 2000/2003 Storage System
When Microsoft released Exchange Server 2000, the storage system of Exchange Server was greatly updated and improved.
From the perspective of the ESE engine, the ESE version was upgraded from ESE97 in 5.5 to ESE98 and improved in the following aspects:
1. I/O performance is further optimized and improved
2. added the calculation checksum operation for log files, further reducing the possibility of database errors
3. improved the speed of maintenance tools such as ESEUtil
Compared with the ESE engine behind the scenes, Information Store updates are more noticeable, for example:
1. Provide support for multiple Storage groups and stores on each Server, which is one of the biggest features different from 5.5.
2. The introduction of the stm stream file format in the database improves the performance of Internet Mail Operations
3. Introduction of Web Storage System, users can access the database using multiple protocols
Relationship between EDB files and STM files
In Exchange Server 5.5, the database only has files with the extension of edb. When Exchange Server 5.5 was released, Microsoft focused on the internal Email transmission system of the enterprise. At that time, the main protocol was the MAPI protocol, which was Microsoft's private email protocol, edb databases are specially optimized for this Protocol. Therefore, to support Internet standard SMTP mail formats, Exchange Server 5.5 must convert each time Internet mail is processed into a recognizable format that edb can recognize, resulting in huge performance loss.
520) this. width = 520; "onclick = javascript: window. open (this. src); src = "/files/uploadimg/20051206/1005533 .gif" onload =" javascript: if (this. width> 520) this. width = 520; "align = absMiddle border = 0>
In Exchange Server 2000, Microsoft increased support for Internet standard protocol SMTP. Therefore, the storage of Internet-format mail came into being: This is the stm file.
Messages in the MAPI format are based on Microsoft's RPC and binary standards, while messages in the Internet format are composed of plain text headers and MIME-encoded response streams. The features of both determine that they cannot exist in a database structure file.
Therefore, in Exchange Server 2000, Microsoft used the edb file and stm file to save the messages in these two formats, and established associations and references between the edb and stm files. The user's email content is actually composed of contents that span the edb and stm files. It is worth mentioning that in addition to the actual mail information, the edb file also saves information such as the email structure of each user, the content list and view of each folder, and so on. This is different from the place where only the streaming is saved in stm.
We will discuss the use of edb and stm files in the following situations:
1. the user uses Outlook to send and access emails using the MAPI protocol.
2. You can use Internet protocols such as SMTP and POP3 to access the Exchange Server.
Scenario 1:
After an email is submitted to the database from an MAPI client (usually Microsoft Office Outlook), the email content is saved in the edb file.
When a user accesses an email through a client of the MAPI protocol, if the requested email is saved in the edb file, the email is opened directly and returned to the user. If the requested mail is saved in the stm file, the mail is in SMTP format), the Exchange Server database engine will first perform a conversion, convert the data format in the stm file to a format that can be recognized by MAPI, and then send it to the client. This process is called "On-demand Conversion ".
Scenario 2:
You can use SMTP/POP3 clients, such as Outlook Express and FoxMail, to connect to your mailbox. When the SMTP protocol submits an email to the Exchange Server, the content of the email is saved in the stm file. As mentioned above, the edb file contains a list of folders and emails in the user's email address. Therefore, after the email is saved to the stm file, the Database Engine extracts some important information of this email, usually the content in the mail header and the location of the email in the stm file, and saves it to the edb file. This process is called "Property Promotion ". With this process, the user can obtain a complete list of mailbox content. When the MAPI client needs to access the mail in the stm file, the correct storage location of the parts in the stm file can be obtained. When a user uses POP3 protocol to read a mail, if the accessed mail is in the edb file, the Conversion from MAPI to Internet is also "On-demand Conversion ") it will also happen quietly in the background.
520) this. width = 520; "onclick = javascript: window. open (this. src); src = "/files/uploadimg/20051206/1005534 .gif" onload =" javascript: if (this. width> 520) this. width = 520; "align = absMiddle border = 0>
As described above, we know that these two files are closely related in the actual Exchange Server environment. Do not operate these two files separately at any time. Always treat them as a whole. The edb file contains the content list store tables of each mailbox. When the client needs to obtain the folder content, it must send a request to the edb file. The two formats of files provide support for the two types of Protocols respectively, effectively reducing unnecessary format conversion.


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.