Relocating Active Directory Database Files
Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1, Windows Server 2003 with SP2
The following conditions require moving database files:
Hardware maintenance: If the physical disk on which the database or log files are stored requires upgrading or maintenance, the database files must be moved, either temporarily or permanently.
Low disk space: When free disk space is low on the logical drive that stores the database file (Ntds.dit), the log files, or both, first verify that no other files are causing the problem. If the database file or log files are the cause of the growth, then provide more disk space by taking one of the following actions:
Expand the partition on the disk that currently stores the database file, the log files, or both. This procedure does not change the path to the files and does not require updating the registry.
Use Ntdsutil.exe to move the database file, the log files, or both to a larger existing partition. If you are not using Ntdsutil.exe when moving files to a different partition, you will need to manually update the registry.
If the path to the database file or log files will change as a result of moving the files, be sure that you:
Use Ntdsutil.exe to move the files (rather than copying them) so that the registry is updated with the new path. Even if you are moving the files only temporarily, use Ntdsutil.exe to move files locally so that the registry remains current.
Perform a system state backup as soon as the move is complete so that the restore procedure uses the correct path.
Verify that the correct permissions are applied on the destination folder following the move. Revise permissions to those that are required to protect the database files, if needed.
The registry entries that Ntdsutil.exe updates when you move the database file are as follows:
Database backup path
Digital Signature Algorithm (DSA) database file
DSA working directory
The registry entry that Ntdsutil.exe updates when you move the log files is as follows:
- Database log files path
Disk space requirements for relocating Active Directory database files
Temporary location. Free space on the destination drive equivalent to at least the current size of the database file, the combined log files, or both, depending on which files you are moving.
Permanent location. Free space on the destination NTFS drive equivalent to at least the size specified below, plus space to accommodate anticipated growth, depending on which file or files you are moving.
The drive that is the permanent location of the database file or log files must be formatted as NTFS.
Database file only: The size of the database file plus 20 percent of the Ntds.dit file or 500 MB, whichever is greater.
Log files only: The size of the combined log files plus 20 percent of the combined logs or 500 MB, whichever is greater.
Database and logs. If the database and log files are stored on the same partition, free space should be at least 20 percent of the combined Ntds.dit and log files, or 1 GB, whichever is greater.
The preceding levels are minimum recommended levels. Therefore, adding additional space according to anticipated growth is recommended.
The following tools are required to perform the procedures for this task:
If you replace or reconfigure a drive that stores the SYSVOL folder, you must first move the SYSVOL folder manually. For information about moving SYSVOL manually, see Relocating SYSVOL Manually.
To complete this task, perform the following procedures:
The domain controller will not be available during the time in which files are being moved and until the move is verified. Ensure that alternate domain controllers are available during the file relocation to handle the capacity.
Determine the size and location of the Active Directory database by using one of the following procedures:
System state includes the database file and log files as well as SYSVOL and Net Logon shared folders, among other things. Always ensure that you have a current backup prior to moving database files.
Restart the domain controller in Directory Services Restore Mode by using one of the following methods:
Move or copy the directory database and log files by performing one of the following procedures:
The shared folder on a remote drive must have enough free space to hold the database file (Ntds.dit) and log files. Create separate subdirectories for copying the database file and the log files.