Skip to content

Database Health Monitor Q&A Stedman SQL Server Podcast Sn 3 Ep 19

Database Health Monitor Q&A Stedman SQL Server Podcast Sn 3 Ep 19

In Season 3, Episode 19 of the Stedman SQL Podcast, Database Health Monitor Q&A, Steve Stedman is joined by developers Mitchell Glasscock and George Stedman to answer some of the most frequently asked questions about Database Health Monitor. The team discusses monitoring SQL Server when SQL Server Agent is unavailable, automatic service restarts, external SMTP email notifications, monitoring overhead, and what sets Database Health Monitor apart from other SQL Server monitoring tools. They also explore proactive performance management, customizable alerts, and powerful tools that help DBAs and developers identify and resolve performance issues before they impact users.

Podcast Transcript

Steve (00:18)
Hey everyone and welcome to the Stedman SQL Server Podcast, where each week we talk about different topics relating to Microsoft SQL Server, whether it’s performance tuning, database health monitor, or other fun stuff that we’re doing. this is season three, episode 19. today’s topic is on database health monitor QA, where we’ll be discussing some of the common questions that we get on database health monitor frequently.

So, I’m your host, Steve Stedman, and today I’m joined by Mitchell Glasscock and George Steadman, two of the developers on the Database Health Monitor project. Hey guys, welcome.

Mitch (00:51)
Steve.

Steve (00:53)
So we get a lot of questions on database health monitor, on what it can do. And we just want to share some of those common questions. I know you’ve you’ve heard this, Mitch, with different people that we’ve talked to and George as well. we’ve come across a lot of questions about why this or how’s that work or what’s what happens with this.

So this first question came in from one of our database health monitor customers just last week. And it goes like this. all the theory works nice and fine until the SQL agent stops working and then no alerts go out anymore. I just had a case yesterday and this morning where the SQL agent and or SQL Server did not start after a reboot because some dedicated account was invalid or locked out.

In another case, it was the SQL agent that was preventing the or prevented to run or start because of malware protection software on the server that kept it from starting.

Anyway, with that, in a perfect world, systems should be as autonomous as possible, but the reality is that developers didn’t think about every possible outcome. This is true for SQL Server 2. the services simply don’t start, then another monitor should notice and send out alert. Then he says, I love the database health monitor for all it can do, but it relies on the SQL agent and SQL mail to send out alerts. Or am I missing an option that would allow

To configure an external SMTP provider? Well, that’s a great question. And what I really liked about this question was that just about two months ago, we added a way to deal with this. A year ago, I would have completely agreed that yes, this is a this is a problem area, but we’ve got it covered. So about two months ago, we added the database health monitor service and a database health monitor tray icon.

And these work best when they’re installed directly on the SQL Server rather than on someone’s desktop. And they can actually start the SQL Server or SQL agent if they’re not running and do all kinds of alerting and notification if things aren’t set up correctly. So the database health monitor service runs in the background, and the Trey program is just used to do the configuring.

So yeah, so to try it out, be sure that you have the latest update of database health monitor. And then Mitchell, you’ve got your desktop shared. So let’s start by running the database health monitor tray icon from the start menu. And that’s kind of boring. You run it and nothing really happens other than it starts the tray icon.

Yeah, you started it twice and I told you that. So once that’s running, you’ll click in the system tray and you can right-click down there and do things like starting the service and stopping the service, or you can go in to manage the service. And this is where if you go ahead and add one of your local SQL servers that’s on the current computer, the reason that this needs to run on the same computer as the SQL server is that things like starting and stopping the services is a little bit easier when you’re on the same computer.

Okay, great. So now that you’re connected.

You’ll notice that your server name shows up there on the monitored instances. And then down at the bottom, you’ve got some features that appeared that were grayed out before that was set up. And if you click those checkboxes, it’ll do things like automatically restarting the SQL Server if the server is stopped, or restarting the SQL Server agent service if it’s stopped. Both of those might have helped with the question that we just had that we were asked about. But also the other half of it, you can put in email addresses on the right side over there.

