Quantcast
Channel: Rss Feed - SSMSBoost Add-in discussion board - Forum
Viewing all articles
Browse latest Browse all 823

Feature Request: Query post execution action ideas

$
0
0
Hello! Love your product, been using it for years!

I see in most recent 3.1 release notes that you plan on extending the "Query post execution actions" functionality ... adding the possibility to send e-mail on query completion or execute another action.

This is useful when we start long-running queries and switch to another script or application (or just leave my computer :) ). Currently we can be notified by popup or system tray message (which I never see).

A couple ideas here ...

  1. support or slack and Twilio (SMS message) would be awesome!
  2. My top choice would be Twilio. Currently if I'm executing a long-running manual script, such as creating a database, restoring, re-indexing, a scheduled SQL Agent job I need to be aware of, etc - I just add a line to the script to execute a proc we wrote "t_TwilioSms" (see definition below). It would be nice to have SSMSBoost store my Twilio credentials and easily toggle notification on or off on the menu bar. A custom message pattern would be nice.
  3. ultimately, executing a command line application would be the most flexible as you could then run a PowerShell script or I could run cURL to call Twilio or any other application as long as you include command line parameters.

exec t_TwilioSms @Phone='5555551212', @Message='My long job is done!'
GO

ALTER procedure [dbo].[t_TwilioSms] @Phone varchar(255), @Message varchar(1000) as
begin
declare @uri varchar(8000)
set @uri = 'https://api.twilio.com/2010-04-01/Accounts/[TWILIO_ACCOUNT]/SMS/Messages'

declare @content nvarchar(max)
set @content = dbo.clr_AddParameter(null, 'From', 'TWILIO_PHONE')
set @content = dbo.clr_AddParameter(@content, 'To', @Phone)
set @content = dbo.clr_AddParameter(@content, 'Body', @Message)

declare @response nvarchar(max), @returnCode int
exec @returnCode = dbo.clr_WebPost @uri, @content, @response out, @userName = 'TWILIO_ACCOUNT', @password = 'TWILIO_PASSWORD'

if @returnCode = 0
print 'Success: ' + @response
else
print 'Error: ' + @response
end

GO
Go to last post

Viewing all articles
Browse latest Browse all 823

Trending Articles