[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [hobbit] MS SQL Monitoring on Windows 2003 64-bit
- To: hobbit (at) hswn.dk
- Subject: Re: [hobbit] MS SQL Monitoring on Windows 2003 64-bit
- From: Richard Finegold <goldfndr (at) gmail.com>
- Date: Fri, 26 Mar 2010 01:58:30 -0700
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:received:message-id:subject:to:content-type; bh=thlrc7ePfMOZAfKJUnPr4F8uPFByABZnQqN2Xv2chGk=; b=piu2PYkH2zx+qDMkKzshwkLAixBfbLYFa2Sg+9xeINWtYvnD6Pk851EdhXPjOJ8S1i WRHAtIEKOGvoA3FKk0nGju7qCm8cLlUpIcsEaYGiQrmRTacorcS4HOD7W/QaeD6+vzzH qG0pCVhxk/wEjBEjtBSq2rsE7AQ8tQ5sFtTOs=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=dwO5U8KS+LMZf8M0RlVcaD2JsJD1XjgwGRc6SXaoWpJFbfTJKTyA+eblqxqEA112my T/i/xU+XIYT/wWN2RpgtHVx+7fhwG1wQ386Cw82vXQ8D8m8Y1P2KgEtcSin7AOtteeAE eZ0BBp/A6B5c6YDEv/tFgB/GCh2qxh/Ncbg+U=
- References: <3b3b4f141003220525k8a3b1del23ea569619b85a66 (at) mail.gmail.com> <EBDBC7B4393B6C4F9DDADE295309C9F201CFF50B18 (at) EX1.nibco.com> <3b3b4f141003220850u69d78202m401554fc25f881fc (at) mail.gmail.com> <961092e11003221000x732ac832rcf05424706a1c49e (at) mail.gmail.com> <9583BE62E9201646A6D5E8B9D3E27B880107E975 (at) sv-int-mail1.cegekanv.corp.local> <ac336e5893d4690e5862ed7978f06c2a (at) localhost>
On Fri, Mar 26, 2010 at 00:55, doctor (at) makelofine.org
<doctor (at) makelofine.org> wrote:
> On Thu, 25 Mar 2010 11:38:07 +0100, "Gillis Bart" <Bart.Gillis (at) cegeka.be>
> wrote:
>> Hi,
>>
>> I've adapter the bbsql-server script from deadcat.net so that it is
>> working with the BBWin agent.
[snip]
>> I still have to implement some alerting on those statistics but the
> script
>> works fine on MSSQL 2000 and up.
>> It works on both 32 and 64 bit architecture.
>>
>> I will paste it on xymonton
Ah, I should probably send this publicly...
There was an error when I ran this. Each server I've run this on claim
to have no jobs, so the file for CheckJobStats was never created.
The following code, around line 122, "fixes" it. You can see that it
only opens the file if it exists, then deletes immediately after
reading instead of after the variable assignment. It could be
simplified by always setting tmpStr to No Job History, then replace it
with f.ReadAll as needed.
There are a few other minor improvements that could be made (e.g.
change <td> to <th> in table head; maybe remove <br> from within
tables since it doesn't seem to serve any purpose).
Loop
if fso.FileExists(strFilePath & "\" & tempfilename) then
Set f = fso.OpenTextFile(strFilePath & "\" & tempfilename ,1 )
If Not f.AtEndOfLine Then
tmpStr = f.ReadAll
Else
tmpStr = " No Job History. " & vbcrlf
End If
f.Close
fso.DeleteFile strFilePath & "\" & tempfilename
else
tmpStr = " No Job History. " & vbcrlf
end if