Como fazer desfragmentação da base do Active Directory

 

Abrir o Command Prompt em modo elevado e rodar os comando destacados em vermelho

 

Microsoft Windows [Version 6.3.9600]

(c) 2013 Microsoft Corporation. All rights reserved.

C:\Windows\system32>net stop “active directory domain services” /Y

The following services are dependent on the Active Directory Domain Services service.

Stopping the Active Directory Domain Services service will also stop these services.

Kerberos Key Distribution Center

Intersite Messaging

DNS Server

DFS Replication

The Kerberos Key Distribution Center service is stopping.

The Kerberos Key Distribution Center service was stopped successfully.

The Intersite Messaging service is stopping.

The Intersite Messaging service was stopped successfully.

The DNS Server service is stopping.

The DNS Server service was stopped successfully.

The DFS Replication service was stopped successfully.

The Active Directory Domain Services service is stopping.

The Active Directory Domain Services service was stopped successfully.

C:\Windows\system32>ntdsutil

ntdsutil: activate instance ntds

Active instance set to “ntds”.

ntdsutil: files

file maintenance: compact to c:\NTDS

Initiating DEFRAGMENTATION mode…

Source Database: C:\Windows\NTDS\ntds.dit

Target Database: c:\NTDS\ntds.dit

Defragmentation Status (% complete)

0 10 20 30 40 50 60 70 80 90 100

|—-|—-|—-|—-|—-|—-|—-|—-|—-|—-|

……………………………………………

It is recommended that you immediately perform a full backup

of this database. If you restore a backup made before the

defragmentation, the database will be rolled back to the state

it was in at the time of that backup.

Compaction is successful. You need to:

copy “c:\NTDS\ntds.dit” “C:\Windows\NTDS\ntds.dit”

and delete the old log files:

del C:\Windows\NTDS\*.log

file maintenance: quit

ntdsutil: quit

C:\Windows\system32>copy c:\NTDS\ntds.dit C:\Windows\NTDS\ntds.dit /Y

1 file(s) copied.

C:\Windows\system32>del C:\Windows\NTDS\*.log

C:\Windows\system32>net start “active directory domain services”

The Active Directory Domain Services service is starting..

The Active Directory Domain Services service was started successfully.

C:\Windows\system32>del c:\ntds\ntds.dit

C:\Windows\system32>del c:\ntds /Q

Esse post foi publicado em Uncategorized. Bookmark o link permanente.

Deixe uma resposta

Preencha os seus dados abaixo ou clique em um ícone para log in:

Logotipo do WordPress.com

Você está comentando utilizando sua conta WordPress.com. Sair / Alterar )

Imagem do Twitter

Você está comentando utilizando sua conta Twitter. Sair / Alterar )

Foto do Facebook

Você está comentando utilizando sua conta Facebook. Sair / Alterar )

Foto do Google+

Você está comentando utilizando sua conta Google+. Sair / Alterar )

Conectando a %s