Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 notify_netsend operator

Author  Topic 

shaneschmidt
Starting Member

17 Posts

Posted - 2003-09-22 : 02:52:38
How can I get more than 1 notification on net send operators for more than 1 person. Any attempt to do this fails.

AndrewMurphy
Master Smack Fu Yak Hacker

2916 Posts

Posted - 2003-09-22 : 05:50:30
I don't think you can....best bet is a batch file....


Dim Message, wsh
Set wsh = Wscript.CreateObject("Wscript.Shell")
Set ArgObj = WScript.Arguments
message = InputBox("Please enter your message","Net Send Utility")
If message = "" then Wscript.Quit
For i = 0 to ArgObj.count -1
Wsh.run "Net Send " & ArgObj(i) & " " & message,True
Next

PS I saved the file as netsend.vbs and then ran

Netsend.vbs steve john fred bill
Go to Top of Page

shaneschmidt
Starting Member

17 Posts

Posted - 2003-09-22 : 19:57:11
Thanks Andrew
I will use what you sent me.. but was more concerned with notifying another
person at the same time when a job finished in case of holidays.
Go to Top of Page

AndrewMurphy
Master Smack Fu Yak Hacker

2916 Posts

Posted - 2003-09-23 : 06:14:59
the problem with NET SEND is that it only works when the recipients are signed onto the network....and good soul, who signs out and powers off their PC each evening won't see the messages the next morning.

you may be better advised to investigate, SQL Alerts and or SQL mail.
There are some topics/articles/advice items here that will point you in the right direction.


Another method might be to have a 'job-history' table into which every job reports its progress/status...
i.e.

job a started @ xx.xx
job a finished @ xx.xx + 1
job b started @ xx.yy
job c started @ xx.yy
job d started @ xx.zz
job c finished @ xx.yy + 2
job d finished @ xx.zz + 3

as you can see...job b is still o/s...

and if you write a 'job-history reporting' module then your co-worker can determine for themselves when jobs work/fail, without involving/depending on any messaging system....remember the more links there are in a chain, the more points of failure!
Go to Top of Page

shaneschmidt
Starting Member

17 Posts

Posted - 2003-09-23 : 18:38:20
Thanks Yak
Our job status table is alrady in place and the sql mail is being investigated. Thanks to all that replied.
Regards
Shane
Go to Top of Page
   

- Advertisement -