About this article: This article is reviewed against the cited sources. This is source research, not lab validation. Check the stated versions and your own requirements before making changes.
Event 4015 in the DNS Server log means the DNS service on a domain controller hit an error while talking to Active Directory. The cause is in the extended error code inside the event text, so read that first. Microsoft documents three cases: 00002095 on a read-only domain controller, 0000051B for a permissions fault, and ADMIN_LIMIT_EXCEEDED when a DNS record attribute is full.
Each case has a different fix, and two of the fixes change security settings or delete DNS records. Prove which one you have before touching anything.
What the error means
Microsoft's page describes event 4015 as the DNS Server role on a domain controller reporting a critical error, with an error code that says what type of issue it was. The event text begins "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" followed by the code and, for the first two cases, a DSID. Its source is Microsoft-Windows-DNS-Server-Service in the DNS Server log.
The three cases Microsoft names:
00002095: SvcErr: DSID-03210A6A, problem 5012 (DIR_ERROR), data 16, logged every three minutes by a read-only domain controller (RODC) that runs DNS. It cannot connect to a writable domain controller that runs DNS. The RODC uses aDsGetDCcall to find one, with flags that avoid itself, try the next closest site, require Directory Services 6 and require a writable server. It logs 4015 if the returned server is not a DNS server, has no suitable name server record, or if no writable server is found.0000051B: AttrErr: DSID-xxxx, #1: 0:0000051B: DSID-xxxx, problem 1005 (CONSTRAINT_ATT_TYPE), data 0, Att 20119(nTSecurityDescriptor). The DNS server cannot access an Active Directory object. Microsoft names two conditions: the SYSTEM account is not the owner of the DNS zone, or the domain's Users group lacks the right members, including Authenticated Users. In the second case it may not appear until the DNS servers have run for at least 10 hours, and it happens sporadically on several domain controllers.00002024: SvcErr: DSID-02050BBD, problem 5008 (ADMIN_LIMIT_EXCEEDED), data -1026. A multi-valueddnsRecordattribute on adnsNodeobject has too many values. Microsoft ties this to forests with Active Directory-integrated zones in which DNS-hosting domain controllers have been promoted and demoted many times. Demoting does not clean up the related DNS objects, so orphaned values accumulate.
The pages are headed "Supported versions of Windows Server" and give no narrower version range. Read the event on your server and match its code to a case.
Likely causes
| Cause | What you see | How to confirm |
|---|---|---|
| RODC cannot find a writable DNS server | Event 4015 with 00002095 about every three minutes on an RODC | nltest returns no domain controller, or one without the DNS role or the right name server record |
| SYSTEM is not the owner of the DNS zone object | 4015 with 0000051B, repeating | Directory Service event 1644 names the object; its owner in ADSI Edit is not SYSTEM |
| Domain Users membership incomplete | 4015 with 0000051B on several domain controllers, sporadic, after about 10 hours of uptime | net localgroup users /domain is missing an expected member |
| Orphaned DNS values from demoted domain controllers | 4015 naming ADMIN_LIMIT_EXCEEDED; newly promoted domain controllers cannot register records | repadmin shows a very large dnsRecord value count |
Prove the cause before changing anything
Start with the event itself. In Event Viewer, open the DNS Server log, find event 4015 and copy the extended error code. Then follow the matching branch. Every command below only reads.
For 00002095, from the RODC in an elevated prompt:
nltest /dsgetdc:<DomainFQDN> /WRITABLE /AVOIDSELF /TRY_NEXT_CLOSEST_SITE /DS_6
<DomainFQDN> is the domain's fully qualified name. This reproduces the lookup the RODC does. Microsoft's page does not show sample output. If the command lists a domain controller, check that it is writable, that it has the DNS Server role installed, and that its DNS records are right. If it lists none, the topology is the problem.
For 0000051B, Users group: run net localgroup users /domain as an Admin group member, on a domain controller or an admin computer. Microsoft says the group should contain Domain Users, NT AUTHORITY\Authenticated Users and NT AUTHORITY\INTERACTIVE.
For 0000051B, zone owner: this needs diagnostic logging, which changes a registry value and is therefore not a pure read.
Risk: Microsoft's page for Field Engineering diagnostic logging says it is not enabled by default and should only be enabled during active troubleshooting. Enabling it means increasing the Directory Services event log size to 200 MB and setting the value 15 Field Engineering under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics to 5. Microsoft warns that detailed logging uses more resources and can degrade a server, and says to reset entries to 0 afterwards; back up the registry first. Back out by setting the value to 0, which is also how the 4015 page says to stop it.
With logging on, reproduce the problem, set the value back to 0, note the time of the 4015, and find Directory Service event 1644 from the same time. It names the FQDN of an object, which should be a DNS zone. Open adsiedit.msc, go to the zone object, then Properties, Security, Advanced, and read the Owner.
For ADMIN_LIMIT_EXCEEDED: count the values. Microsoft's commands, with contoso.com as the example domain:
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
Output shows a count and a placeholder per value, for example 1280> dnsRecord: <48 byte blob>;. The values themselves are not shown. Look for a dnsNode with a very high count, such as one in the ..TrustAnchors zone.
Fix
00002095. Make the RODC able to find a writable DNS-hosting domain controller. Microsoft's instruction is to update your DNS topology so the RODC can connect to an appropriate domain controller, which must be writable, have the DNS Server role installed and have correct DNS records. The page names no further steps; check the site, subnet and name server record data for the domain controller nltest returns.
0000051B, SYSTEM not the owner. In ADSI Edit, set the zone object's Owner to SYSTEM.
Disruptive step: changing an owner on a directory object alters who may change its permissions, and replicates to all domain controllers. Record the old owner first so you can restore it; Microsoft's page documents no other way back.
0000051B, Users group. If a listed member is missing, add it. Microsoft's example for Authenticated Users:
net localgroup users "NT AUTHORITY\Authenticated Users" /add /domain
Disruptive step: this changes the membership of the domain's Users group, which other services may rely on, so treat it with caution. Microsoft documents no undo step, so list the group's members before and after. Then wait for the change to replicate and restart the DNS Server service on all domain controllers in the domain.
Risk: restarting the DNS Server service interrupts name resolution on that server. Stagger the restarts so another DNS server stays up.
ADMIN_LIMIT_EXCEEDED. Remove the orphaned values of the demoted domain controllers, zone by zone. Microsoft's pattern is to list first, then remove:
Get-DnsServerResourceRecord -ZoneName "<ZoneName>" -RRType "<ResourceRecordType>"
Remove-DnsServerResourceRecord -zonename "<ZoneName>" -RRType "<ResourceRecordType>" -Name "<ResourceRecordName>" -RecordData "<DC_FQDN>"
Disruptive step: Remove-DnsServerResourceRecord deletes DNS records. If the domain controller named in -RecordData is still alive, clients and replication lose its records. Save the output of the Get- command first, so the exact records can be re-created by hand. Remove records only for domain controllers that are demoted or gone.
Microsoft's examples target the trustanchors zone for NS records and _msdcs.contoso.com for SRV records belonging to dc2, and include a loop that removes every match. Run the single-record form first.
Confirm the fix
- 4015 stops appearing in the DNS Server log; wait longer than the interval you saw, such as several three-minute cycles for the RODC case.
- For the RODC,
nltestnow lists a writable domain controller with the DNS role. - For ADMIN_LIMIT_EXCEEDED, repeat the
repadmincounts and compare them with the first run; also confirm that a newly promoted domain controller can register its records.
Example (illustrative): rodc01 at a branch office in CONTOSO logs event 4015 with 00002095 every three minutes. That is 20 events an hour and 480 a day (24 × 60 ÷ 3). Running the nltest command from rodc01 returns no domain controller, because the branch subnet is not defined in Active Directory Sites and Services and the nearest site has no writable DNS server. The administrator adds the subnet, runs nltest again to see dc01 listed, confirms dc01 has the DNS role, and watches the DNS log until the 4015s stop.
What to watch afterwards
- Count 4015 events per server per day. A return of the 00002095 pattern after a site change points to topology again.
- After every demotion of a DNS-hosting domain controller, check for leftover records. Microsoft ties the third case to repeated demote and promote cycles.
- Check group membership and zone ownership after anyone changes security on the directory's DNS container.
- Switch Field Engineering logging off when finished.
Read next
Related articles you may want next.
- TroubleshootingDNS event 4013 after a restart: why a domain controller takes 15 minutes or more to startA domain controller sits at Preparing network connections for up to 25 minutes and logs DNS event 4013. Find out why DNS and Active Directory are waiting on each other, prove it, then stagger restarts and set the DNS client order so a working DNS server is always reachable.Read article
- TroubleshootingAD replication error 1722 "The RPC server is unavailable": find the layer that is really failingActive Directory replication fails with 1722 (0x6ba). Prove whether name resolution, a blocked port, signing or the network is at fault, fix that layer and confirm replication has caught up.Read article
- TroubleshootingWindows DNS Server resolves internal names but not the internet: forwarders, root hints and recursionOffice computers find the file server but not public websites, or external lookups time out with SERVFAIL. Work out which path the Windows DNS server takes for an outside name, prove where it stops, and fix forwarders, root hints or recursion.Read article
Risks and limits
These commands have not been run or lab-tested. The Microsoft page covers the three cases above and no others; a 4015 with a different extended error code is outside what it documents. For Microsoft Support, the page describes a trace collection command that starts a trace and stops it after event 4015 is logged. .\TSS.ps1 -Scenario NET_DNSsrv -Mode Verbose -WaitEvent Evt:4015:'DNS Server' comes from the TroubleShootingScript toolset, which you download separately.
Risk: this runs a downloaded script toolset on a domain controller, starts a diagnostic trace and collects diagnostic data. Microsoft's page says the trace stops itself after event 4015 is logged. Read the script before you run it and run it only when Microsoft Support asks for the data. There is no undo for a trace already collected; delete the output folder if it should not be kept.
Sources
- Event ID 4015 - The DNS server encountered a critical error — Microsoft Learn, page dated 2026-02-17, accessed 18 November 2026
- AD and LDS diagnostic event logging — Microsoft Learn, page dated 2026-02-12, accessed 18 November 2026
This article was originally published on .