SQL Server exception occurred: The system cannot find the file specified

Source: Internet
Author: User
Tags server error log

When querying a table in a DB, SQL Server throws an exception:

The operating system returned error 2 (the system cannot find the file specified.) to SQL Server during a read at offset 0x 00000000204000 in file ' \\ServerName\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).

It is confirmed that the. ndf file that is involved in the exception message exists in the specified path, but why does SQL Server throw an exception?

The reason is that the db on the local server, some data files are stored on the remote server, and each time the server restarts, the DB cannot connect to the remote database files due to the order of the server restarts.

At this point, choosing to restart the SQL Server Service resolves the issue. However, restarting the service causes all the DB on the instance to be restarted, too violent, to allow the specified db to be offline, wait a few seconds, and then make it online.

 Use Master Go Alter database database_name  set  offline--  wait for several seconds  Alterdatabase database_name  set online

Reference doc:

DBCC CheckDB the operating system returned error (the device is not ready.)

SQL Server exception occurred: The system cannot find the file specified

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.