Operating system error 2: "2(The system cannot find the file specified.)".

  • All,

    Sql server is running under the same account that I am logged on with.

    The database is stored on a UNC path and I can browse to the files. However SQL server is giving the above error.

    Normally the cause is that the SQL service started before the network and I can solve it by restarting the SQL service but I have tried several restarts of the service and the server but it's not worked. I also tried 'alter database … set online' and restarting the storage.

    I would appreciate any other suggestions that I can try? I wondered about detaching and trying to reattach but I think that can cause more problems than it solves? Windows Event Viewer also doesn't give any more information.

     

  • Sounds like this is an error you get in the error log when starting up SQL Server for one particular database? If that's the case, Is that the only error and information in the log? Did you check the files in sys.master_files?

    Sue

  • Thanks for your help. Sorry, yes, it is one particular database. All of the files listed in sys.masterfiles are reachable.

     

  • In the log folder I found some .trc files. One of the entries is "Audit login failed". The text is:

    "Network error code 0xe8 occurred while establishing a connection; the connection has been closed"

  • Usually there is a bit more with that error message which can help as well as things being logged to the Windows application log. I don't know if the network error happened at the same time when you restart, if that's from the default trace but you could double check the files and make sure the service account has full control. I'd double check and make sure the file path and names are exactly, exactly the same as what's listed in sys.master_files for that database, not just that they are visible. Since the service account is the same as the account you are logging on with, you made sure they were visible to SQL Server with something like xp_cmdshell, not just using File Explorer.

    Sue

  • Thanks for your help.

    Just before your latest posted I tried a further restart of the host and, for some reason, it's working. Sorry I can't provide an explanation as I don't know why it worked this time. If I work it out I'll post in case it helps anyone in the future.

  • If it was the log file and the name was not exactly the same, it may have created a new log file on startup. Check the directory for another file, similar named files, that type of thing. It would be in the error log, file error when starting up, then shortly after an entry for New log file

    Sue

  • This was removed by the editor as SPAM

Viewing 8 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic. Login to reply