Monitor for TFS Event 4231 - Database Schema Exception

TeamFoundationServer2013.MonitorTFSEvent4231 (UnitMonitor)

Monitor to detect event 4231 - Database Schema Exception

Knowledge Base article:

Summary

TFS Event 4231 occurred. This event is raised to indicate an error with the database schema: an upgrade is in progress, the schema is empty, or the schema versions have a mismatch.

Resolutions

Check is any pending upgrades are in process or if any manual changes have been made to the database. If changes were made restore the database to before the changes were made.

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 4231 - Database Schema Exception
This event is raised to indicate an error with the database schema: an upgrade is in progress, the schema is empty, or the schema versions have a mismatch. Check is any pending upgrades are in process or if any manual changes have been made to the database. If changes were made restore the database to before the changes were made.
RunAsDefault

Source Code:

<UnitMonitor ID="TeamFoundationServer2013.MonitorTFSEvent4231" 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.MonitorTFSEvent4231_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">4231</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>