Today we got this error message in one of our server
Error: 5180, Severity: 22, State: 1
Could not open FCB for invalid file ID 20224 in database 'ABC_DEF'.
There are two situations where you will get this error.
1. When you trying to rebuild log file
2. Your query has small values
If Situation1:
You need to run DBCC REBUILDLOG. Further information available at http://www.sqlskills.com/BLOGS/PAUL/post/Corruption-Last-resorts-that-people-try-first.aspx
If Situation 2:
As Per Microsoft KB 815183 below are some possiblities
1) You use a larger number of small values. For example, you may use hundreds of values in a large IN list or many OR predicates.
Explanation:
A Sample Query like SELECT * FROM CITY WHERE NAME IN ('Chennai','Bangalore','Mumbai'................more than 1000 cities..'Delhi')
2) You use a small number of predicates. For example, you may use two varchar(5000) columns.
Explanation:
Predicates follow the where clause. Predicates allow the searching through database records to recover specific strings and ranges or characters. Rows will be returned if they match the predicate condition.
Example for Predicates:
SELECT * FROM employees LIMIT 2;
SELECT * FROM employees WHERE id BETWEEN 1 AND 4;
Example for small number of predicates:
SELECT * FROM employees WHERE Lastname LIKE '%S%';
Workaround:
1. Since this error happens due to parallelism begin enabled which writes beyind buffer, try disabling MAXDOP in DML like specify an OPTION (MAXDOP 1) statement level hint for the DML statement where the problem occurs.
Also please note that this can also occur when master database is corrupted because of disk corruption but in that case you will receive below error messages
2005-12-28 10:44:26.17 spid3 Starting up database 'master'.
2005-12-28 10:44:26.18 spid3 Error: 823, Severity: 24, State: 6.
2005-12-28 10:44:26.18 spid3 Error: 5173, Severity: 16, State: 1.
2005-12-28 10:44:26.18 spid3 Error: 5180, Severity: 22, State: 1.
So for this you need to rebuild the master database, and then restore the orginal master from a recent backup before the disk corruption occured.
No comments:
Post a Comment
Please do not spam!