Pages

Thursday 25 February 2010

Exchange 2010 Performing Database Management Pt1

Databases are at the heart of information storage in Exchange. Two types of database are considered:
1. Mailbox
2. Public Folder

Microsoft have de-emphasized the use of public folder DBs in favour of sharepoint so I will focus mainly on mailbox DBs.

Write-Ahead Logging
Data is written to and read from the database using the Extensible Storage Engine (ESE). Its purpose is to allow applications to store and retrieve data via indexed and sequential access. Data is not written to the database directly, but holds the data in RAM and writes it to transaction logs first. The data in memory and the transaction logs are then written to the database periodically. This is write ahead logging. Essentially changes to data files (where tables and indexes reside) must be written only after those changes have been logged - that is, when log records have been flushed to permanent storage. When we follow this procedure, we do not need to flush data pages to disk on every transaction commit, because we know that in the event of a crash we will be able to recover the database using the log. Any changes that have not been applied to the data pages will first be redone from the log records (this is roll-forward recovery, also known as REDO) and then changes made by uncommitted transactions will be removed from the data pages (roll-backward recovery, also known as UNDO).

Creating a New Mailbox Database
Unlike previous versions of Exchange, the mailbox database has moved up to a global (or organizational) level. This means that the database has to be carefully (and uniquely) named. Because databases can be replicated between servers (this will be discussed at length later) you should not name the database after the server on which the database is housed.


[PS] new-mailboxdatabase DB01 -edbfilepath "D:\DB01.edb" -logfolderpath "E:\DB01Logs"

Unlike creating the database in the console, when created with the shell you need to mount the database.

[PS] mount-database "DB01" (Use the dismount cmdlet to dismount the database!)
Although you have specified the file path for the new database you can change the path by moving the database.

[PS] move-databasepath "DB01" -edbfilepath "F:\DB01\DB01.edb" -logfolderpath "F:\DB01 -force

(this parameter will bypass the prompt to first dismount the database).

You should make note that you cannot move database files if they exist as copies on other exchange servers. You must first remove the replicas on those servers, move the database to the new path as shown above and then re-create the replicas.











No comments:

Post a Comment