Microsoft SQL Server, error:823 a real experience

Source: Internet
Author: User
Tags sql server books server error log

1,case Description

There's dev Skype I said when using SSMs to open the DB, error

"The operating system returned error (an unexpected network error occurred.) To SQL Server during a read at offset 0x00000000474000 in file ' \\Serveryyy\\xxxx.ndf '. Additional messages in the SQL Server error log and system event log could provide more detail. This is a severe system-level error condition the threatens database integrity and must be corrected immediately. Complete a full database consistency check (DBCC CHECKDB). This error can is caused by many factors; For more information, see SQL Server Books Online. (Microsoft SQL Server, error:823) "

Error number:823, 823 errors indicate that SQL Server encountered a Windows read or write request failure while requesting a page from the OS. The 823 error occurs when a page read/write request is issued, regardless of SQL Server itself, which is usually caused by physical file corruption, which can be difficult to fix if it is a physical file corruption.

This case was caused by "An unexpected network error occurred" and I was able to open a folder on a remote serveryyy using Windows Foler Manger. This indicates that it is not the network problem. In the error message, you are prompted to use DBCC CHECKDB to make a database consistency check, and when I do dbcc CHECKDB, I cannot set the DB single user access mode with the same error message as above. It's a tricky, flawless ing.

2. To view Windows log, in the Event Viewer, you see that the following types of errors are also logged in Windows log before the above error occurs

"The operating system returned error 2 (the system cannot find the file specified.) To SQL Server during a read at offset 0x00000795e94000 in file ' \\Serveryyy\\xxxx.ndf '. Additional messages in the SQL Server error log and system event log could provide more detail. This is a severe system-level error condition the threatens database integrity and must be corrected immediately. Complete a full database consistency check (DBCC CHECKDB). This error can is caused by many factors; For more information, see SQL Server Books Online.

The only difference is the error number and the description of the error, as described in Microsoft support

SQL Server I/O and Windows API

SQL Server uses standard Windows API calls, such as ReadFile, ReadFileScatter, WriteFile, and WriteFileGather, To perform I/O with its database files. When SQL Server is uses the Windows API calls, the file has already been opened successfully, or SQL Server would Not try-to-read from the IT or write to it. Therefore, if a Windows API call isn't successful and if the error is anything other than the operating system error 6 ("Invalid Handle"), the error is likely being raised in Windows or by a lower-level software component, such as a Devi CE driver. Because the operating system error 6 is a invalid handle, the problem may occur if SQL Server are using an invalid Han Dle to make a Windows API call.    However, this may still is a system problem.
For example, if encounter the following error message in the SQL Server errorlog file, SQL Server encountered ope Rating system error 2 when it uses a Windows API call to write to the tempdb primary database file:

error:823, severity:24, state:4 I/O Error 2 (the system cannot find the file specified.) detected during write at offset 0x00000000284000 in file ' D:\Program Files\Microsoft SQL Server\mssql\data\tempdb.mdf '

Because SQL Server has already successfully opened the file and does not receive a "Invalid Handle" error, the error is Likely being raised in a Lower-level kernel software component, such as the file system or a device driver. This problem does is indicate a problem in SQL Server, and it must is investigated as an issue with the file system Or a device driver is associated with the file.

The description of solution is ambiguous, "thisproblem does not indicate a problem in SQL Server", view msdb.dbo.suspect_pages, no data rows returned, may not be a problem, slightly gratified.

* FROMmsdb.dbo.suspect_pages

The suspect_pages table is used for maintaining information on suspect pages, and is relevant in helping to de Cide whether a restore is necessary. The suspect_pages table resides in the msdb database and is introduced in SQL Server 2005.

A page is considered "suspect" when the SQL Server Database Engine encounters one of the following errors when it tries to Read a data page:

    • An 823 error is caused by a cyclic redundancy check (CRC) issued by the operating system, such as a disk ER ROR (Certain hardware errors)

    • An 824 error, such as a torn page (any logical error)

I see in Windows Log that the server has some updates and installed some update packages, such as

So, I guess the server may need restart, restart after the problem is resolved.

Reference Documentation:

https://support.microsoft.com/en-us/kb/828339

https://support.microsoft.com/en-us/kb/2015755

https://msdn.microsoft.com/en-us/library/ms191301 (v=sql.110). aspx

Microsoft SQL Server, error:823 a real experience

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.