Press "Enter" to skip to content

When Did That SQL Server Start?

Chad Callihan breaks out the stopwatch:

When you are troubleshooting query performance, it’s important to consider when SQL Server last restarted. Each time SQL Server restarts, buffer pool and plan cache get wiped out. This can play a big part in how you approach an issue.

You want to know how much history you have to work with. Not seeing much data in plan cache? Maybe SQL Server restarted recently. Parameter sniffing issues that you were seeing earlier today are now suddenly “fixed?” SQL Server could have restarted between then and now. Let’s take a quick look a few ways to review how long SQL Server has been up and running.

Click through for several techniques. I’ve always checked the tempdb startup time in sys.databases, myself, but that’s not the only way.