While installing the domain controller we have to provide the path of the NTDS.DIT file location and the log file location. By default this path is c:\windows\NTDS folder. Microsoft recommends that ntds.dit should not be stored in C: Drive. We can change the path of the file while installing the DC. In some scenarios we have to move the database to another location. One of the scenarios is if the volume containing the ntds.dit file is running out of space.
We need to follow these steps to move AD database file ntds.dit from one location to another.
Login to the domain controller using domain admin or enterprise admin account
Stop the Active Directory Domain Services
Open command prompt with admin credentials
On command prompt type ntdsutil
Type activate instance ntds
Then type files
In file maintenance type the command move db to E:\NEWNTDS.
Remember to use “” if path contains space
Once the database files are successfully moved, type the following command to move the logs: move logs to E:\newlogs
Verify that files are moved to the new location
Start the active directory domain services service using services.msc