will notify when the server is unreachable. So using your steadman solutions email, you’ll get noticeed there. Then the next thing we want to do is go into the settings tab. And probably nothing we need to change here. It’s all set up just with the defaults to go and do the monitoring and things. And then this will also fill in for some of the monitoring jobs if the SQL agent has stopped.

next, we’d want to go to the email tab. On the email tab, this is where it will do two things. one, you can tell, for instance, if you’re running on SQL Express where you don’t actually have the ability to send email to SQL Server, you can set this up to be able to send email, very similar to how SQL Server would send email. And then once the SMTP profile is configured as a default, and if you want to

Double click or edit that one. um Here you would just need to be able to fill in all the appropriate details that you need to connect. And if you have username and password, you would fill that in there. And then you I see you’ve just got a bunch of bogus test stuff in there. That’s fine. But once it’s set up with real SMTP credentials, and then you can if you’d send a test email. But from there, that’s it. You would just hit OK and make sure the service is running. And then

If your SQL server stops or is not running, it’ll restart it for you. And if it can’t connect to it, it’ll send you emails, even if SQL Server is not running, to be able to tell you that SQL Server is not running. So yeah, there’s the questions that I like to refer to as that’s a great question because it’s something that we just built or we just talked about. Well, we added this a few weeks ago, or actually about two months ago now. we specifically added it for monitoring on SQL Server, SQL servers that didn’t have a SQL agent running, like SQL Express.

But it’s one of those things that’s great for anyone who has a problem with maybe SQL Server not starting up correctly.

George (06:46)
And it may be a good idea as well to run it and point it at your SQL Server in case your actual SQL Server host doesn’t start up. That’s part of the this last bit of his question was it was kind saying that if services don’t start, then you have to have another monitor that should monitor the monitor, essentially.

Steve (07:05)
Yep.

And that’s basically what this is doing is this is the monitor that’s monitoring the monitor. That’s a that’s a tongue twister, George.

George (07:11)
Yes.

Mitch (07:12)
Ha ha.

Steve (07:14)
Okay, so with that, the one thing I would recommend if you’re using those restart features is that when you’re doing SQL Server updates and things like that, that you turn off that automatic restart so it doesn’t try to start up your SQL Server while you’ve just turned it off to be able to do updates or something like that. So

George (07:29)
If you just quit

the quick tray icon, does it stop that?

Steve (07:33)
No, that’s the interesting thing. The tray icon, it it doesn’t have to stay running. But the SQL, there’s the agent, sorry, the database health monitor service that runs.

You need to make sure that that’s running. So what I would do is go in and just change those settings and tell it not to automatically restart it when you’re doing updates and then turn that back on after you’ve done updates. I think you’ve done that on some

George (07:54)
Okay.

Steve (07:55)
of our recent updates, haven’t you, Mitch? Yeah.

Mitch (07:57)
Yes. Yeah.

It’s you do I do explicitly turn those settings off just to make sure could be external server maintenance if the servers if the SQL servers themselves need to be shut down. but the the machine itself isn’t being shut down just for data integrity or maybe they’re worried about some server moves. We’ve had to do that in the past, but yeah.

Steve (08:17)
Yep.

And what I love about that question is it literally just came in right after we’d implemented those features. So happy that somebody’s actively using it. I talked to this person about it, gave them all the details, and he’s really happy now. So good stuff. Okay, so what’s the next question that we have to talk about?

Mitch (08:38)
This one’s this one’s come in quite often, or it’s it’s we’ve had conversations with individuals who are looking at database health monitor. maybe they just had some questions about it, but the the big overarching question is what sets database health monitor apart from other SQL Server monitoring tools that exist out there? and what is the biggest advantage that database health monitor provides for DBAs?

And to to get into that, it it goes back to the core of of what database health monitor is and why it was designed. Steve started Database Health Monitor many years ago because you needed a tool to monitor SQL Server, right? Steve.

Steve (09:21)
Yeah, yeah. Fifteen years ago, because we needed to do monitoring and some of the other monitoring tools out there were too expensive or I couldn’t convince an employer or a a client to go and spend the extra money on it. So we built our own monitoring to cover that. That’s where it started.

