Home | Windows | Network | Interview Questions | Database | Virtualization | Knowledge Base | Contact Us

Quick Links
Windows 2003

Windows 2008

Windows 2012

MS Cluster FAQ's



Command reference

Exchange Q&A

Linux Interview Q&A

VM Interview Q&A




Active Directory FAQ's

AD History

Configuring New Domain

Deleted Object Recovery in AD

Global Catalog Server


NetDom Command

Replmon Command

NTDS Utility Guide

FSMO Guide

FSMO Failure

Network Interview Questions

SQL Interview Questions

Active Directory Trust

Group Policy Guide

IIS 6.0


RAID Levels

RPC Guide

Domain & Forest Functional Levels

SQL Failover Cluster

Offline defragmentation of the Active Directory database

Active Directory automatically performs online defragmentation of the database at certain intervals (by default, every 12 hours) as part of the Garbage Collection process. Online defragmentation does not reduce the size of the database file (Ntds.dit), but instead optimizes data storage in the database and reclaims space in the directory for new objects. 

To perform offline defragmentation of the Active Directory database:

  1. Back up Active Directory. Windows 2000 Backup natively supports backing up Active Directory while online. This occurs automatically when you select the option to back up everything on the computer in the Backup Wizard, or independently by selecting to back up the "System State" in the wizard.

  2. Reboot the domain controller, select the appropriate installation from the boot menu, and press F8 to display the Windows 2000 Advanced Options menu. Choose Directory Services Restore Mode and press ENTER. Press ENTER again to start the boot process.

  3. Log on using the Administrator account with the password defined for the local Administrator account in the offline SAM. For more information about the use of the offline SAM database.

  4. Click Start, point to Programs, point to Accessories, and then click Command Prompt. At the command prompt, type ntdsutil, and then press ENTER.

  5. Type files, and then press ENTER.

  6. Type info, and then press ENTER. This displays current information about the path and size of the Active Directory database and its log files. Note the path.

  7. Establish a location that has enough drive space for the compacted database to be stored.

  8. Type compact to drive:\directory, and then press ENTER, where drive and directory is the path to the location you established in the previous step.

    Note You must specify a directory path. If the path contains any spaces, the entire path must be surrounded by quotation marks. For example, type:
    compact to "c:\new folder"

  9. A new database named Ntds.dit is created in the path you specified.

  10. Type quit, and then press ENTER. Type quit again to return to the command prompt.

  11. If defragmentation succeeds without errors, follow the Ntdsutil.exe on-screen instructions. Delete all the log files in the log directory by typing the following command:
    del drive :\ pathToLogFiles \*.log
    Copy the new Ntds.dit file over the old Ntds.dit file in the current Active Directory database path that you noted in step 6. 

    Note You do not have delete the Edb.chk file.
  12. Restart the computer normally.

Go Back To Previous Page

HTML Comment Box is loading comments...

Home | Windows | Network | Interview FAQs | Database| Knowledge Base | Contact Us

Designed by TechieBird