DNS Server Event 4015: The DNS Server Has Encountered a Critical Error from the Active Directory

DNS Server event 4015 on a domain controller: match the error code. 00002095 means an RODC cannot reach a writable DNS server, 0000051B a zone owner or Users group problem, ADMIN_LIMIT_EXCEEDED too many orphaned records.

Home › Guides › DNS Server event 4015

Last updated 21 November 2026

Quick answer

DNS Server event 4015 means a domain controller running the DNS Server role hit a critical error from Active Directory. The description carries an error code, and Microsoft (KB 969488, KB 2733147) splits the event into three common scenarios by that code:

Error code in the eventScenarioFix
00002095 (problem 5012 DIR_ERROR), every three minutesA read-only domain controller (RODC) running DNS can't connect to a writable DC that runs DNSCheck the DsGetDC result with nltest and fix the DNS topology
0000051B (problem 1005 CONSTRAINT_ATT_TYPE, nTSecurityDescriptor)The DNS server can't access an Active Directory object because of permissionsMake SYSTEM the owner of the zone object, or repair the members of the domain Users group
ADMIN_LIMIT_EXCEEDED (00002024, problem 5008)A dnsRecord attribute holds too many orphaned values from demoted DCsRemove the orphaned records with Remove-DnsServerResourceRecord

Read the error code in the event description first, then go to the matching section below.

The three event texts

RODC scenario (log DNS Server, source Microsoft-Windows-DNS-Server-Service, level Error):

The DNS server has encountered a critical error from the Active Directory. Check that the Active Directory is functioning properly. The extended error debug information (which may be empty) is "00002095: SvcErr: DSID-03210A6A, problem 5012 (DIR_ERROR), data 16". The event data contains the error.

Permission scenario (logged repeatedly):

The DNS server has encountered a critical error from the Active Directory. Check that the Active Directory is functioning properly. The extended error debug information (which may be empty) is "0000051B: AttrErr: DSID-xxxx, #1: 0:0000051B: DSID-xxxx, problem 1005 (CONSTRAINT_ATT_TYPE), data 0, Att 20119(nTSecurityDescriptor)". The eventdata contains the error.

Orphaned records scenario:

The DNS server has encountered a critical error from the Active Directory. Check that the Active Directory is functioning properly. The extended error debug information (which may be empty) is "00002024: SvcErr: DSID-02050BBD, problem 5008 (ADMIN_LIMIT_EXCEEDED), data -1026". The event data contains the error.

Error 00002095: RODC can't reach a writable DNS server

An RODC that is a DNS server uses the replicateSingleObject operation to keep its DNS information current; in this scenario it is trying to update a name server (NS) record. To find a writable DC DNS server it calls one of the DsGetDC functions (such as DsGetDCNameA or DsGetDCNameW) with the flags DS_AVOID_SELF, DS_TRY_NEXTCLOSEST_SITE, DS_DIRECTORY_SERVICE_6_REQUIRED and DS_WRITEABLE_REQUIRED. It logs 4015 when the function finds no writable DC, or when the DC it returns isn't a DNS server or doesn't list an appropriate NS record.

  1. On the RODC, check what DsGetDC returns (replace <DomainFQDN> with the domain FQDN):
    nltest /dsgetdc:<DomainFQDN> /WRITABLE /AVOIDSELF /TRY_NEXT_CLOSEST_SITE /DS_6
  2. If the output lists a DC, check that DC's configuration. If no DC is found, update your DNS topology so the RODC can reach an appropriate DC.
  3. Either way, the DC must be writable, have the DNS Server role installed and have correctly configured DNS records.

Error 0000051B: the DNS server can't access an AD object

Microsoft gives two causes: the SYSTEM account isn't the owner of the DNS zone, or the domain Users group doesn't have the correct members (including Authenticated Users). In the second case the issue might not appear until the DNS servers have run for at least 10 hours, and it occurs sporadically on multiple DCs.

SYSTEM isn't the owner of the zone

  1. On a DC that logs 4015, enable Field Engineering diagnostic logging. Microsoft's logging article says to increase the Directory Services log to 200 MB, set 15 Field Engineering under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics to 5, and create the REG_DWORD values Expensive Search Results Threshold, Inefficient Search Results Threshold and Search Time Threshold (msecs) under ...\NTDS\Parameters with the value 1. Back up the registry first.
    reg add "HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics" /v "15 Field Engineering" /t REG_DWORD /d 5 /f
  2. Reproduce the issue.
  3. Stop Field Engineering logging by setting 15 Field Engineering back to 0.
  4. Note the time of the 4015 event and find the Directory Service event 1644 logged at the same time. Note the FQDN of the object it names; it should be a DNS zone.
  5. Open ADSI Edit (Adsiedit.msc) and go to the LDAP location of that zone object.
  6. Right-click the zone object, select Properties > Security > Advanced, and make sure Owner is set to SYSTEM.

The domain Users group is missing members

  1. Sign in to the DC with an admin account (or run this on an admin computer with /domain) and list the members:
    net localgroup users /domain
  2. The group should contain Domain Users, NT AUTHORITY\Authenticated Users and NT AUTHORITY\INTERACTIVE. Add any that are missing, for example:
    net localgroup users "NT AUTHORITY\Authenticated Users" /add /domain
  3. Wait for the change to replicate among the DCs.
  4. Restart the DNS Server service on all the DCs in the domain.

ADMIN_LIMIT_EXCEEDED: too many orphaned DNS records