Mitch (09:38)
Yeah. So at at its core, it’s been built because a DBA needed a DBA tool. And it’s stayed that way. We’ve used it since George and myself have joined the team. We’ve built the tool for things that we need, and we’ve had DBAs reach out to us and ask for features that they need. So it’s it’s at its core, it’s built by DBAs for DBAs. Uh

Steve (10:03)
And to add to

that, we well, literally to add to that, we keep adding to it as we find

Mitch (10:08)
Yes.

Steve (10:09)
that there’s something that it’s lacking. we had on our SQL performance monitor, part of database health monitor, we had a performance tuning engagement, what, six months ago, and there

Mitch (10:19)
Mm-hmm.

Steve (10:19)
were some things that were a little bit hard to get. So I added a few more tabs in there with information. George added one, and we all contributed to be able to

have much better a much better tool if we ever get in that same performance tuning scenario again. And most of what’s there has come from a need to be able to find this or to fix it or to track problems down. Not just pipe dream just sitting around wondering, gee, what could we do? It’s like,

here’s the problem and how do we fix it? How do we make it easy to find in the future?

Mitch (10:51)
Right. And that first question, it was a question on, is this a feature you guys would be able to add? And we had already added it at that point. But a lot of questions that come in from our users help drive the future development of database health monitor. Maybe they’ve come across something and they’re like, hey, this would be really awesome to have in Database Health Monitor. So we add it. And it’s a great way we we go back and forth with the community on

how we can shape the tool to be the best it can be.

Steve (11:19)
that route,

so many things have been added because of either community suggestions or just our personal experience. And

they’re not always perfect, but we’ve been able to with fifteen years into it now get it so it’s closer to perfect than it was a few years ago. So just getting better every day.

George (11:35)
The other thing is because we do the managed services and we have our own set of clients, every single environment we go into is slightly different. And we have to actively tune database health monitor to work its best in each environment. we have yeah, some clients that have huge replication subscriptions and we have some that have tons of availability groups and it’s we had to add additional reporting.

for each of those clients to monitor that and tune those to the best of our ability.

Steve (12:10)
Yeah, that’s a good example. And the reports we have for SQL Server replication, that’s something that I think I was five iterations into it before I was happy with how it looked. And when we re and those five iterations were before we actually released it. And it was because we work in so many environments that have replication that we know what needs to be tracked there in order to know if things are healthy or not.

Same with availability groups, like you mentioned, and all those other things, because we work in so many of those different environments, we learn what’s needed to make it even better.

Mitch (12:45)
Another point that we have for this question is that we only do SQL Server with database health monitor. It’s not a it’s not a multi-level or a multi-host application. We have, I don’t know, have we teased that yet? We have another one maybe

in the works.

Steve (13:04)
well, okay, so we have the Azure SQL database health or database monitor.

Yeah, and that was released in our version four release several months ago. And that was an interesting one because we tried I tried to figure out how do we shoehorn that into database health monitor, and it just did not make sense. It’s

Mitch (13:23)
Yeah.

Steve (13:23)
a complete different beast. And so what we ended up doing was building a separate standalone application with that.

So that we could keep database health monitor its absolute best for SQL Server and then Azure SQL database health for reporting on Azure SQL.

Mitch (13:40)
We’re not the the the big point of that is that we’re not trying to make a a one size fits all tool. It’s a very specific driven application that we don’t just try and fit everything into this one box. And then

last last item that I had to answer that question, and this gets into, I know George, you had another one that dives a little deeper into this, but it’s a lightweight tool and it’s very easy to get started.

It doesn’t it doesn’t add, I don’t want to dive too deep into your question, George, but it doesn’t add a lot of load and you can get it. it takes five minutes to get set up and start looking at what’s going on with your SQL Server from download to starting

to diagnose.

Steve (14:25)
and it’s free for thirty days to try it out. How many other products

out there have that? some of them you might

have to shell out a few thousand dollars before you can even try it.

Mitch (14:33)
Yeah, and we don’t have a stripped version for the free trial. It’s yeah, we want you to see

Steve (14:38)
No, you get everything. Yep.

Mitch (14:41)
the entire tool suite that you can use.

