Query Post-Execution handlers
Possible use cases:
Configure automatic e-mail notifications via Outlook upon query execution completion. Start long-running database maintenance query and go home. Get the execution result by email when it is finished.
For debugging or educational purposes: save long-running queries source text to some specific file location or database table for later analysis and improvement
Pre-configure automatic steps for manual post-execution like: script ResultsGrid to File as Excel / Send it by e-mail as an attachment
Send yourself a "Query execution complete" message using your favorite messaging system (provided it supports sending messages from command line)
Post-Execution handlers are a powerful tool that allows you to trigger different actions in SSMS after query execution is finished. SSMSBoost can be configured to execute command line (or PowerShell) script if query execution exceeds specific time-limit. Script can reference the executed query text, execution result and ResultsGrid data. Handlers can be triggered manually in Post-Execution handlers selector window
that you invoke by clicking
button on the toolbar.
If you set info messages to be shown upon query execution completion a pop-up notification will appear in the top right corner of the screen:
If query execution finishes while you are working in another application a notification message in system tray is shown:
To configure pop-up message appearance and timings go to SSMSBoost->Settings->Query Post-Execution handlers
For more detailed settings enter Handlers list
Every handler consists of the following essential parts:
Command line/Program to execute (can be left empty)
Command line arguments
Files that can be generated based on Execution Status result, Execution Script, Execution Script Output or Data Grid. Depending on the situation you can decide which data you would like to save to a file (just to archive it) or reuse the generated file in command line.
You can create your own handlers by clicking
button. We ship several handler patterns out-of-the-box which you can use as an example for your experiments. If you accidentally deleted predefined patterns click "Add Defaults"
to restore them.