ENTERPRISE

Exchange Server 2007 Management and Maintenance Practices : Maintenance Tools for Exchange Server 2007 (part 2) - Active Directory Database Maintenance Using ntdsutil

12/8/2013 8:32:01 PM

Windows Server 2003 Backup

The Windows Server 2003 backup utility (ntbackup.exe) is a utility that exists on all Windows Server 2003 systems and is located under the Start, All Programs, Accessories, System Tools menu. Out of the box, this utility can back up and restore an entire system, including the System State and data.

To properly back up Exchange Server 2007 databases and log files, and the Windows Server 2003 System State using ntbackup, administrators should perform two separate backup jobs. Errors can occur when an attempt is made to back up the Exchange databases and the server System State. In addition, if the need to restore the System State should arise, it can be accomplished much faster if it was backed up using a separate job.

Local and remote Exchange storage groups and databases can be backed up and restored from any Exchange 2007 server, but not from any other server.

Third-party software vendors, such as EMC Legato and Symantec, produce Exchange Server backup and restore agents for the purpose of Exchange database backup and recovery.

Active Directory Database Maintenance Using ntdsutil

Exchange Server 2007 uses Windows Server 2003 AD to store all its directory information. As a result, it is important to keep AD as healthy as possible to ensure that Exchange Server 2007 remains reliable and stable.

Windows Server 2003 automatically performs maintenance on Active Directory by cleaning up the AD database on a daily basis. The process occurs on domain controllers approximately every 12 hours. One example of the results of this process is the removal of tombstones, which are the “markers” for previously deleted objects. In addition, the process deletes unnecessary log files and reclaims free space.

The automatic daily process does not, however, perform all maintenance necessary for a clean and healthy database. For example, the maintenance process does not compress and defragment the Active Directory database. To perform this function, the ntdsutil command-line utility is needed.

Caution

To avoid possible adverse affects with the AD database, run ntdsutil in Directory Service Restore mode. Reboot the server, press the F8 key, and then select this mode of operation.


To use ntdsutil to defragment the AD database, perform the following steps:

1.
Restart the domain controller.

2.
When the initial screen appears, press the F8 key.

3.
From the Windows Advanced Options menu, select Directory Services Restore Mode.

4.
Select the Windows Server 2003 operating system being used.

5.
Log on to the Windows Server 2003 system.

6.
Click OK when the informational message appears.

7.
At a command prompt, create a directory where the utility can store the defragmented file. For example, C:\NTDS.

8.
At a command prompt, type ntdsutil files, and then press Enter.

9.
At the file maintenance prompt, type compact to <TargetDirectory>, where <TargetDirectory> identifies the empty directory created in step 7. For example:

compact to c:\ntds

This invokes the esentutl.exe utility to compact the existing database and write the results to the specified directory. The compaction process is shown in Figure 3.

Figure 3. Using ntdsutil to defragment the AD database.

10.
If compaction was successful, copy the new ntds.dit file to %systemroot%\NTDS, and delete the old log files located in that directory.

11.
Type quit twice to exit the utility.

12.
Restart the domain controller.

Integrity Checking with the isinteg Utility

The Information Store Integrity Checker (isinteg.exe) is a command-based utility that finds and eliminates errors from mailbox and public folder databases at the application level. Although this tool is not intended for use as a part of routine Information Store maintenance, it is mentioned here because it can assist in disaster recovery situations.

isinteg is most often used in conjunction with the eseutil repair operation, and can recover data that the eseutil tool cannot.

Caution

Using this utility in any mode other than Test mode results in irreversible changes to the database.

It is best to restore a copy of a suspected corrupt database in a lab environment, and then run isinteg against that copy prior to any attempts to use it in a production environment.


Dismount the Exchange databases that you plan to perform maintenance on and stop the Microsoft Exchange Information Store service prior to running this utility. Keep in mind that this makes the databases unavailable to users until after the maintenance has been completed.

Database table integrity problems are caused by corruption, which can occur if the server is shut down improperly, if the drive or controller fails, and so forth.

To view the command-line help about usage of the isinteg utility, type the following command from a command prompt: isinteg /?

Database Maintenance with the eseutil Utility