Steve (14:46)
that’s one of my frustrations when I’m trying out a product and you you and it’s like, yeah, but this feature is disabled and that feature is disabled. Well, how am I gonna try it out if those features are all disabled? Well, we don’t do that. You get everything in the trial version.

Mitch (14:57)
Yeah. I know one of the biggest things that

we we advertise is where to get started is the quick scan report. And a lot of people would put that behind the paywall and we say, no, download it and go look at the quick scan report and see what things you might not even know about your SQL server.

Steve (15:16)
Yep. Absolutely.

George (15:19)
Well, I guess that brings us to our next question, which is doesn’t running a SQL Server monitoring tool introduce additional resource overhead, especially when it uses SQL Server agent jobs and stores clo collected data in a monitoring database on the same server being monitored. How does database health monitor minimize that impact? So this question is

a mix of of Steve’s question and at the end of Mitch’s answer there.

and I think that’s the it’s something that we’ve always asked ourselves as we’ve developed it. and that’s so any monitoring is going to introduce some level overhead. Some of the queries we run are resource intensive. they but we try to make them as lightweight as possible. And the ones that are being

The the ones that are more intensive are generally not run consistently. those are ones one off queries that you can run. if you want to run a specific report, I think what’s our the I’m trying to think of what a one of our big instance reports are that takes a minute to load.

Mitch (16:27)
Well, it’s not an instance

Steve (16:27)
Oh, yeah.

Mitch (16:28)
level report, but I know looking at index fragmentation on any database is just an intensive operation no matter how you try and chop it up.

George (16:36)
Yeah.

So s some of them you can’t get around, but at least the ones that are actively monitoring are gonna be we’ve made them as lightweight and efficient as possible. and we also know that a lot of the performance monitoring and database monitoring, in most of our use cases with our own clients, the performance tuning results we’ve gotten.

From monitoring, have far outweighed, the the amount of performance costs we’ve saved has outweighed the overall overhead of the the product itself by what 10 to 20

times usually on some of the clients between when we first work with them and

Steve (17:22)
Yep. Let me give you an example

with one of our ongoing clients just yesterday. We had Database Health Monitor installed. We it looks like Database Health Monitor generally takes about two to four percent CPU on the system if it’s a loaded server. we had a client who we’ve worked with for several years. They’d had some changes and they had a query. Well, not a query, they had several queries, but their server was getting to the point that it was 100% CPU bound.

Or bouncing between 95 to 100% CPU bound. With Database Health Monitor, we were able to find in about 15 minutes where those performance issues were in their queries. We were able to add three indexes, which took the load from nearly 100% to down under 50%. And we were able to find two stored procedures that had really bad query hints in there that were causing

By removing the query hint, we were able to change it from twenty-seven million reads down to two hundred thousand reads, which is that kind of thing, you can’t do that without some kind of data backing up what you’ve got there. And the overall cost on that CPU load on the server is probably about two to four percent in order to be able to do all those things.

George (18:34)
Yeah, and in the end our goal is to give DBAs visibility they need to make the server healthy before before performance issues like it also has the tracking, so you can see, this query we run every day is getting slower and slower and slower. You could cache that before it gets too bad and you save a lot of performance in the end.

Steve (18:57)
Well, I was gonna say, which brings into our alerting area, which I think might lead into something you’re gonna cover, right, George?

George (19:04)
Yeah, we have one final question, which I think

it’s it’s it I can go a bit into it after I asked the question, I guess. so many DBAs spend most of their time responding to problems after users report them. How can tools like Database Health Monitor help teams shift towards proactive performance management? This is one which I think we only added a year or two ago.

We used to just have the database health window that you could look at and see historic historic data. but about a year or two do you do you remember when you added that, Mitch? The we added a email reporting email alerting function directly in database health monitor. And we have it in the

tray icon, like we said on the first question there, but we also have it here, let me share my screen.

Mitch (19:53)
So to answer your first question, it’s it started in development about two years ago. And about a year ago is when it got really fleshed out. And with the release of version four, we’ve added uh quite a few new alerts to go along with.

George (20:12)
Yeah, and there’s only s like it it’s kinda hidden, so uh if you wanna follow along with me.

