Monitor for TFS Event 4230 - Database Instance Exception

TeamFoundationServer2013.MonitorTFSEvent4230 (UnitMonitor)

Monitor to detect event 4230 - Database Instance Exception

Knowledge Base article:

Summary

TFS Event 4230 occurred. Raised to indicate the instance id of the database did not match that of the server object model's ServiceHost instance.

Resolutions

The most likely cause of this error is manual changes to the database. Restore the database to a state before these changes were made, or contact the person responsible for the database changes for support.

Element properties:

TargetTeamFoundationServer2013.TFS2013AppComponentBase
Parent MonitorSystem.Health.AvailabilityState
CategorySecurityHealth
EnabledTrue
Alert GenerateTrue
Alert SeverityError
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeMicrosoft.Windows.SingleEventLogTimer2StateMonitorType
RemotableTrue
AccessibilityPublic
Alert Message
Monitor for TFS Event 4230 - Database Instance Exception
The instance ID of the database does not match the server object model's ServiceHost instance. The most likely cause of this error is manual changes to the database. Restore the database to a state before these changes were made, or contact the person responsible for the database changes for support.
RunAsDefault

Source Code:

<UnitMonitor ID="TeamFoundationServer2013.MonitorTFSEvent4230" Accessibility="Public" Enabled="true" Target="TeamFoundationServer2013.TFS2013AppComponentBase" ParentMonitorID="Health!System.Health.AvailabilityState" Remotable="true" Priority="Normal" TypeID="Windows!Microsoft.Windows.SingleEventLogTimer2StateMonitorType" ConfirmDelivery="true">
<Category>SecurityHealth</Category>
<AlertSettings AlertMessage="TeamFoundationServer2013.MonitorTFSEvent4230_AlertMessageResourceID">
<AlertOnState>Error</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>Error</AlertSeverity>
</AlertSettings>
<OperationalStates>
<OperationalState ID="EventRaised" MonitorTypeStateID="EventRaised" HealthState="Error"/>
<OperationalState ID="TimerEventRaised" MonitorTypeStateID="TimerEventRaised" HealthState="Success"/>
</OperationalStates>
<Configuration>
<ComputerName>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</ComputerName>
<LogName>Application</LogName>
<Expression>
<And>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="UnsignedInteger">EventDisplayNumber</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="UnsignedInteger">4230</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">PublisherName</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">TFS Services</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</And>
</Expression>
<TimerWaitInSeconds>86400</TimerWaitInSeconds>
</Configuration>
</UnitMonitor>