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.

Defrag Compact BD AD

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”,

Defrag Compact BD AD

Abrimos una consola de MSDOS, escribimos el comando NTDSUTIL y pulsamos Enter,

Defrag Compact BD AD

Dentro de la linea de comandos NTDSUTIL, escribiremos FILES, press Enter,

Defrag Compact BD AD

Dentro del prompt FILE MAINTENANCE, debemos escribir: COMPACT TO DIRECTORIO_TEMPORAL and hit Enter,

Defrag Compact BD AD

esperamos unos segundos/minutos dependiendo del tamaño de nuestra BD, mientras la defragmenta

Defrag Compact BD AD

GOOD, la tarea se ha completado rápidamente, ahora salimos de la linea de comandos con QUIT.

Defrag Compact BD AD

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.

Defrag Compact BD AD

“S”,

Defrag Compact BD AD

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.

Defrag Compact BD AD

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


Recommended Posts

Author

nheobug@bujarra.com
Autor del blog Bujarra.com Cualquier necesidad que tengas, Do not hesitate to contact me, I will try to help you whenever I can, Sharing is living ;) . Enjoy documents!!!