Mitch (20:17)
There’s a few different areas

to get to it as well. You can get from the main screen if you scroll down.

George (20:23)
Yeah, I think the easiest way is if you go to the server trees on the left and you right click the instance you want to get to. You can do configure email alerting system for the that server.

Oh, opened on the other screen. Nope, come down.

Go. Um, and we have a bunch of yeah.

Steve (20:45)
Oh the problems of multiple screens when you’re sharing.

George (20:49)
Uh we have a good selection of pre-done alerts that you can set up and configure for your instance. Uh and these I believe just use the SQL agent. Do we do these work in the tray as well? Or is that a future?

Steve (21:06)
Uh yes. So

these will work both with SQL Server agent jobs processing them, or if you’re even on SQL Express where there is no agent and there is no database mail, these will still work. And you just have to choose an email profile that was configured through the tray icon if you’re using it on one that doesn’t have an agent.

George (21:30)
So yeah, I it’s it’s kind of like one of the later things we added to database health monitor, but it’s probably one of the most useful for people that are gonna download it. Especially DBAs, because it you can do your DBC checkDB alerts, you can do your file growth alerts, you can do all your alerts to know right before something bad’s gonna happen. Um and then you can

Steve (21:55)
Yeah. And speaking of

George (21:57)
also go down here and you can add custom TSQL alerts. So

You find a really cool query that will give you a cool alert, you can add it.

Steve (22:05)
Yep. And then speaking of right before things go really bad, if you scroll up, there’s uh blocking and long running queries and average CP well actually the first four of them that are listed there are probably the first four that you should configure if you’re worried about your system and your overall performance. So when the average CPU gets too high, you want to know about it. When you’ve got long running queries or blocking or deadlocks, you want to know about those two.

And the other thing that’s really cool with this is let’s say you’ve got some long-running queries, but you know that there’s this one stored procedure that always runs long because a nightly ETL load or something like that. You can put in exclusions. If you hit the configure button on long-running queries there, George, we can put in exclusions.

see on the bottom how it’s got exclude, we can go in and add any list of stored procedures in there that or any tsql text that we want to exclude. So if we find out we’re getting a false positive alert every day because of an ETL job, or things like CheckTB or running backups, oftentimes I’ll put those in to exclude so that uh you don’t get an alert every night that says, well, Check TB ran for 30 minutes, because that’s normal, right?

So yeah.

George (23:26)
Yeah, I would say that’s uh I’m s surprised it took us so long to add it, but it’s probably one of the most useful features for active DVAs.

Steve (23:36)
Oh yeah, for sure. And we use that when we’re monitoring our clients that we have with managed services so that we can get the alert that something’s going wrong, so that we can jump in and start to help before they even may know that something’s going.

Okay, well we’ve covered a number of topics here. Do we hit all the questions we had at this point?

Mitch (23:57)
I had one other one. it’s it’s come up a bit in the past when we’ve done some levels of performance assessment, but it it it stems from is database health monitor worth it as a developer or from a developer standpoint? Because we it’s a very a lot of DBAs use database health monitor to ensure the health of their SQL servers.

But what is in database health monitor that a developer can use to work on the back end of maybe their their system, if their whatever tool that they’re building?

Steve (24:35)
Well, you want me to take that one? All right.

Mitch (24:37)
Well yeah, I mean I I kinda know that

I know the answer because I I write a lot of this stuff, but it if if a developer’s listening, yeah.

Steve (24:42)
Yep. Well look let me take a stab at it.

Mitch (24:46)
Yeah.

Steve (24:46)
So the thing is, uh if you’re a developer that cares about your performance, and I know I I I don’t mean that in well developers don’t care about performance, but some do and some don’t in different ways depending on the size or scalability of the environment they work on.

And we’ve worked in environments where some of our clients have development teams, actually several of them do, and

We work with developers and get them access to database health monitors so that when they’re working in their dev or test environment, they can go find some of these problems before they hit production. But also it gives them the insight when there are problems happening on production, so they can go and find, well, what do we need to fix or what do we need to change? And if you’re a developer that’s ever been in the hot seat because something didn’t perform well, this is the tool for you.

