Defragment or compact the Active Directory database in Windows 2008
In this document, we will learn how to compact and defragment the Active Directory database. This process must be carried out on each of the domain controllers that we have. With this we will achieve a higher performance, that the database takes up less space. Before starting with this wizard, it is advisable to make a backup of Active Directory. This document shows how to do this on a Microsoft Windows server 2008.
Una de las ventajas que tiene Windows 2008 Server es la que podemos realizar este tipo de tareas en caliente, This is, sin reiniciar el servidor. To do this,, debemos detener el servicio “Active Directory Domain Services” en la consola “Services” of the “Administrative Tools”,
Abrimos una consola de MSDOS, escribimos el comando NTDSUTIL y pulsamos Enter,
Dentro de la linea de comandos NTDSUTIL, escribiremos FILES, press Enter,
Dentro del prompt FILE MAINTENANCE, debemos escribir: COMPACT TO DIRECTORIO_TEMPORAL and hit Enter,
… esperamos unos segundos/minutos dependiendo del tamaño de nuestra BD, mientras la defragmenta…
GOOD, la tarea se ha completado rápidamente, ahora salimos de la linea de comandos con QUIT.
OK, now, debemos hacernos una copia de la BD nuestra de Directorio Activo que será NTDS.DIT que por defecto está en: C:WINDOWSNTDS (no obligatorio pero recomendable). Una vez la tengamos copiada debemos sustituir la original con la base de datos que nos ha compactado en el directorio temporal, desde linea de comandos con un COPY DIRECTORIO_TEMPORALNTDS.DIT C:WINDOWSNTDSNTDS.DIT.
“S”,
GOOD, And now, debemos entrar en el directorio donde se guardan los registros de transacciones, which by default is: C:WINDOWSNTDS y eliminar todos los ficheros con extensión LOG. En línea de comandos sería algo como: DEL C:WINDOWSNTDS*.LOG.
And that's it, basta con iniciar los servicios del Directorio Activo de nuevo y tendríamos la base de datos 2008 compactada y desfragmentada. Así que abrimos “Services” in “Administrative Tools” e iniciamos el servicio “Active Directory Domain Services”.
www.bujarra.com – Héctor Herrero – Nh*****@bu*****.cOm – v 1.0