What is offline defragmentation in AD and how do we do it?

Answer Posted / siddhartha rath

Performing an offline defragmentation creates a new,
compacted version of the database file. Depending on how
fragmented the original database file was, the new file may
be considerably smaller.

offline defragmentation of the Active Directory database:

Back up Active Directory.
Reboot the domain controller.
Choose Directory Services Restore Mode and press ENTER.
Log on using the Administrator account with the password
defined for the local Administrator account in the offline
SAM.
At the command prompt, type ntdsutil, and then press ENTER.
Type files, and then press ENTER.
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.
Establish a location that has enough drive space for the
compacted database to be stored.
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"
A new database named Ntds.dit is created in the path you
specified.
Type quit, and then press ENTER. Type quit again to return
to the command prompt.
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
Note You do not have delete the Edb.chk file.
Restart the computer normally

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can I upgrade to windows 10 without losing everything?

393


What can I delete from windows 10?

452


What is microsoft windows used for?

431


Is windows defender a good antivirus program?

407


Will upgrading from windows 7 to windows 10 delete my files?

378






Is windows 7 the best operating system?

443


Should I delete windows error reporting files?

412


How do I fix corrupted drivers windows 10?

417


Will upgrading to windows 10 delete my files?

425


How to terminating an app in windows 8.1?

452


What are the basic parts of a windows desktop?

405


What is windows 7 and its features?

468


What are form controls?

425


Where are dll files located in windows?

466


How do I do a system repair on windows 7?

409