Mitch (25:39)
Yeah, the one of the big ones is looking at the long running queries report. And, you see one of, hey, I wrote that procedure. Maybe I should look at and see why it’s running so long. That’s a great way to give a a breakdown on that. it it’s a bit of a two part question too, is I know we’ve had questions on how can we prove to the vendor that it’s not our configuration. It’s something in the software that we’re dealing with that’s being slow. And we’ve usen it

We’ve used database help monitor to break apart queries and really find, hey, there’s this one problem issue or one problem query that we need to send back to the vendor and have them do some editing.

Steve (26:17)
And in that example, you’re referring to when our clients happen to be using a product that is provided by another vendor and we’re trying to help them make their server run faster for that product.

Mitch (26:31)
And

we we have other people who’ve done that kind of assessment with database health monitor as well.

George (26:36)
Yeah. And a lot of that is available in database health monitor, but we also package the performance viewer, which I’ll share real quick.

Which I would say for developers trying new queries that they may or may not know the impacts of query writing and whatnot, um, or what indexes are how to form indexes and whatnot. We have the performance viewer, which you can run while you’re testing on your dev environment or while your production environment is being slow. and it’s got your CPU, it’s got your RAM metrics, it’s got your connections.

And then it’s actively grabbing your missing indexes, your blocking queries, your long-running queries, your weight stats, high CPU queries, which are probably some of the best to tone and deal with. and it also comes with our um execution plan viewer, which can really help developers that may not know

all the intricacies of uh query tuning to

fix or improve

their queries without that that knowledge.

Steve (27:58)
So the

Performance, the SQL performance monitor that George is showing, at least before he popped up the plan viewer here, is included and shipped with database health monitor. And if you’re in database health monitor, you can just right-click on any of the SQL Server instances and it will open performance viewer for that. it’s a separate standalone application because it really, I mean, it ships with database health monitor, but it’s one of those things that’s the first thing you run in an emergency to go and find out what’s wrong or why is the server overloaded. But

There’s other tools too that ship with database health monitor that for a developer, for instance, we have our query loading ramp, which is our uh load running tool that we can set up that will put a load against your SQL server. And you pair that with the SQL performance monitor, and you can find out where the problem areas are in your longest running queries.

George (28:57)
And I don’t have anything set

up in it, so we can’t demo it right now. But it has

Steve (29:03)
we don’t have to demo it because we have a whole nother podcast that was a demo just on query loading ramp. That if anybody wants to see it, go back and check out that previous podcast on the query loading ramp. It covers all the detail on how to use it and as a developer, how you can make sure that your queries are gonna run well and run well under massive concurrent load.

George (29:23)
But yeah, I guess it that’s another one of the things that’s commonly probably overlooked by people that use database health monitor is all the like separate tools that we package with it that all have their their use cases. And you might not use them

Steve (29:37)
Yep.

George (29:37)
all the time, but it’s nice to know that they are there and what they do for when you need it.

Steve (29:45)
Okay. Well, good stuff, guys. Uh I think then that about wraps it up. But um, I guess the key takeaway here is give Database Health Monitor a try. You can download the free trial at databasehealth.com, free for 30 days. And if you’re trying it out or checking it out and you need some help, just reach out to us. We’re there to help you get going and get working well with Database Health Monitor.

George (30:11)
Or if there’s

a feature that’s just a complete what is it? It’s a can uh sh

Steve (30:16)
Steal killer?

George (30:16)
like a sh yeah, a deal killer. If there’s a feature that’s not there that’s a deal killer for you, let us know. We’ll we’ll see if it’s worth adding. And

Steve (30:24)
Yep.

George (30:25)
it usually is if it is a deal killer for you.

Steve (30:27)
Yep. So if you’re already using database health monitor and you have any questions on how to do something, just reach out.

Yeah, check out our sites, Tedmansolutions.com, for consulting free tools or our latest podcast episodes. Check out DatabaseHealth.com And Mitchell and George, thank you for being on the podcast today.

Mitch (30:48)
thanks for having me.

George (30:50)
Thanks.

Steve (30:50)
And for our listeners, thanks for listening. And don’t forget to like and share this podcast. Have a great day.