Export (0) Print
Expand All

Clean up server metadata

Updated: March 2, 2005

Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1, Windows Server 2003 with SP2

You perform the metadata cleanup process by using Ntdsutil.exe, a command-line tool that is automatically installed on all domain controllers. Metadata cleanup removes data from Active Directory that identifies a domain controller to the replication system. This procedure is required only for Active Directory domain controllers that were not successfully demoted using Dcpromo. This procedure does not have to be performed for domain member servers or client computers. On a domain controller that is running Windows Server 2003 with Service Pack 1 (SP1), metadata cleanup also removes File replication service (FRS) connections and attempts to transfer or seize any operations master roles (also known as flexible single master operations or FSMO roles) that the retired domain controller holds. These additional processes are performed automatically.

You can also use a script to clean up server metadata on most Windows operating systems. For information about using this script, see Remove Active Directory Domain Controller Metadata on the Microsoft Web site (http://go.microsoft.com/fwlink/?LinkID=123599).

Administrative credentials

  • To complete this procedure, you must be a member of the Enterprise Admins group.

To clean up server metadata

  1. Open a command prompt.

  2. Type the following command, and then press ENTER:

    ntdsutil

  3. At the ntdsutil: prompt, type:

    metadata cleanup

  4. Perform metadata cleanup as follows:

    • If you are performing metadata cleanup by using the version of Ntdsutil.exe that is included with Windows Server 2003 SP1, at the metadata cleanup: prompt, type:

      remove selected server ServerName

      Or

      remove selected server ServerName1 on ServerName2

       

      Value Definition

      ServerName, ServerName1

      The distinguished name of the domain controller whose metadata you want to remove, in the form cn=ServerName,cn=Servers,cn=SiteName, cn=Sites,cn=Configuration,dc=ForestRootDomain

      ServerName2

      The DNS name of the domain controller to which you want to connect and from which you want to remove server metadata

    • If you are performing metadata cleanup by using the version of Ntdsutil.exe that is included with Windows Server 2003 with no service pack, perform metadata cleanup as follows:

    1. At the metadata cleanup: prompt, type:

      connection

    2. At the server connections: prompt, type:

      connect to server Server

    3. At the server connections: prompt, type:

      quit

    4. At the metadata cleanup: prompt, type:

      select operation target

    5. At the select operation target: prompt, type:

      list sites

      A numbered list of sites appears.

    6. At the select operation target: prompt, type:

      select site SiteNumber

    7. At the select operation target: prompt, type:

      list domains in site

      A numbered list of domains in the selected site appears.

    8. At the select operation target: prompt, type:

      select domain DomainNumber

    9. At the select operation target: prompt, type:

      list servers in site

      A numbered list of servers in a domain and site appears.

    10. At the select operation target: prompt, type:

      select server ServerNumber

    11. At the select operation target: prompt, type:

      quit

    12. At the metadata cleanup: prompt, type:

      remove selected server

       

      Value Description

      Server

      The DNS name of a domain controller that you want to connect to

      SiteNumber

      The number associated with the site of the server that you want to clean up that appears in the list

      DomainNumber

      The number associated with the domain of the server that you want to clean up that appears in the list

      ServerNumber

      The number associated with the server that you want to clean up that appears in the list

    At this point, Active Directory confirms that the domain controller was removed successfully. If you receive an error message that indicates that the object cannot be found, Active Directory might have already removed the domain controller.

  5. To verify that the server was removed, type list servers in site, and then press ENTER. Ensure that the domain controller that you wanted to be removed is no longer displayed in the command output.

  6. At the metadata cleanup: and ntdsutil: prompts, type quit.

ImportantImportant
If the domain controller that was removed was also a DNS server, ensure that references to it are removed from the Name Servers tab in the DNS console. To do this, open the DNS console using another DNS server in the domain (dnsmgmt.msc), and then click the domain name under Forward Lookup Zones. Remove any references to the domain controller that was removed from the domain.

See Also

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft