TFS Event 4231 Monitor

TeamFoundationServer2017.TfsEvent4231Monitor (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 if 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:

TargetTeamFoundationServer2017.TfsAppComponentBase
Parent MonitorSystem.Health.AvailabilityState
CategorySecurityHealth
EnabledTrue
Alert GenerateTrue
Alert SeverityError
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeTeamFoundationServer2017.TfsSingleEventLogUnitMonitor
RemotableTrue
AccessibilityPublic
Alert Message
TFS Event 4231 Monitor Alert Message Resource ID
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 if 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="TeamFoundationServer2017.TfsEvent4231Monitor" Accessibility="Public" Enabled="true" Target="TeamFoundationServer2017.TfsAppComponentBase" ParentMonitorID="Health!System.Health.AvailabilityState" Remotable="true" Priority="Normal" TypeID="TeamFoundationServer2017.TfsSingleEventLogUnitMonitor" ConfirmDelivery="true">
<Category>SecurityHealth</Category>
<AlertSettings AlertMessage="TeamFoundationServer2017.TfsEvent4231MonitorAlertMessageResourceID">
<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"]/PrincipalName$</ComputerName>
<EventDisplayNumber>4231</EventDisplayNumber>
<TimerWaitInSeconds>86400</TimerWaitInSeconds>
</Configuration>
</UnitMonitor>