Servers Alive will replace the % parameter with the value of it. How would you write a string (without using % paramters) within the osql command?
Dirk. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Donald Kleinsmidt Sent: Saturday, September 11, 2004 8:11 PM To: [EMAIL PROTECTED] Subject: Re: [SA-list] Using command file to log alert What i have been trying to do is use use Osql to write entries to a table when an alert occurs using the 'execute command' when an alert occures. I can get it to log fixed data like set words, but cant get it to log the servers alive information like %p, %h, %e into tables - how would i do this. I have a test stored procedure called (SI) that accepts a single parameter but SA wont pass any info to it. osql /U lite /P lite /S localhost -e /d lite /I /q "exec testI @f1=h" is my command On Mon, 23 Aug 2004 13:49:20 +0200, Dirk Bulinckx <[EMAIL PROTECTED]> wrote: > You can put anything you want within the commandline, all the % parameters > (as defined within the doc) will be "translated" into the values of them. > The commandline is passed to the OS and it's the OS that will execute it. > Without using associations (this means that if the commandline is a .VBS for > example that it will NOT start the associated program, you will have to pass > that within the commandline too). > > Dirk. > > > > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf > Of Donald Kleinsmidt > Sent: Monday, August 23, 2004 1:45 PM > To: [EMAIL PROTECTED] > Subject: [SA-list] Using command file to log alert > > After initially considering triggers, i have changed my mind and want > to log alerts to a database table by running a command file. > > I've found that you can use 'Execute command' to run a command file > every time an alert is recorded. > > Can you put SQL insert statement in this command and then pass alert > through servers alive variables to log this into a table. > > If so, how do you do this what would the syntax of the text in the > command file look like, can someone please provide an example. > > thanks. > > > ------------------------- > > [This E-mail scanned for viruses by Declude Virus] > > To unsubscribe from a list, send a mail message to [EMAIL PROTECTED] > With the following in the body of the message: > unsubscribe SAlive > > ------------------------- > > [This E-mail scanned for viruses by Declude Virus] > > To unsubscribe from a list, send a mail message to [EMAIL PROTECTED] > With the following in the body of the message: > unsubscribe SAlive > ------------------------- [This E-mail scanned for viruses by Declude Virus] To unsubscribe from a list, send a mail message to [EMAIL PROTECTED] With the following in the body of the message: unsubscribe SAlive ------------------------- [This E-mail scanned for viruses by Declude Virus] To unsubscribe from a list, send a mail message to [EMAIL PROTECTED] With the following in the body of the message: unsubscribe SAlive
