Have You Been Told Today

  • Comments posted to this topic are about the content posted at http://www.sqlservercentral.com/columnists/floschiavo/haveyoubeentoldtoday.asp

  • You could also use the extended procedure xp_cmdShell to send the net message.

    I use the following command in an Execute SQL task object in my DTS packages and you can create others as well for success of failure. The following command tells me that my package is starting. I also have one the tells me when the DTS package completes. This way I have an idea of how long a package is taking to complete.

    exec master..xp_cmdShell 'Net Send myComputerName Import Store Package Starting', NO_output

    The only problem with using the xp_cmdShell is that you must have the authority to run the command and a typical user by default does not. You would need to set the access to this extended stored proc to user account that the SQL server Agent is running under. For us it is the administrator account so they do have access to this procedure. Your SQL may be set up differently check with your SQL DBA first.

    and on another note this procedure can also run other things and can be used for malicious reasons so be careful when setting the security on this procedure.

    Just my two cents

    George

     

  • We use sp_OAMethod to invoke a method on a COM object installed on our SQL server. This COM object has several methods that accepts the params and then sends them in a UDP broadcast on our LAN. The parameters are typically a varchar or 2 and a WORD, which is the messae number/ID.

    We monitor the broadcasts via a client application which handles the data according to the message id. This is used for everything from updating Calendar information in real time to completion/error notification for tasks.

    We also have a service that monitors the UDP port for IT specific messages and based upon the time of day/priority will notify staff via email or SMS text to our cellphone.

  • You could also use vbscript to send email notification using CDO.Message

     

  • We use xp_smtp_sendmail to send email notifications. Works great. In the context of this article, it would just be an Execute SQL task.

    John Scarborough
    MCDBA, MCSA

  • Is this a procedure that comes with 2000? if so how do you call it?

  • I too use the CDO object, I tried this net send and received back the message that "sending is no longer supported".

  • How did you extend this to SMS yourself ??

  • We have a table of events/errors that we monitor, one column of which is a bit Column 'IsSMS', another are the email addresses to contact.

    When events are processed by the service, it does a lookup on the table and if IsSMS is set to True, it sends an email to the specified addresses, which in this case are the cellphone SMS addresses.

     

Viewing 9 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic. Login to reply