Mystery of the SQL Server 3am shutdown
|
A number of weeks ago, I started finding that every time I wanted to use my local SQL Server database for the first time in the day, the service and agent were both stopped and I had to restart them manually. It took me a few days to notice that this was a recurring pattern, not just an individual occurence. I double checked that the services were set to start automatically, but as I hadn't shut down the computer, this shouldn't have been an issue. Digging through the event log, I discovered that there was a series of events that began at 3:00:02 am every single night that included the SQL Server Service and Agent being shut down. Closer inspection revealed that there was a System Restore happening, which is why SQL Server and other services were being stopped. The System Restore, I saw in the Task Scheduler, was scheduled for 12am, the same time as my SQL Server backups. Could this be the conflict? Was the restore just saying "okay I'll wait 3 hours" and try again. (Doesn't seem likely, but hey, I'm not a sysadmin...) I continued persusing the logs and noticed that while most of the entries during this time period (3:00:02am to about 3:05am) were information events, but there were a few errors. The errors, it turned out were for an attempted Windows Update installation of a SQL Server 2005 service pack patch. Opening up Windows Update, I could see that indeed, a Critical Update for SQL Server 2005 Service Pack 2 (KB 934458) was listed as updates to be installed. The update history showed that this update had been attempted and failed daily beginning on Sept 17. I found a Technet forum thread indicating that others were having troubles with this update, one person in particular had troubles that I did not want to introduce into my life. Some had recommended hiding the update from Windows Updates if the problem that it was fixing was not a problem for you anyway. I took my chances and let Windows Update do the install while I monitored it and thankfully, it installed successfully. I had to wait until the next morning to see if this did the trick and indeed, it worked! |

