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.