Active Directory stores DNS names as dnsNode objects and the records as values of their multi-valued dnsRecord attribute. Promoting a DC as a DNS server adds records automatically, but demoting one doesn't clean them up, so after many demote and promote operations in one forest the orphaned values can fill a dnsRecord attribute to its maximum. Affected DCs can't register SRV, A, PTR or NS records and log 4015. Count the values per partition (replace the contoso DNs with yours):

repadmin /showattr . "CN=MicrosoftDNS,CN=System,DC=contoso,DC=com" /subtree /filter:"(objectclass=dnsnode)" /atts:"dnsRecord" /allvalues >c:\temp\dns_Domain.txt
repadmin /showattr . "CN=MicrosoftDNS,DC=DomainDnsZones,DC=contoso,DC=com" /subtree /filter:"(objectclass=dnsnode)" /atts:"dnsRecord" /allvalues >c:\temp\dns_DomainDnsZones.txt
repadmin /showattr . "CN=MicrosoftDNS,DC=ForestDnsZones,DC=contoso,DC=com" /subtree /filter:"(objectclass=dnsnode)" /atts:"dnsRecord" /allvalues >c:\temp\dns_ForestDnsZones.txt

The number in front of dnsRecord is the count of values on that object. In Microsoft's example the TrustAnchors object has 1,280:

DN: DC=@,DC=..TrustAnchors,CN=MicrosoftDNS,DC=ForestDnsZones,DC=contoso,DC=com
1280> dnsRecord: <48 byte blob>;

The fix is to remove all the orphaned entries of the demoted DCs. Check each zone and delete selectively:

Get-DnsServerResourceRecord -ZoneName "trustanchors" -RRType "NS"
Remove-DnsServerResourceRecord -zonename "trustanchors" -RRType "NS" -Name "@" -RecordData "dc2.contoso.com"

Microsoft's script version deletes multiple record values for a single host: every NS record in trustanchors whose name server matches *dc2* and every SRV record in _msdcs.contoso.com whose target matches *dc2*:

$AllNsRecords = Get-DnsServerResourceRecord -ZoneName "trustanchors" -RRType "NS"
Foreach($Record in $AllNsRecords){
If($Record.recorddata.nameserver -like "*dc2*"){
$Record | Remove-DnsServerResourceRecord -ZoneName "trustanchors"
}
}
$AllSrvRecords = Get-DnsServerResourceRecord -ZoneName "_msdcs.contoso.com" -RRType "Srv"
Foreach($Record in $AllSrvRecords){
If($Record.recorddata.domainname -like "*dc2*"){
$Record | Remove-DnsServerResourceRecord -ZoneName "_msdcs.contoso.com"
}
}

Collect data for a case

With the TroubleShootingScript toolset (TSS), this command traces the DNS server and stops automatically once event 4015 is logged:

.\TSS.ps1 -Scenario NET_DNSsrv -Mode Verbose -WaitEvent Evt:4015:'DNS Server'

Zones not loading with events 4000, 4007, 4004 or 4016 instead? See DNS Server events 4000, 4007, 4004 and 4016.

Related tools and guides

Look up DNS Server event 4015 and Directory Service event 1644 in the Windows Event ID Lookup, copy the Get-DnsServerResourceRecord and Remove-DnsServerResourceRecord lines from the PowerShell Cheat Sheet, find the DSID and problem code in exported 4015 events with the Regex Tester, check which site and subnet the RODC and writable DCs sit in with the IPv4 Subnet Calculator or IPv6 Subnet Calculator, and identify the network adapter vendor of the affected DC with the MAC Vendor Lookup. Related guides: DNS Server events 4000, 4007, 4004 and 4016, DNS Server event 4013, Netlogon events 5774 and 5781 and common AD replication errors.

Every AD replication error code with its cause and fix: common Active Directory replication errors.

Every Windows DNS Server and DHCP Server event and symptom in one place: common Windows DNS Server and DHCP Server errors.

FAQ

What does DNS Server event 4015 mean?

A domain controller that runs the DNS Server role experienced a critical error from Active Directory. The event description includes an error code, and Microsoft describes three common scenarios: 00002095, 0000051B and ADMIN_LIMIT_EXCEEDED.

Why does an RODC log event 4015 every three minutes?

With error code 00002095, the RODC running DNS cannot connect to a writable domain controller that runs DNS. Check the result of nltest /dsgetdc:DomainFQDN /WRITABLE /AVOIDSELF /TRY_NEXT_CLOSEST_SITE /DS_6 and fix the DNS topology.

How do I fix event 4015 with error 0000051B?

Either make sure SYSTEM is the owner of the DNS zone object in ADSI Edit, using Directory Service event 1644 to find the zone, or make sure the domain Users group contains Domain Users, Authenticated Users and INTERACTIVE, then restart DNS on all DCs.

What causes event 4015 with ADMIN_LIMIT_EXCEEDED?

A multi-valued dnsRecord attribute of a dnsNode object holds too many values. Demoting a DC that is a DNS server does not clean up its records, so after many demote and promote operations orphaned values fill the attribute.

How do I collect a trace for event 4015?

Run .\TSS.ps1 -Scenario NET_DNSsrv -Mode Verbose -WaitEvent Evt:4015:'DNS Server' from the TroubleShootingScript toolset. The trace stops automatically after event 4015 is logged.

Want the full kit?

Runbooks, checklists and helpdesk templates: IT Admin Packs on Gumroad.