The log files are not in a valid sequence.

The_log_files_are_not_in_a_valid_sequence (Rule)

Knowledge Base article:

Summary

A gap in the log file sequence was detected. Log file replay cannot succeed if there are gaps in the sequence of available log files.

You will see the following phrase in the event description: Information Store number Restorenumber: The log files, Exxxxxxx.log and E0n.log, are not in a valid sequence. Log file replay cannot succeed if there are gaps in the sequence of available log files.

Causes

If all log files mentioned in the Restore.env file in the temp folder for the log files and check file, and the log files subsequent to that in the production folder are not in contiguous sequence, then ESE event 458 is logged.

Some of the causes are as follows:

This can occur if a full backup of the entire storage group is done and the log files are purged and then a previous backup of the storage group (before the last full backup is restored) is performed. This produces a gap of the log files that were purged.

It can also happen if there is more than one database in a storage group, and only one of the databases is restored to the storage group.

Resolutions

Run eseutil /cm to view the content of the Restore.env file. Record the range of the log files. Remove all log files that are out of sequence with the log file range from Restore.env. Mount the database.

Restore a single database and do not replay log files that were created since the backup and that do not affect other databases in the storage group by performing the following steps.

Restore the database, ensuring you click to clear the Last Backup Set check box.

Perform a manual hard recovery with the /cc and /t switches of the eseutil command. For example: eseutil /cc temporary_folder /t (where temporary_folder is the folder that is specified in the Microsoft Windows NT Backup restoration temporary location for log and patch files dialog box, such as C:\Temp\My Backup). Mount the database.

External

For more information about ESE event 458, see:

Element properties:

TargetMicrosoft.Exchange.Databases
CategoryEventCollection
EnabledTrue
Event_ID458
Event SourceESE
Alert GenerateTrue
Alert SeverityWarning
Alert PriorityNormal
RemotableTrue
Alert Message
The log files are not in a valid sequence.
{0}
Event LogApplication

Member Modules:

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

Source Code:

<Rule ID="The_log_files_are_not_in_a_valid_sequence" Enabled="onEssentialMonitoring" Target="Exch2003Core!Microsoft.Exchange.Databases" ConfirmDelivery="false" Remotable="true" Priority="Normal" DiscardLevel="100">
<Category>EventCollection</Category>
<DataSources>
<DataSource ID="EventDS" TypeID="Windows!Microsoft.Windows.EventProvider">
<ComputerName>.</ComputerName>
<LogName>Application</LogName>
<Expression>
<And>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery>Channel</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value>Application</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery>EventDisplayNumber</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value>458</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery>PublisherName</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value>ESE</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</And>
</Expression>
</DataSource>
</DataSources>
<WriteActions>
<WriteAction ID="GenerateAlert" TypeID="SystemHealth!System.Health.GenerateAlert">
<Priority>1</Priority>
<Severity>1</Severity>
<AlertOwner>$Data/PublisherName$</AlertOwner>
<AlertMessageId>$MPElement[Name="The_log_files_are_not_in_a_valid_sequence.AlertMessage"]$</AlertMessageId>
<AlertParameters>
<AlertParameter1>$Data/EventDescription$</AlertParameter1>
</AlertParameters>
<Suppression>
<SuppressionValue/>
</Suppression>
</WriteAction>
</WriteActions>
</Rule>