2

EDIT: Restored to a restore point from three days ago, prior to a "Critical Update", and the databases are back.

This is, I believe, the culprit update: September 10, 2019-KB4514601 Cumulative Update for .NET Framework 3.5, 4.7.2 and 4.8 for Windows 10 Version 1809 and Windows Server 2019

Last night at 10:01 PM, per the System Log, the SQL Server 2017 service on my development PC terminated:

The MSSQL$SQL2017 service terminated with the following service-specific error: Only one usage of each socket address (protocol/network address/port) is normally permitted.

and this other error was also there 15 seconds later:

Installation Failure: Windows failed to install the following update with error 0x80070643: Feature update to Windows 10, version 1903.

So it appears to have had something to do with the #(@*@$#&U Windows nightly update mechanism. There is only one of my databases remaining (in addition to the system databases). How do I get them back??

EDIT: When I attempt to reattach the files I am getting an error:

Unable to open the physical file [H:\foo\my.mdf] Operating system error 5: (Access is Denied.). Microsoft SQL Server, Error: 5120

And when I go to the folder in question where the MDF and LDF files are stored, and attempt to give NT Service\MSSQL$SQL2017 read/write access to the folder, I get this error:

An error occurred while applying security information to: [path to the LDF file of a database that accesses the CLR] Failed to enumerate objects in the container. Access is denied.

and then it goes on to give the same error for the other LDF files in the folder as well as certain MDFs, not all of them.

Upon rebooting, I get this error again:

The SQL Server (SQL2017) service terminated with the following service-specific error: Only one usage of each socket address (protocol/network address/port) is > normally permitted.

16
  • 3
    Check there folder where your mdf files are, are the mdf files still there? Commented Sep 13, 2019 at 12:07
  • Yes, the MDF files are there.
    – Tim
    Commented Sep 13, 2019 at 12:10
  • Log files as well? If so, you can just attach them again Commented Sep 13, 2019 at 12:11
  • I was concerned that something had been royally screwed up, so that reattaching might corrupt them. I will makes copies of the files first. Do you know what caused them to disappear?
    – Tim
    Commented Sep 13, 2019 at 12:14
  • 2
    You could check what processes have open file handles on the database files with process explorer. Here is an example of using it. Are you sure that you are logged in with a user that has enough permissions and that there are no other instances running on the machine? Commented Sep 13, 2019 at 12:22

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.