I use SQL Server Management Studio (2008 R2) and I don't have sound/speakers. How can I get a visual notification when a query is done (perhaps a popup notification)? Currently, I have to constantly ping/check to see whether my query is done executing and it's getting tiring.
- 1There are several visual indicators in the SQL Management Studio interface. The problem isn't that Management Studio doesn't tell you when it's done, the problem is that you're not paying attention when it does. (Minimized or otherwise hidden the interface.) I suppose you could write a small application which runs your query and provides some other indications.David– David2013-06-27 14:58:24 +00:00Commented Jun 27, 2013 at 14:58
- 2@David The key to my question is that I don't want to have to pay attention to SQL MS. After I start the query I switch to other programs/browsers that take up all of my screen real estate, and I'm looking to see if there's active visual notification that will move SQL MS to the forefront, or at least grab my attention from whatever I'm doing (like a kitchen timer I want to set it and forget it).MrPatterns– MrPatterns2013-06-27 15:17:14 +00:00Commented Jun 27, 2013 at 15:17
- 1@DanPichelman My queries are actually really short & simple. The data however is on the order of 30 million rows and it takes time. It's a bit like watching a pot boil water (i.e. I don't want to watch it).MrPatterns– MrPatterns2013-06-27 15:18:51 +00:00Commented Jun 27, 2013 at 15:18
- @James Let me further elaborate...no sound card. And the box is not accessible.MrPatterns– MrPatterns2013-06-27 15:19:52 +00:00Commented Jun 27, 2013 at 15:19
- @DanPichelman - Sometimes this would be useful when making the queries more efficient. Letting slow running queries run to the end so you can retrieve the actual execution plan is often informative.Martin Smith– Martin Smith2013-06-27 15:20:28 +00:00Commented Jun 27, 2013 at 15:20
Add a comment |
2 Answers
You could always put the query in a SQL Agent job step and get it to email you when it's finished.
2 Comments
FistOfFury
kind of overkill no? There's no add in that creates a popup when complete?
steoleary
@FistOfFury I wouldn't say it was overkill, there may be an add on for that, but what happens when you're 4 hours 58 minutes in to your 5 hour long query and you forget about it, un-dock your laptop which kills your session and starts it rolling back :-)
I know this question is years old already, but I just ended up here while looking for the same thing. I ended up doing something related to what @david suggested in a comment about writing a program to run the query and send a notification when it was complete.
Using AutoHotkey you can periodically check the title of the SSMS window to see if it includes "Executing..." and pop up a notification when it doesn't.
SetTitleMatchMode, RegEx DetectHiddenWindows, on loop { WinGetTitle, Title, .*Microsoft SQL Server Management Studio If InStr(Title, "Executing...") Sleep 60 Else { MsgBox, Done executing "%Title%" break } } 2 Comments
RiverHeart
Much better solution. Can also do something similar with Powershell or VB to avoid the AutoHotKey dep
DavidP
@RiverHeart Yes, you can absolutely do this without AutoHotkey. I just used it since I already have it running for various other things and it made the implementation simple.