Last weekend, I had another issue reported by the client which was a really quick solution however it needed a service restart, couple of time. The issue that reported was, operating system error 19 and in this very post, I will tell you how we fix it.
The client has an issue at their data center, it was the power outage. All the servers were down for about 30~40 minutes, by the way, these are DR servers. Once the power is restored and servers come back up, a couple of servers reported an issue where databases are shown in suspect mode. While I check the SQL Server logs I found entries like below.
Date 8/12/2017 8:44:12 PM Log SQL Server (Current - 8/12/2017 8:44:00 PM) Source spid39s Message The operating system returned error 19(The media is write protected.) to SQL Server during a read at offset 0000000000000000 in file 'F:\TLOG\SomeDB_1.LDF'. Additional messages in the SQL Server error log and system event log may provide more detail. This is a severe system-level error condition that threatens database integrity and must be corrected immediately. Complete a full database consistency check (DBCC CHECKDB). This error can be caused by many factors; for more information, see SQL Server Books Online.
Fixing operating system error 19 in SQL Server
The system administrator has initiated the disk and made it write enable followed by the SQL Server service restart and voila!! All the databases are back online and accessible.
There are good chances that there will be some informative details available in Windows logs as well, and it may be there as information messages as I have mentioned in my posts here and here.
In case you found this post interesting enough, here are some more troubleshooting tips.