programming4us
programming4us
DESKTOP

Windows Server 2008 : Using ntdsutil - Moving Active Directory to a Different Drive, Defragmenting Active Directory

- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019

1. Moving Active Directory to a Different Drive

You can sometimes improve the performance of Active Directory (AD) by moving the database file (ntds.dit) to a different physical drive. This can also be useful if you are running out of hard drive space. You can use the following steps to move the ntds.dit database file to a different location.

StepCommand
1.Launch a command prompt. Back up system state data with the following command. This command uses the D: drive as the backup target, but you can choose a different target based on your system. wbadmin start systemstatebackup -backuptarget:d: -quiet

Note

The Windows Server Backup feature must be installed for this step to work.

Tip

Although this step is not required, it ensures that you can recover your DC if something goes wrong. It takes some time to complete.

2.At the command, type net stop ntds and press Enter. When prompted to stop additional services, press Y to confirm. This stops AD and related services.
3.Type ntdsutil and press Enter.
4.Type activate instance ntds and press Enter.
5.Type files and press Enter.
6.Type move db to e:\ntds and press Enter.

Note

You need to substitute the drive letter e: with a valid writable drive on your system. The folder doesn’t need to exist because the move command creates it.

7.Type quit, and then press Enter twice to return to the command prompt.
8.Type net start ntds and press Enter to restart AD. After it starts, you can launch ADUC to verify that everything still works.

2. Defragmenting Active Directory

AD performs an online defragmentation every 12 hours by default. This is normally all that’s required. However, the online defragmentation does not reduce the size of the ntds.dit database file. If you have significantly fewer objects in AD than you had previously, you can shrink the size of the ntds.dit file by performing an offline defragmentation.

Tip

An offline defragmentation compacts the file, and you can compact the file only when AD is not running. You can stop the service with the net stop ntds command. It’s not necessary to reboot into Directory Services Restore Mode.


You can use the following steps to compact the database.

StepCommand
1.Launch a command prompt. Back up system state data with the following command. This command uses the D: drive as the backup target, but you can choose a different target based on your system. wbadmin start systemstatebackup -backuptarget:d: -quiet

Note

The Windows Server Backup feature must be installed for this step to work.

Tip

Although this step is not required, it ensures that you can recover your DC if something goes wrong. It takes some time to complete.

2.At the command, type net stop ntds and press Enter. When prompted to stop additional services, press Y to confirm. This stops AD and related services.
3.Type ntdsutil and press Enter.
4.Type activate instance ntds and press Enter.
5.Type files and press Enter.
6.Type compact to C:\compact and press Enter. You can use any target folder desired (other than C:\compact). Your display should be similar to Figure 1.
7.Type quit and press Enter. Type quit and press Enter again. This returns you to the command prompt. Although the following steps aren’t required, they help ensure that you can return to the original configuration if something goes wrong.
  1. Create a backup folder named ntdsbu in the root of C by typing md C:\ntdsbu and pressing Enter.

  2. Type copy C:\windows\ntds\ntds.dit C:\ntdsbu\ntds.dit and press Enter.

    Note

    If you moved the ntds.dit file, you need to substitute the C:\windows\ntds folder for the actual location.

  3. Type copy C:\windows\ntds\*.log C:\ntdsbu and press Enter.

    Note

    These steps create backup files of the ntds.dit AD database and the AD logs. If the ntds service is unable to restart, you can simply copy these files back to their original location.

8.Type copy C:\compact\ntds.dit C:\windows\ntds\ntds.dit and press Enter. When prompted to confirm the overwriting, type Y for yes.
9.Type del C:\windows\ntds\*.log and press Enter.
10.Type net start ntds, and press Enter. This restarts the ntds service. After it starts, you can launch ADUC to verify that everything still works.

Figure 1. Performing an offline defragmentation

Other  
  •  Windows Server 2008 : Using ntdsutil - Resetting the Directory Services Restore Mode Password, Changing the Garbage Collection Logging Level
  •  Windows Server 2003 : Deploying Stub Zones - Benefits of Stub Zones, Stub Zone Updates
  •  Windows Server 2003 : Creating Zone Delegations - Delegating Zones
  •  Windows Server 2003 : Configuring Advanced DNS Server Properties (part 2)
  •  Windows Server 2003 : Configuring Advanced DNS Server Properties (part 1)
  •  Windows 7 : Working with the Multi-Touch User Interface (part 3) - Adding Multi-Touch Interface Functionality
  •  Windows 7 : Working with the Multi-Touch User Interface (part 2) - Obtaining the Multi-Touch Platform Interop Library, Configuring the Application
  •  Windows 7 : Working with the Multi-Touch User Interface (part 1)
  •  Windows Server 2003 : Configuring Zone Properties and Transfers (part 4)
  •  Windows Server 2003 : Configuring Zone Properties and Transfers (part 3)
  •  
    Top 10
    Free Mobile And Desktop Apps For Accessing Restricted Websites
    MASERATI QUATTROPORTE; DIESEL : Lure of Italian limos
    TOYOTA CAMRY 2; 2.5 : Camry now more comely
    KIA SORENTO 2.2CRDi : Fuel-sipping slugger
    How To Setup, Password Protect & Encrypt Wireless Internet Connection
    Emulate And Run iPad Apps On Windows, Mac OS X & Linux With iPadian
    Backup & Restore Game Progress From Any Game With SaveGameProgress
    Generate A Facebook Timeline Cover Using A Free App
    New App for Women ‘Remix’ Offers Fashion Advice & Style Tips
    SG50 Ferrari F12berlinetta : Prancing Horse for Lion City's 50th
    - Messages forwarded by Outlook rule go nowhere
    - Create and Deploy Windows 7 Image
    - How do I check to see if my exchange 2003 is an open relay? (not using a open relay tester tool online, but on the console)
    - Creating and using an unencrypted cookie in ASP.NET
    - Directories
    - Poor Performance on Sharepoint 2010 Server
    - SBS 2008 ~ The e-mail alias already exists...
    - Public to Private IP - DNS Changes
    - Send Email from Winform application
    - How to create a .mdb file from ms sql server database.......
    programming4us programming4us
    programming4us
     
     
    programming4us