I am having some issues with my SQL Server database. When I run this:
select * from dbo.Entity
where Oid='191FAF30-4729-4145-8106-60E34A8E164C'
...it spits out the following error.
Msg 823, Level 24, State 2, Line 2 The operating system returned error 1(Incorrect function.) to SQL Server during a read at offset 0x00000021442000 in file 'D:\Database\db.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.
The event log error is same as above.
So I ran a DBCC CHECKDB
and it spit out the following errors:
CHECKDB found 0 allocation errors and 0 consistency errors in database
A severe error occurred on the current command. The results, if any, should be discarded.
I tried
dbcc checktable ('Entity')
but message was:
Msg 0, Level 11, State 0, Line 0
A severe error occurred on the current command.
The results, if any, should be discarded.
Version information:
Microsoft SQL Server 2012 - 11.0.2100.60 (X64)
Feb 10 2012 19:39:15
Copyright (c) Microsoft Corporation
Enterprise Edition: Core-based Licensing (64-bit) on Windows NT 6.2 <X64> (Build 9200: )
Any suggestions on how to repair the corrupt table would be greatly appreciated!