Could not open FCB for invalid file in database

Microsoft.SQLServer.2008.Could_not_open_FCB_for_invalid_file_in_database__1_5_Rule (Rule)

Knowledge Base article:

Summary

The locations of all the files in a database are recorded in both the master database and the primary file for the database. You will see the above error if the information stored in the primary file points to a secondary data file or a log file that does not exist or to a secondary file or a log file whose header information does not indicate it is part of the same database as the primary file.

The specified file may be corrupted.

Often this error occurs because one or more log files associated with a database has been deleted in an attempt to shrink the log. Deleting the log file is not a supported method to shrink the log. For more information about the supported way to shrink the transaction log, see Microsoft Knowledge Base article 272318.

Resolutions

Follow these steps:

If you see this error when you try to replace, restore, or attach a database:

If you see this error in the SQL Server error log after your database has been marked suspect:

For additional help to resolve this error, contact Microsoft Product Support Services.

Element properties:

TargetMicrosoft.SQLServer.2008.DBEngine
CategoryEventCollection
EnabledTrue
Event_ID5180
Event Source$Target/Property[Type="SQL!Microsoft.SQLServer.DBEngine"]/ServiceName$
Alert GenerateTrue
Alert SeverityError
Alert PriorityNormal
RemotableTrue
Alert Message
Could not open FCB for invalid file in database
{0}
Event LogApplication
CommentMom2008ID='{108BBCBE-F51B-4CE5-A634-B68D16B2CAB3}';MOM2008GroupID={467ECC75-C5DA-42BD-955C-A73BBB51AF74}

Member Modules:

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

Source Code:

<Rule ID="Microsoft.SQLServer.2008.Could_not_open_FCB_for_invalid_file_in_database__1_5_Rule" Target="SQL2008Core!Microsoft.SQLServer.2008.DBEngine" Enabled="true" ConfirmDelivery="true" Remotable="true" Comment="Mom2008ID='{108BBCBE-F51B-4CE5-A634-B68D16B2CAB3}';MOM2008GroupID={467ECC75-C5DA-42BD-955C-A73BBB51AF74}">
<Category>EventCollection</Category>
<DataSources>
<DataSource ID="_F6DA1507_12AF_11D3_AB21_00A0C98620CE_" Comment="{F6DA1507-12AF-11D3-AB21-00A0C98620CE}" TypeID="Windows!Microsoft.Windows.EventProvider">
<ComputerName>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</ComputerName>
<LogName>Application</LogName>
<Expression>
<And>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery>PublisherName</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value>$Target/Property[Type="SQL!Microsoft.SQLServer.DBEngine"]/ServiceName$</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery>EventDisplayNumber</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value>5180</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</And>
</Expression>
</DataSource>
</DataSources>
<WriteActions>
<WriteAction ID="GenerateAlert" TypeID="SystemHealth!System.Health.GenerateAlert">
<Priority>1</Priority>
<Severity>2</Severity>
<AlertMessageId>$MPElement[Name="Microsoft.SQLServer.2008.Could_not_open_FCB_for_invalid_file_in_database__1_5_Rule.AlertMessage"]$</AlertMessageId>
<AlertParameters>
<AlertParameter1>$Data/EventDescription$</AlertParameter1>
</AlertParameters>
<Suppression>
<SuppressionValue/>
</Suppression>
</WriteAction>
</WriteActions>
</Rule>