programming4us
programming4us
ENTERPRISE

Exchange Server 2010 : Perform Essential Database Management (part 1) - Manage the Database Files

- How To Install Windows Server 2012 On VirtualBox
- How To Bypass Torrent Connection Blocking By Your ISP
- How To Install Actual Facebook App On Kindle Fire
7/14/2011 3:57:57 PM
The management aspects of maintaining databases in Exchange aren't very complex. However, an elementary knowledge of the ESE is a necessity. The ESE controls how data is written to and read from the databases. Data isn't written to databases directly. Instead, Exchange holds the data in memory and writes it to transaction logs first. The data in memory and in the transaction log files are then periodically written to the database. This design is referred to as write-ahead logging, and is illustrated in Figure 1.

1. Manage the Database Files

A single database is kept in one file, which has the extension .EDB. The EDB contains the actual data for the database. If a Mailbox server has many databases, then there are many EDB files.

1.1. Create a New Mailbox Database

When creating Mailbox databases in Exchange, you must make a couple of decisions. The first thing to decide on is the name of the database. This name must be unique across your Exchange organization. In Exchange Server 2010, databases exist at the organization level so new availability options can be leveraged. Therefore, you should ensure that your database naming scheme gives each database a unique name. Another thing to consider is that since databases can now move between servers, you may not want to tie the database name to the server name. For example, the name Server1Database wouldn't make a lot of sense if the database was hosted on Server2.

Figure 1. How data is written in Exchange

The second and perhaps the most important thing you should decide on is the location of the database. Disk performance in Exchange Server 2010 is more efficient than in previous versions, so it's not as critical that the databases exist on fast, high-performance hard drives. It's completely acceptable to use slower local disks as long as the recoverability and availability concerns are addressed. When you plan your database storage, ensure that you have used drives that have enough space for the size that you anticipate your databases to be with any additional growth.

To help in planning your databases and their storage needs,

I highly recommend that you download the Exchange Mailbox Server Role Storage Requirements Calculator from the Exchange Team's blog. You can find the download on the Exchange Team's Blog at http://msexchangeteam.com/archive/2007/07/05/445802.aspx. The calculator requires Microsoft Excel to run.


You can create a new database in the Exchange Management Console (EMC):

  1. Open the EMC and browse to the Organization Configuration => Mailbox node in the Console tree.

  2. In the Actions pane, click the option New Mailbox Database, which is in the list of Mailbox actions.

    This will launch the New Mailbox Database wizard.

  3. At the Introduction screen, type the name of the database into the Mailbox Database Name field.

  4. Click the Browse button under the Server Name field to browse for a Mailbox server that will be the active host of the database. After you have selected a Mailbox server and are back in the wizard, click the Next button.

  5. At the Set Paths screen, type the location of the database and log files for this Mailbox database. Remember that this location could also be used on other Mailbox servers that have a copy of this database, so be sure the path is unique. Click Next to continue.

  6. At the Configuration Summary screen, verify the settings for the new database and click the New button.

    The database is created and the Completion screen appears.

  7. Verify the results and then click the Finish button to close the wizard.

You can also create databases using the New-MailboxDatabase cmdlet in the Exchange Management Shell (EMS). You will need to specify the server holding the database and the name of the database. The EdbFilePath parameter can be used to tell Exchange where you want to put the database file. You will also need to use the LogFolderPath parameter to specify the folder for the Transaction Log files for this database:

New-MailboxDatabase "DB01" -Server CONTOSO-EX01 

-EdbFilePath "D:\DB01.edb" -LogFolderPath "E:\DB01Logs\"

NOTE

When you create a new database in the EMC, the database is automatically mounted. If you use the EMS, you will need to mount the database manually afterward. The topic of mounting databases is covered in the next section.

1.2. Mount a Mailbox Database

Before a database can be used, it must be mounted. The process of mounting the database locks down the files and allows data to be read from and written to the database.

1.2.1. Check Whether a Database Is Mounted Using the Exchange Management Console

You can determine if a database is already mounted using the following steps in the EMC:

  1. Open the EMC and browse to the Organization Configuration => Mailbox node in the Console tree.

  2. In the Work area, select the Database Management tab.

    The top half of the Database Management tab lists all the databases in the organization.

  3. Look at the Mounted column in the list of databases. This column will tell you if the database is mounted.

    You can also look at the Mounted On Server column to see what server the database is mounted on (Figure 2).

Figure 2. Determining if a database is already mounted

1.2.2. Mount a Mailbox Database Using the Exchange Management Console

To use the EMC to mount a database that is not currently mounted, use the following steps:

  1. Open the EMC and browse to the Organization Configuration => Mailbox node in the Console tree.

  2. In the Work area, select the Database Management tab.

  3. In the list of databases, select the database that you want to mount.

    The Mounted column should show that the database is currently Dismounted.

  4. In the Actions pane for the database, click the Mount Database option, as shown in Figure 3.

Figure 3. Mounting a dismounted database

1.2.3. Mount and Dismount Mailbox Databases Using the Exchange Management Shell

You can also mount or dismount databases in the EMS using the Mount-Database cmdlet or the Dismount-Database cmdlet. When using these cmdlets, you only need to specify the name of the database that you want to mount or dismount. The following example commands mount and dismount the database named DB01:

Mount-Database "DB01"
Dismount-Database "DB01"

1.3. Move a Database to a Different Location

When you create a new database, you must specify the location where you want to place the database file. However, you can change this location afterward by moving the database. While the database is being moved, the database is dismounted. The database will be remounted after it is moved, if it was already mounted prior to starting the move.