The eseutil utility is a database-level utility that is not application-specific. It can, for example, be used to maintain, test, and repair both AD and Exchange databases. More specifically, eseutil is used to maintain database-level integrity, perform defragmentation and compaction, and repair even the most severely corrupt databases. It is also the utility to use when maintaining Exchange Server 2007 transaction log files to determine which transaction logs need to be replayed or which log file the Edb.chk file points to.

Caution

Using the eseutil utility on an AD or Exchange database can produce irreversible changes.

As with the isinteg utility, it is best to restore a copy of a suspected corrupt database in a lab environment, and then run eseutil against that copy prior to any attempts to use it in a production environment.


Note

eseutil investigates the data that resides in the database table for any corruption or errors, which is why it is called a database-level utility. The eseutil options are shown in Table 1.


Table 1. eseutil Syntax
Mode of OperationSyntax
DefragmentationESEUTIL /d <database name> [options]
RecoveryESEUTIL /r <logfile base name> [options]
IntegrityESEUTIL /g <database name> [options]
ChecksumESEUTIL /k <filename> [options]
RepairESEUTIL /p <database name> [options]
File dumpESEUTIL /m[mode-modifier] <filename>
Copy fileESEUTIL /y <source file> [options]
RestoreESEUTIL /c[mode-modifier] <pathname> [options]
Other  
  •  Exchange Server 2007 Management and Maintenance Practices : Proper Care and Feeding of Exchange Server 2007
  •  Windows 7 : Programming Plug and Play and Power Management - Callbacks for Power-Up and Power-Down , Callback for Wake Signal Support
  •  Windows 7 : Programming Plug and Play and Power Management - Managing Power Policy
  •  Windows 7 : Programming Plug and Play and Power Management - Registering Callbacks
  •  Parallel Programming with Microsoft Visual Studio 2010 : Using the MapReduce Pattern (part 2)
  •  Parallel Programming with Microsoft Visual Studio 2010 : Using the MapReduce Pattern (part 1)
  •  Parallel Programming with Microsoft Visual Studio 2010 : Data Parallelism - Reduction
  •  NET Debugging : Visual Studio (part 3) - Visual Studio 2010
  •  NET Debugging : Visual Studio (part 2) - .NET Framework Source-Level Debugging
  •  NET Debugging : Visual Studio (part 1) - SOS Integration
  •  
    Video
    Video tutorials
    - How To Install Windows 8

    - How To Install Windows Server 2012

    - How To Install Windows Server 2012 On VirtualBox

    - How To Disable Windows 8 Metro UI

    - How To Install Windows Store Apps From Windows 8 Classic Desktop

    - How To Disable Windows Update in Windows 8

    - How To Disable Windows 8 Metro UI

    - How To Add Widgets To Windows 8 Lock Screen

    - How to create your first Swimlane Diagram or Cross-Functional Flowchart Diagram by using Microsoft Visio 2010
    programming4us programming4us
    Top 10
    Free Mobile And Desktop Apps For Accessing Restricted Websites
    MASERATI QUATTROPORTE; DIESEL : Lure of Italian limos
    TOYOTA CAMRY 2; 2.5 : Camry now more comely
    KIA SORENTO 2.2CRDi : Fuel-sipping slugger
    How To Setup, Password Protect & Encrypt Wireless Internet Connection
    Emulate And Run iPad Apps On Windows, Mac OS X & Linux With iPadian
    Backup & Restore Game Progress From Any Game With SaveGameProgress
    Generate A Facebook Timeline Cover Using A Free App
    New App for Women ‘Remix’ Offers Fashion Advice & Style Tips
    SG50 Ferrari F12berlinetta : Prancing Horse for Lion City's 50th
    Popular Tags
    Video Tutorail Microsoft Access Microsoft Excel Microsoft OneNote Microsoft PowerPoint Microsoft Project Microsoft Visio Microsoft Word Active Directory Exchange Server Sharepoint Sql Server Windows Server 2008 Windows Server 2012 Windows 7 Windows 8 Adobe Flash Professional Dreamweaver Adobe Illustrator Adobe Photoshop CorelDRAW X5 CorelDraw 10 windows Phone 7 windows Phone 8 Iphone