Question: I have one master and one detail table as following

```
Master:-
   BatchID
   BatchStatus
Detail
   DetailID
   BatchID
   DetailRecordStatus (Possible values 1,2,3)

```

I am trying to write a single a query that can update the Batch Status in Master based on `detailRecordStatus` values equal to 2 or 3

Answer: 
I think I've found the cause. 

Most likely the problem is due to ["Fast startup" power options](https://msdn.microsoft.com/en-us/library/windows/hardware/ff547781(v=vs.85).aspx).

[![Fast Startup](https://i.stack.imgur.com/MuuPS.png)](https://i.stack.imgur.com/MuuPS.png)

It'a a Windows technique to reduce the boot time; Fast Startup combines elements of a [cold shutdown and the hibernate feature](https://msdn.microsoft.com/en-us/library/windows/hardware/jj835779(v=vs.85).aspx).

Here you can find another [article](https://www.howtogeek.com/243901/the-pros-and-cons-of-windows-10s-fast-startup-mode/) about pros and cons

I have disabled it and the problem seems to be resolved.
The full error I got when connecting to my local default MS SQL instance (2017) via MSSMS is:

> 
> The operating system returned error 21(The device is not ready.) to
>  SQL Server during a read at offset 0x000000000ae000 in file
>  'D:\MSSQL\DATA\tempdev.mdf'. Additional messages in the SQL Server
>  error log and operating system error 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. (Microsoft
>  SQL Server, Error: 823) For help, click:
>  <http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&EvtSrc=MSSQLServer&EvtID=823&LinkId=20476>
> 
> 
> 

I started getting this once I moved my tempdb to my new D drive. Doing a start/stop of the SQL service removes the error. Never got this error when everything was on C. Both my drives are SSD and encrypted with Bitlocker, not sure if that could be the issue, maybe the C drive is unlocked very early because the operating system needs it, and D drive gets unlocked later.

1. As per Max's answer (<https://dba.stackexchange.com/a/175115>), disabling "Fast Startup" fixed my problem. As per the article Max links to (<https://www.howtogeek.com/243901/the-pros-and-cons-of-windows-10s-fast-startup-mode/>) it's quite obscure to find, in the "Choose what the power buttons do" and then "Change settings that are currently unavailable".
2. Unlike Venvig's answer (<https://dba.stackexchange.com/a/226115>), setting the "SQL Server" service to Startup Type = "Automatic (Delayed Start)" did also fix my problem (with Windows'Fast Startup re-enabled).