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
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 event | Scenario | Fix |
|---|---|---|
00002095 (problem 5012 DIR_ERROR), every three minutes | A read-only domain controller (RODC) running DNS can't connect to a writable DC that runs DNS | Check 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 permissions | Make 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 DCs | Remove the orphaned records with Remove-DnsServerResourceRecord |
Read the error code in the event description first, then go to the matching section below.
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.
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.
<DomainFQDN> with the domain FQDN):
nltest /dsgetdc:<DomainFQDN> /WRITABLE /AVOIDSELF /TRY_NEXT_CLOSEST_SITE /DS_6
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.
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
15 Field Engineering back to 0.Adsiedit.msc) and go to the LDAP location of that zone object./domain) and list the members:
net localgroup users /domain
net localgroup users "NT AUTHORITY\Authenticated Users" /add /domain
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"
}
}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.
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.
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.
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.
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.
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.
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.
Runbooks, checklists and helpdesk templates: IT Admin Packs on Gumroad.