Finished the first version. Setup is available at:
http://cloud.github.com/downloads/knippers/sql2growl/Sql2Growl_1.0.zip.
The installation consists of two parts (both included in the zip). One
is to setup the objects in the database (personally I am always a bit
reserved to have a setup touch my databases, but if there is a user
demand for it, I might integrate the setup of database objects in the
installation set). The seconds is to install the NT service that
interacts with the database and upon receiving a notification forwards
it to Growl.
To send a notification from the database execute the following
procedure (assuming that the defaults in the SQL script where used):
EXEC [Growl].[spQueueNotification]
@Application = N'Test App',
@Type = N'Executed',
@Title = N'Test Title',
@Message = N'Test message\nline two' -- use \n for newline
Other parameters:
@ClearCachedObjects = 0 -- set to 1 to clear cached Growl
objects
@Icon = 'name' -- The service will look for the icon in Icons
folder of installed service and append .png to the name
@Password = 'password' -- usually only needed if notification
has to be forwarded to other Growl instance
@Host = 'hostname' -- if you want the notification to be
forwarded to another Growl instance, it's preferred to setup
-- forwarding in Growl itself
@Port = '23053' -- only has to be set if Growl is not
listening on default port
Oh and of course the full sourcecode is available at:
http://github.com/knippers/sql2growl/tree/master
Please let me know if you (anyone) has any ideas on how to improve the
code. If you find a bug or if you need help.
Daniel