SQL won’t start because the Media is Write Protected…
I came across this one the other day. After applying Windows OS patches and rebooting the server, SQL wouldn’t start. Given that the server I was working on was a VM with SAN storage, I have seen some of the disks go missing and just needs to be reattached. So, I started there. Unfortunately this wasn’t one of those times.
Checking the Windows event logs, I came across this error.
The disks were all present, but after some digging we noticed we couldn’t write to certain disks. It turns out when the disks attached to the VM, some of them came up in read only mode. How did we figure that out? Well one of the Sys Admins took a moment to check the properties of each disk in Disk Management and noticed the status of a few were set to Read Only instead of Online as pictured.
So how do you fix it?
The fix was easy, he just took the disk offline and brought back to online. It was an easy fix, but took a group of us 10 mins to figure out. While the system wasn’t in use, it was still a pain to deal with. And had this happened in the middle of the night, how long would it have taken us to check this?
The prevailing theory why this happened in the first place? It has been observed that when there are a large number of drives attached to a single server, that during OS boot the drives are discovered as new devices. In this case, Windows may have tried to protect the data on the drive and brought these drives online in read only mode. Needless to say, it is something that needs further testing.
Anyway, here’s a #SQLTip for you…One way or another, SQL tells you why it isn’t happy….you just have to listen.