Tuesday 23 October 2012

The operating system returned error 21



The operating system returned error 21 (failed to retrieve text for this error. Reason: 15105) to SQL Server during a read at offset 0x00000000156000 in file 'D:\Data\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\master.mdf'. Additional messages in the SQL Server error log and system event log may provide more detail. This is a severe system-level 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. (Microsoft SQL Server, Error: 823)

I got this error on the secondary database server which wasn’t in use thankfully. We had an issue with our SAN and as a result, the system database Master got corrupted when SAN came back.

After performing the following steps, my issue was resolved.

·         Start > Control Panel > Program and Features
·         Select SQL Server 2008 R2 (64 bit)
·         Click on Uninstall/Change
·         I selected Repair Option and followed the on-screen instructions.

Thankfully issue was resolved but I would suggest before you run this make sure you have good backups in place.

There is a brilliant article from Microsoft which talks about this at great length but I preferred the above approach as it didn’t have any other databases but if you’ve any other non-system database follow these steps here


No comments:

Post a Comment