Updated: February 17, 2010
Applies To: Windows Server 2003 with SP1
This command-line tool analyzes the state of one or all domain controllers in a forest and reports any problems to assist in troubleshooting. DCDiag.exe consists of a variety of tests that can be run individually or as part of a suite to verify domain controller health.
The DCDiag command-line tool is included when you install Windows Server 2003 Support Tools from the product CD or from the Microsoft Download Center (http://go.microsoft.com/fwlink/?LinkId=100114). For more information about how to install Windows Support Tools, see Install Windows Support Tools (http://go.microsoft.com/fwlink/?LinkId=62270).
DCDiag
DCDIAG /TEST:DNS
This feature is of interest to the following audiences:
There are two significant improvements to DCDiag in Windows Server 2003 Service Pack 1:
DCDIAG /CheckSecurityError
.
The details of these new enhancements are described below.
DCDiag.exe has been enhanced for Windows Server 2003 Service Pack 1 to include new DNS functionality for reporting on the overall DNS health of domain controllers. There are seven new DNS-related tests that can be run individually or simultaneously. These tests may be performed on one or all domain controllers in an Active Directory forest. When the tests have completed, DCDiag.exe presents a summary of the results, along with detailed information for each domain controller tested.
Windows Server 2003 SP1 dcdiag uses the same basic syntax as previous versions of dcdiag. The syntax for running the new DNS tests is as follows:
dcdiag
Dcdiag /test:DNS [/DnsBasic | /DnsForwarders | /DnsDelegation | /DnsDynamicUpdate | /DnsRecordRegistration | /DnsResolveExtName [/DnsInternetName: InternetName ] | /DnsAll] [/f: Logfile ] [/ferr: Logerr ] /S: DCName [/e] [/v]
Dcdiag /test:DNS [/DnsBasic | /DnsForwarders | /DnsDelegation | /DnsDynamicUpdate | /DnsRecordRegistration | /DnsResolveExtName [/DnsInternetName:
] | /DnsAll] [/f:
] [/ferr:
] /S:
[/e] [/v]
/test:DNS
Performs all seven subtests except the /DnsInternetName test against the scoped set of domain controllers. The most common DCDIAG command line arguments are DCDIAG /TEST:DNS /V /S:DCNAME to run the six default DNS subtests against a single domain controller (DC) or DCDIAG /TEST:DNS /V /E to run the six default DNS subtests against all DCs in the console computer's test forest. DCDIAG /TEST:DNS is identical to the /DnsAll command when individual subtests are not defined.
/DnsInternetName
DCDIAG /TEST:DNS /V /S:
DCDIAG /TEST:DNS /V /E
/DnsAll
/test:DNS [DNS test]
Performs the specified DNS test. If no test is specified, defaults to /DnsAll.
/DnsBasic
Performs basic DNS tests, including network connectivity, DNS client configuration, service availability, and zone existence.
/DnsForwarders
Performs the /DnsBasic tests, and also checks the configuration of forwarders.
/DnsDelegation
Performs the /DnsBasic tests, and also checks for proper delegations.
/DnsDynamicUpdate
Performs the /DnsBasic tests, and also determines whether dynamic update is enabled in the Active Directory zone.
/DnsRecordRegistration
Performs the /DnsBasic tests, and also checks whether the A, CNAME, and well-known SRV records are registered. In addition, creates an inventory report based on results.
/DnsResolveExtName [/DnsInternetName: InternetName ]
/DnsResolveExtName [/DnsInternetName:
]
Performs the /DnsBasic tests, and also attempts to resolve a sample intranet or Internet Name. If /DnsInternetName is not specified, then the command attempts to resolve the name www.microsoft.com. If /DnsInternetName is specified, then the command attempts to resolve the Internet name supplied by the user.
Performs all tests, except for the DnsResolveExtName test, and generates a report.
DnsResolveExtName
,
/f: Logfile
/f:
Redirects output to the log file supplied by the user.
/ferr: Logerr
/ferr:
Redirects fatal error output to a separate log file.
/s: DCName
/s:
Specifies the domain controller against which to run the tests.
/e
All tests specified by /test:DNS are run against all domain controllers in the Active Directory forest.
/v
Verbose. Presents information about successful test results, in addition to information about errors and warnings. (When the /v parameter is not used, only error and warning information is presented.) Microsoft recommends using the /v switch when errors or warnings are reported in the summary table
test:/DNS
CNAME GUID
The GUID registered as the canonical name (CNAME) of the DNS server.
A
The host address (A) resource record. Maps a DNS domain name to an Internet Protocol (IP) version 4 32-bit address.
LDAP SRV
The service locator (SRV) resource record for the LDAP service.
GC SRV
The service locator (SRV) resource record for the global catalog (GC) server.
PDC SRV
The service locator (SRV) resource record for the primary domain controller (PDC).
/DnsResolveExtName
The following steps summarize how to interpret the results provided by DNS-enhanced dcdiag:
dcdiag test:DNS /e /f:dns.txt
DC:
dcdiag /test:DNS /v /e
Dcdiag takes a conservative approach by identifying DNS client or DNS server configurations that may be problematic, do not conform to best practice configurations, or that dcdiag cannot fully validate. Therefore, the summary and detailed sections of dcdiag may report warnings for DNS configurations that are currently functional. Administrators should investigate and validate such configurations when identified by dcdiag.
Dcdiag
The tables below contain the configurations that can trigger dcdiag to report warnings or errors for each of the DNS subtests.
Warning: Adapter <adapter name> has dynamic IP address
Static IP addresses are recommended for all DNS servers.
Warning: Adapter <adapter name> has invalid DNS server: <name> <IP address>
DNS server may not be reachable.
Warning: No DNS RPC connectivity (error or non Microsoft DNS server is running)
Disregard this warning if the DNS server is a BIND or other non-Microsoft DNS server.
Warning: The Active Directory zone on this DC/DNS server was not found
N/A
Warning: Root zone on this DC/DNS server was found
Error: Authentication failed with specified credentials
DCDIAG requires Enterprise Admin credential to run all the tests.
Error: No LDAP connectivity
Error: No DS RPC connectivity
Error: No WMI connectivity
DNS test requires WMI connectivity to run on the remote computer.
Error: Can't read operating system version through WMI
This might be caused by the lack of a WMI connection on the remote computer.
Error: <Operating system name> not supported (this tool is supported on Windows 2000, Windows XP, and Windows Server 2003 only)
Error: Open Service Control Manager failed
Unable to find whether the service is running or not.
Error: Kdc/netlogon/DNS/dnscache is not running
Some of the key services are not running.
Error: Can't read network adapter information through WMI
Error: All DNS servers are invalid
DNS servers that the client is pointing to are either not reachable, not a DNS server, or have invalid IP addresses.
Error: The A record for this DC was not found
Every DC should register an A record. Make sure A records are registered on all the DNS servers the client is pointing to.
Error: Enumeration of zones failed to find root and AD zone
Error: Could not query DNS zones on this DC
Make sure that the zone in which the DC is supposed to register is present.
Error: Forwarders list has invalid forwarder: <IP address of the forwarder>
Forwarders configured on the DNS server have an invalid IP address or are not a DNS server, or name resolution is not working (that is, cannot resolve forest root domain SRV record if it is a non-root domain DC).
Error: Both root hints and forwarders are not configured. Please configure either forwarders or root hints
Make sure either forwarders or root hints are configured on the DNS server unless it hosts root zone.
Error: Root hints list has invalid root hint server: <IP address of Root hint server>
Root hint servers configured on the DNS server have invalid IP address or are not a DNS server, or name resolution not working (that is, cannot resolve forest root domain SRV record if it is a non root domain DC).
Error:<Root hint server Name> IP: <Unavailable> Status:<status of the server>
Configured root hint servers don’t have corresponding IP address. Status field will tell you the status of the server
Error:<Root hint server Name> IP: <Unavailable> Status: A record not found
Configured root hint servers don’t have A record.
Error: Enumeration of Root hint servers failed on <DNS server name>
Couldn’t list the root hint servers on the target DNS server.
Warning: DNS server: <DnsServer name> IP: <Ipaddress> Failure: Missing glue A record
The configured delegation is missing glue A record.
DNS server: <Server name> IP:<IP address> Error: Broken delegation -verbose
Delegation is configured but the name server is not responding.
DNS server: <Server name> IP:<IP address> Error: Broken delegated domain <Delegated domain name> -non-verbose
Error: Failed to enumerate the records at the zone root on the server
Warning: Dynamic update is enabled on the zone but not secure <zone name>
Secure dynamic updates are recommended.
Warning: Failed to add test record _dcdiag_test_record with error <error code> in zone <zone name>
Test adds a dummy record dynamically
Warning: Failed to delete test record _dcdiag_test_record with error <error code> in zone zone <zone name>
Deletes the added record as well.
Error: Dynamic update is not enabled on the zone <zone name>
Dynamic update is not enabled on the Active Directory zone so client cannot register its records.
Warning: Missing DC SRV record at DNS server <record name>
Ignore the error if DNSAvoidRegisterRecord registry key or its Group Policy has been configured to prevent registration of this record.
DNSAvoidRegisterRecord
Warning: Missing GC SRV record at DNS server <record name>
Warning: Missing PDC SRV record at DNS server <record name>
Warning: Record Registrations not found in some network adapters
Error: Missing A record at DNS server <DNS Server IP address> : <A record name>
DC hasn’t registered its A record on the specified DNS server.
Error: Missing CNAME record at DNS server <DNS Server IP address> : <CNAME record name>
DC hasn’t registered its CNAME record on the specified DNS server.
Error: Missing DC SRV record at DNS server <DNS Server IP address> : <SRV record name>
DC hasn’t registered its DC SRV record on the specified DNS server.
Error: Missing GC SRV record at DNS server <DNS Server IP address> : <SRV record name>
DC hasn’t registered its GC SRV record on the specified DNS server.
Error: Missing PDC SRV record at DNS server <DNS Server IP address> : <SRV record name>
DC hasn’t registered specified PDC SRV record on the specified DNS server. All these records can be registered by stopping and starting the netlogon service.
Error: Record registrations cannot be found for all the network adapters
If there are multiple network adaptors the test checks whether all the records are present on all the DNS servers configured on each adaptor. This error occurs if the record registration is missing on the DNS server.
Error: Internet name <name> cannot be resolved
Specified Internet name cannot be resolved. Make sure the proxy client, servers, root hints, and forwarders are configured properly.
Warning: Neither forwarders nor root hints are configured from subordinate domain to parent domain
Forwarder or root hints need to be configured in the DNS servers of either the parent or subordinate domains that are hosting the authoritative zones for their respective domain to enable name resolution to work.
Error: Delegation is not configured on the parent domain
Delegation should be configured from parent to subordinate domain.
Error: Delegation is present but the glue record is missing
Delegation is configured but the name servers are missing their glue record.
Error: Forwarders are misconfigured from parent domain to subordinate domain
Forwarders must be configured from subordinate domain to parent domain.
Error: Root hints are misconfigured from parent domain to subordinate domain
Root hints must be configured from subordinate domain to parent domain.
Error: Forwarders are configured from subordinate to parent domain but some of them failed DNS server tests (See DNS servers section for error details)
Forwarders configured have an invalid IP address or are not a valid DNS server, or name resolution is not working (cannot resolve forest root domain SRV record if it is in the non-root domain).
Error: Root hints are configured from subordinate to parent domain but some of them failed DNS server tests (See DNS servers section for error details)
Root hints configured have an invalid IP address or are not a valid DNS server, or name resolution is not working.
The following examples illustrate the use of Windows Server 2003 SP1 dcdiag. You should replace the parameters in italics with those appropriate for your environment:
Dcdiag /test:DNS /s:
/v /f:
Dcdiag /test:DNS /e /f:
Dcdiag /test:DNS /v /e /f:
Dcdiag /test:DNS /DnsBasic /s:
Dcdiag /test:DNS /DnsForwarders /s:
Dcdiag /test:DNS /DnsDelegation /s:
Dcdiag /test:DNS /DnsDynamicUpdate /s:
Dcdiag /test:DNS /DnsRecordRegistration /s:
Dcdiag /test:DNS /DnsResolveExtName /DnsInternetName:
/DnsResolveName
DCDiag.exe has been enhanced for Windows Server 2003 Service Pack 1 to include new functionality to identify security configurations that can cause Active Directory replication to fail.
The new CheckSecurityError test may be performed on one or all domain controllers in an Active Directory forest. The test performs the following operations:
CheckSecurityError
When the test has completed, DCDiag.exe presents a summary of the results for each domain controller tested and the diagnosis of the security errors encountered
This test can be run from the command-line using the following syntax:
Dcdiag /test:CheckSecurityError
Optionally, you can add the switch /ReplSource:SourceDC to the command to identify a specific domain controller as a source in a replication attempt. The domain controller specified in the /replsource: parameter does not need to be a current source domain controller that the domain controller being tested currently replicates from (one that the destination domain controller currently has an inbound connection object from).This test will collect information from the domain controller, key distribution center (KDC) source and destination servers, and Active Directory.
/ReplSource:
/replsource:
If replication is not working and the error is a security error (such as "Access Denied", "The target account name is incorrect", or "The RPC server is unavailable") there are many different factors that could be causing the issue. This test automates the diagnosis by looking at the most common sources of these errors and reporting them so that you can resolve the issue.