Skip to content

Posts from the ‘DBCC’ Category

The operating system returned error 1117

Error: –

When you run database consistency check on database, it will not run successfully and will throw below errors.

DBCC checkdb on msdb database failed with errors:- Msg 1823, Level 16, State 2, Line 1 A database snapshot cannot be created because it failed to start.
Msg 7928, Level 16, State 1, Line 1
The database snapshot for online checks could not be created. Either the reason is given in a previous error or one of the underlying volumes does not support sparse files or alternate streams. Attempting to get exclusive access to run checks offline.
Msg 5030, Level 16, State 12, Line 1
The database could not be exclusively locked to perform the operation.
Msg 7926, Level 16, State 1, Line 1
Check statement aborted. The database could not be checked as a database snapshot could not be created and the database or table could not be locked. See Books Online for details of when this behavior is expected and what workarounds exist. Also see previous errors for more details.
Msg 823, Level 24, State 2, Line 1
The operating system returned error 1117(failed to retrieve text for this error. Reason: 1815) to SQL Server during a read at offset 0000000000000000 in file 'e:\MSSQL10.MSSQLSERVER\MSSQL\DATA\MSDBData.mdf:MSSQL_DBCC7'.
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.

Analysis: –

This error is a little more generic. In most cases this error be caused by a permissions issue on the root of the drive where the database belongs. Try running checkdb for other databases residing at same location. If it ran fine then this will be more of a corruption related issue and not related to permissions.

Resolution: –

If the corruption is so bad we can not even run a dbcc checkdb, then we will need to restore database.

What caused this database corruption?

What caused this database corruption?

Most database corruption (database consistency errors) comes from hardware issues mainly disk issues. The first place to look is, IO subsystem not behaving well. If there are issues then there it could just be a matter of time before other databases on same drive gets corrupted.

Try looking into the system event log. You may find disk related errors which could be the root cause of your corruption.

You may see disk related errors like:

01/12/2010 19:54:36 Cissesrv Error None 24606 N/A TESTSERVER01 "Logical drive 3 configured on array controller P410i [Embedded] returned a fatal error during a read/write request from/to the volume.
Logical block address 257513711, block count 1024 and command 32 were taken from the failed logical I/O request.
Array controller P410i [Embedded] is also reporting that the last physical drive to report a fatal error condition (associated with this logical request), is located on bus 0 and ID 3. "
01/12/2010 19:54:36 Cissesrv Error None 24606 N/A TESTSERVER01 "Logical drive 3 configured on array controller P410i [Embedded] returned a fatal error during a read/write request from/to the volume.
Logical block address 257513711, block count 1024 and command 32 were taken from the failed logical I/O request.
Array controller P410i [Embedded] is also reporting that the last physical drive to report a fatal error condition (associated with this logical request), is located on bus 0 and ID 3. "
01/12/2010 19:54:18 dmio Warning None 35 N/A TESTSERVER01 dmio: Disk Harddisk2 block 257512687 (mountpoint E:): Uncorrectable read error
01/12/2010 19:54:18 dmio Information None 29 N/A TESTSERVER01 dmio: Harddisk2 read error at block 257512687: status 0xc0000185
01/12/2010 19:54:18 Disk Error None 11 N/A TESTSERVER01 The driver detected a controller error on \Device\Harddisk2. 

If you find any disk related issue, you need to engage your platform team to fix the issue or replace the disk as per error messages. Like, the above error messages leads to a disk failure if no action is taken.