If your application makes frequent use of #temp tables in stored procedures, you may see error 605 and 824 in your Event Viewer with the following:
Msg 605, Level 21, State 3, Line 1 Attempt to fetch logical page (1:225) in database 2 failed. It belongs to allocation unit 281474980315136 not to 504403158513025024.
My immediate suspicion was database corruption, however all DBCC scans came back clean. Looking at the database ID specified in the error message (2) we know it’s tempDB, and not our actual production database.
Turns out, in SQL Server 2008, we can enable a trace flag to get around this issue: T4135
Set it, restart the SQL Server service, and your problems (at least those relevant to errors 608 and 804) should be solved. I am running the latest build of R2, so no additional updates were necessary.
