Why the server reboots:

The first condition and most common, patching the database and/or the o/s.  The second condition is an application change. The third condition is more of the risk mitigation from power failures, dumps, and other accidents from super users.

Who does the patches on the database and o/s?

Traditionally, this is the database administrator.  However, where I am at, the network guys won’t let go of this task. Kind of more like will not relinquish control to anyone outside of their group. You’re probably asking why do I care who does this?  I like to test the server before releasing it to the wild.

The schedule:

Given I am hardly ever the person rebooting the server, I need to know when it happened, if the server is in an ok state before relaxing, and finally, an idea of what caused it.

The report

It comes in the form of an email. Originally, I wrote this to include a ton of information. Mostly, this was overkill and useless for the task at hand. So after using the system for few months, I re-evaluated the report and wattled it down to just what was needed.  I need three pieces of information; 1. Server name, 2. Are all the databases online, 3. The event log details (cause). Below is a sample of the report, with some details removed to protect the sever.  I got the idea for checking if all databases are online from Brent Ozar on a Saturday morning Vlog.  This code snippet should be credited to him and the crew on the vlog that morning.   The cool thing here is that this simplified the code and cleared up a lot of the noise I did not like about my first revision.

The two red arrows are the events I look for.  This is the cause of it being human, AKA patches, or software updates, or a human accident

Here is the code to make this happen:

Note I use a 5-minute delay to the reboot to allow the services to come online, allowing an email to process as needed.

The stored procedure is also flagged as run at startup with:

*** Important *** You will need to have SMTP setup and working on your server with and profile configured, valid email address, and tested the ability of your database server to send emails to DBAs.

Once the server restarts.

What do I check for: first, is it a cause if it is unplanned?

  • I run a dbcc checkdb making sure the databases in good shape.
  • I look for the application user activity.
  • See what jobs were missed during the outage
  • and validate what changes on the server.

Why are you not checking on your servers to this level? Do you want to check like this? I can help you makes this happen, set it up and show you ways to alert your team of Dba of this activity.

Helping make your databases; fast, reliable, secure, and less downtime. Need help making this happen?

Privacy Preference Center