Dave Mason wants shutdown procedures like how we can have startup procedures:
If ‘shutdown’ was valid for the @OptionName parameter, I know exactly what I’d do: configure sp_procoption to execute a stored proc that sends an email alert. It would be great to know when a SQL instance goes down, wouldn’t it? Looking at the log file, we can see entries indicating the instance was shut down:
Dave does mention potential failure scenarios, but I agree: it’d be nice to have the ability to run procedures at shutdown to perform certain actions.