Microsoft Windows Server DNS Configuration Could Not Open Database

Microsoft.Windows.Server.DNS.Configuration.CouldNotOpenDatabase (Rule)

Alert generating rule for Configuration.

Knowledge Base article:

Summary

The DNS server configuration consists of the settings that determine how the DNS server will function on a network and how those settings are stored and retrieved when they are needed.

Causes

The DNS server could not find or open a zone file in the %SystemRoot%\System32\Dns directory.

Resolutions

Check the zone file

Standard and primary zones, that is, zones that are not integrated with Active Directory Domain Services (AD DS), store zone information in a file. If this file is missing or corrupted, the DNS server cannot load the zone.

Check that a zone file for the zone exists in the %SystemRoot%\System32\Dns directory. If the file does not exist, delete the zone and recreate it by using Server Manager.

Use Registry Editor to determine if an entry exists for the zone file in the following registry key:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DNS Server\Zones\zone\DatabaseFile

If there is no registry entry for the zone file, either update the zone file name in the registry or delete the zone in the registry and then recreate it by using Server Manager.

Update the zone file name in the registry

To modify or remove the zone file name in the registry:

Caution: Incorrectly editing the registry might severely damage your system. Before making changes to the registry, you should back up any valued data.

1.On the DNS server, start Registry Editor. To start Registry editor, click Start, click Run, type regedit, and then click OK.

2.In the console tree, navigate to the following key:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DNS Server\Zones\zone\DatabaseFile

3.Right-click List Addresses, and then click Delete.

4.In Server Manager, right-click the DNS server, click All Tasks, and then click Restart.

If the file exists and is correctly identified in the registry, DNS server could not parse the zone file. Check that it contains valid data. You can use Notepad or another text editor to examine and correct the contents of the zone file.

Check the event logs for the exact name of the zone file and line numbers before either correcting or deleting entries in the zone file.

Delete the zone and recreate it by using Server Manager

To delete a zone in the registry:

Caution: Incorrectly editing the registry might severely damage your system. Before making changes to the registry, you should back up any valued data.

1.On the DNS server, start Registry Editor. To start Registry editor, click Start, click Run, type regedit, and then click OK.

2.In the console tree, navigate to the following key:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DNS Server\Zones\

3.Right-click the registry key of the zone, and then click Delete.

To use Server Manager to recreate a zone:

1.On the DNS server, start Server Manager. To start Server Manager, click Start, click Administrative Tools, and then click Server Manager.

2.In the console tree, expand Roles, expand DNS Server, and then expand DNS.

3.Expand the DNS server, and then expand the folder that contains the zone.

4.Right-click the zone, and then click Delete.

Note: If you cannot delete the zone using this method, you must use Registry Editor to delete the registry key for the zone.

5.Right-click the folder, and then click New Zone.

6.Follow the instructions in the wizard to recreate the zone.

External

http://technet.microsoft.com/en-us/library/dd349597(v=ws.10).aspx

Element properties:

TargetMicrosoft.Windows.Server.DNS.Server
CategoryAlert
EnabledTrue
Alert GenerateTrue
Alert SeverityError
Alert PriorityNormal
RemotableTrue
Alert Message
Windows DNS - Configuration - Could Not Open Database

Event ID: {0}
Event Source: {1}
Event Log: {2}

Event Description: {3}
Event LogDNS Server

Member Modules:

ID Module Type TypeId RunAs 
DS DataSource Microsoft.Windows.EventProvider Default
Alert WriteAction System.Health.GenerateAlert Default

Source Code:

<Rule ID="Microsoft.Windows.Server.DNS.Configuration.CouldNotOpenDatabase" Enabled="true" Target="Microsoft.Windows.Server.DNS.Server" ConfirmDelivery="true" Remotable="true" Priority="Normal" DiscardLevel="100">
<Category>Alert</Category>
<DataSources>
<DataSource ID="DS" TypeID="Windows!Microsoft.Windows.EventProvider">
<ComputerName>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</ComputerName>
<LogName>DNS Server</LogName>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="UnsignedInteger">EventDisplayNumber</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="UnsignedInteger">1004</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</DataSource>
</DataSources>
<WriteActions>
<WriteAction ID="Alert" TypeID="Health!System.Health.GenerateAlert">
<Priority>1</Priority>
<Severity>2</Severity>
<AlertName/>
<AlertDescription/>
<AlertOwner/>
<AlertMessageId>$MPElement[Name="Microsoft.Windows.Server.DNS.Configuration.CouldNotOpenDatabase.AlertMessage"]$</AlertMessageId>
<AlertParameters>
<AlertParameter1>$Data/EventDisplayNumber$</AlertParameter1>
<AlertParameter2>$Data/EventSourceName$</AlertParameter2>
<AlertParameter3>$Data/Channel$</AlertParameter3>
<AlertParameter4>$Data/EventDescription$</AlertParameter4>
</AlertParameters>
<Suppression>
<SuppressionValue>$Data/LoggingComputer$</SuppressionValue>
</Suppression>
<Custom1/>
<Custom2/>
<Custom3/>
<Custom4/>
<Custom5/>
<Custom6/>
<Custom7/>
<Custom8/>
<Custom9/>
<Custom10/>
</WriteAction>
</WriteActions>
</Rule>