Site icon REBELADMIN

How to move active directory database to new location?

When we installing active directory it gives an option to select the folder path to copy the active directory database files (NTDS Folder). My advice is always to use a separate partition in server to keep this instead default C:\Windows\NTDS\ folder path. But I know most of the time during the installation people used to pay less attention for this option. But what happen if you face a situation where you need to move the active directory database to different location? For an example due to running out of disk space in drive? Can we really do that?

Yes it is, we can move it to a different location with help of ntdsutil.exe. Let’s see in details how we can do it.

For my demo I am using a DC which holds its AD database files in default C:\Windows\NTDS\ folder. I need to move it to my new disk I added to the server. So new path I need to move it is E:\ADDB

Before we start this task we need to stop the active directory domain services. So make sure you aware of the impact it will make on network operations by stopping it.

1)    Log in to the primary domain controller as domain or enterprise administrator.
2)    Server Manager > Tools > Services

3)    Once mmc loaded right click on “Active Directory Domain Services” and click stop

4)    Then it will ask if it’s okay to stop associated services. Click “yes” to continue.

Once services are stopped we can go ahead with the database move.

1)    Right click on start button and click on “Command Prompt (Admin)

2)    Once command prompt load up type ntdsutil and press enter

3)    Then type “activate instance ntds” and press enter
4)    Then type “files” and enter

5)    In the files maintenance we need to specify the command to move the db. So in my demo I need to move it to E:\ADDB so the command will be move db to E:\ADDB. If you using space in folder path make sure you put the folder path inside double colon(“”). Once it execute it will move the db file and give an output as following.

6)    As you can see it move the database files successfully. But the logs are still in NTDS folder. To move the logs type move logs to E:\ADDB

7)    Now it’s moved logs and database successfully to the new location.

8)    Now it’s time to start the Active directory domain services again. Please go to services.mmc and start the service we stopped at the beginning of this step

This completes the process of moving AD DB and its logs. If you have any questions feel free to contact me on rebeladm@live.com

Exit mobile version