I was running a DBCC CHECKDB on a database when I got an error that says:
Msg 0, Level 11, State 0, Line 0
A severe error occurred on the current command. The results, if any, should be discarded.
I was like “Oh crap!” So I went to the SQL Logs and saw a bunch of:
SQL Server detected a logical consistency-based I/O error: incorrect pageid (expected 3:511233; actual 0.0). It occurred during a read of page (3:511233) in database ID 2 at offet 0x000000f9a02000 in file 'E:\TempDB Directory\TempDB1.NDF’. Additional messages in the SQL Server error log or system event log may provide more detail. This is a severe error condition that threatens database integrity and must be corrected immediately. Complete a full database consistency check (DBCC CHECKDB). This error can be caused by many factors; for more information, see SQL Server Books Online.
That’s an interesting error message… So I went Googling and found some posts where people’s MSDB had I/O errors. I thought “Ok, that’s not it…” and moved on.
Then I remembered that TempDB gets recreated when the SQL Service is restarted so that’s what I did. Luckily all of this is on a backup server and not the production server.
I think I know what caused all of this…
Earlier, I tried shrinking a SAN volume that consists of database files such as TempDB and for some reason, some of the files were corrupted. (Also happened on my backup SQL files’ volume.) Why did all of this corruption begin? I have no idea as I followed each and every step that was given to me from Dell.
Moral to this story is this: If I’m going to shrink a volume, just create a new volume and move the data over to it. Then I can delete the old volume without causing any I/O errors. Also, test out vendor’s procedures before doing anything on the production servers.