NOTE

During the period that the database is dismounted, users will not be able to access the information in the database.

To move the database to a different location in the EMC, follow these steps:

  1. Open the EMC and browse to the Organization Configuration => Mailbox node in the Console tree.

  2. Select the Database Management tab to view a list of the databases.

  3. In the list of databases, select the database that you want to move.

  4. In the Actions pane for the database that you have selected, click the Move Database Path option.

    The Move Database Path wizard will open.

  5. Type the new location of the database file in the Database File Path field. Also type the new location of the logs in the Log Folder Path field, as shown in Figure 4.

    Figure 4. Moving the database files
  6. Click the Move button to move the database files to the new location.

  7. If the database is mounted, you will be prompted with a message informing you that it must be dismounted before moving. If you see this message, click the Yes button if you want to continue moving the database files.

  8. At the Completion screen, click the Finish button.

You can also move the database with the EMS, using the Move-DatabasePath cmdlet. When executing the command, you will need to include the new location for the database with the EdbFilePath parameter. You can also use the LogFolderPath parameter to specify the new location for the transaction logs.

You cannot move the database files of a database that has multiple copies. You must first remove the database replicas, move the database files, and then re-create the replicas.


When running the Move-DatabasePath cmdlet, you may be prompted with a message explaining that the database has to be temporarily dismounted to move it. You can continue by pressing Y. You can bypass the message about dismounting the database by using the Force parameter.

Move-DatabasePath "DB01" -EdbFilePath F:\DB01\DB01.edb 

-LogFolderPath F:\DB01 -Force

1.4. Configure the Online Maintenance Window

During the online maintenance process, Exchange performs several tasks to clean up data in the database. In previous versions of Exchange, an online defrag of the database was performed at the end of the maintenance process. The defrag moved pieces of the database around on the disk so that the various blocks of data making up the database file were located closer together, thereby increasing performance. The defrag itself often took several hours to complete, particularly with large databases. In Exchange Server 2010, the option to run the defrag was moved out of the online maintenance window and the process now runs in the background all the time. This dramatically reduces the time needed for online maintenance, and you can adjust your maintenance window accordingly.

1.4.1. Adjust the Online Maintenance Window

To adjust the online maintenance window in the EMC, follow these steps:

  1. Open the EMC and browse to the Organization Configuration => Mailbox node in the Console tree.

  2. Click the Database Management tab to bring up a list of databases.

  3. Select the database that you want to configure the maintenance window on. Click the Properties option in the Actions pane for the database that you selected.

    This will open the properties dialog box for the database.

  4. In the database's properties dialog box, click the Maintenance tab.

  5. From the Maintenance Schedule drop-down list, select the predefined maintenance period you want to use or select Use Custom Schedule to define your own. See Figure 5.

  6. Click OK to close the properties dialog box and make the changes to the maintenance window.

Figure 5. Selecting the maintenance window for a database

You can also modify the window in the EMS using the Set-MailboxDatabase cmdlet with the MaintenanceSchedule parameter. The following command turns on maintenance for only Sundays between 1 and 3 a.m.:

Set-MailboxDatabase DB01 -MaintenanceSchedule 

"Sun.1:00 AM-Sun.3:00 AM"

1.4.2. Change the Timing for Database Checksumming

There is also a process called database checksumming, which ensures that the database is scanned against corruptions. This process is performed in the background by default. If your database is relatively small (less than 500 GB), you can perform this checksumming at the end of your maintenance process instead, which gives the process a specific time window to run in. If the checksumming process doesn't finish within a three-day period, a warning event will be posted to the logs. You can enable this with the EMS using the Set-MailboxDatabase cmdlet. Specify the BackgroundDatabaseMaintenance parameter as $False to turn off background scanning and have it completed during online maintenance instead:

Set-MailboxDatabase DB01 -BackgroundDatabaseMaintenance 

$false

After this command is run, you must dismount and remount the database to enable the change.

Other  
  •  Architecting Applications for the Enterprise : UML Diagrams (part 3) - Sequence Diagrams
  •  Architecting Applications for the Enterprise : UML Diagrams (part 2) - Class Diagrams
  •  Architecting Applications for the Enterprise : UML Diagrams (part 1) - Use-Case Diagrams
  •  SharePoint 2010 : Creating and Managing Workflows - Monitoring Workflows
  •  Exchange Server 2010 : Administering Mailbox Content - Monitor and Restrict Communication (part 2) - Apply Common Monitoring and Restriction Scenarios
  •  Exchange Server 2010 : Administering Mailbox Content - Monitor and Restrict Communication (part 1) - Perform Basic Message Policy Configuration
  •  Exchange Server 2010 : Administering Mailbox Content - Protect and Disclose Information
  •  SharePoint 2010 : Workflow Modeling and Development Tools (part 2) - Visual Studio 2010 & Workflow Modeling Tools Comparison
  •  SharePoint 2010 : Workflow Modeling and Development Tools (part 1) - Microsoft Visio 2010 & SharePoint Designer 2010
  •  SharePoint 2010 : Creating and Managing Workflows - Workflows in SharePoint 2010
  •  
    Top 10
    - Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
    - Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
    - Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
    - Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
    - Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
    - Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
    - Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
    - Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
    - Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
    - Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
    REVIEW
    - First look: Apple Watch

    - 3 Tips for Maintaining Your Cell Phone Battery (part 1)

    - 3 Tips for Maintaining Your Cell Phone Battery (part 2)
    programming4us programming4us
    programming4us
     
     
    programming4us