space drops to a preset level. Is there a way to do this
using sql agent alerts? I looked at the alerts that are
pre-defined, they are more DB oriented. If someone could
point me to some examples it would be appreciated.
Dave K.Which OS are you running on ?
W2KAS has "quota" management , so you might look into it.
there are also commercial prods available
W2K quotas can be found with the Windows Exploder -select disk--> right
click-->properties--> Quota tab
"Dave K" <anonymous@.discussions.microsoft.com> wrote in message
news:048f01c3dc3c$46938f90$a001280a@.phx.gbl...
quote:|||Can you do this without putting a limit on disk space?
> I would like SQL Server (7 and 2K) to alert me when disk
> space drops to a preset level. Is there a way to do this
> using sql agent alerts? I looked at the alerts that are
> pre-defined, they are more DB oriented. If someone could
> point me to some examples it would be appreciated.
> Dave K.
"MaSa" <matti putTheDotHere saukkonen _ POISTA_ mandatum.fi> wrote in
message news:uWp2rKE3DHA.2544@.TK2MSFTNGP10.phx.gbl...
quote:|||Win2K. BTW, I don't want to restrict anything with a
> Which OS are you running on ?
> W2KAS has "quota" management , so you might look into it.
> there are also commercial prods available
> W2K quotas can be found with the Windows Exploder -select disk--> right
> click-->properties--> Quota tab
>
> "Dave K" <anonymous@.discussions.microsoft.com> wrote in message
> news:048f01c3dc3c$46938f90$a001280a@.phx.gbl...
>
quota, I just want to be notified when I run out of backup
space. I have some 15GB databases that eat up space
fast. If the regular maintenance backups don't delete the
prior jobs, and sometimes they don't, I want to be
notified before the backup fails, not after.
Dave K.
quote:
>--Original Message--
>Which OS are you running on ?
>W2KAS has "quota" management , so you might look into it.
>there are also commercial prods available
>W2K quotas can be found with the Windows Exploder -select
disk--> right
quote:
>click-->properties--> Quota tab
>
>"Dave K" <anonymous@.discussions.microsoft.com> wrote in
message
quote:|||Here's how I do it.
>news:048f01c3dc3c$46938f90$a001280a@.phx.gbl...
this[QUOTE]
could[QUOTE]
>
>.
>
I scan my SQL instances to run xp_fixeddrives to get free
disk space for each hard drive and check each to see
whether it's below a threshold. If yes, I raise a SQL
error of severity 17. My errorlog monitoring setup will
pick it up from there and page the DBAs.
Of course, this can be consistently done with a NetIQ
configuration as well.
Linchi
quote:|||I put together this vbs file and run it from task scheduler, works for me.
>--Original Message--
>I would like SQL Server (7 and 2K) to alert me when disk
>space drops to a preset level. Is there a way to do this
>using sql agent alerts? I looked at the alerts that are
>pre-defined, they are more DB oriented. If someone could
>point me to some examples it would be appreciated.
>Dave K.
>.
>
'*****************************
'Monitors Drive Space and emails if below threshhold
'Application Variables
On error resume next
'Application Variables
Dim sEmailFrom, sEmailTo, sMyMailServer, sDriveC, sDriveD, sBodyText,
sSubject
sEmailFrom = "support@.assoft.com.au"
sEmailTo = "support@.assoft.com.au"
sConEmailMonitor = "dgrover@.assoft.com.au"
sMyMailServer = "assoftsvr"
iEmailPort = 25
'Does drive C: or D: have less than 3 gigabyte free if so email support
sDriveC = RetDriveSpace("c:\")
sDriveD = RetDriveSpace("d:\")
If Trim(sDriveC & sDriveD) <> "" Then
sBodyText = "CokeShop Hard Drive Storage, is getting low on space" & vbcrlf
& _
"Please rectify this problem Urgently" & VbCrLf & VbCrLf & _
"Drive C: =" & sDriveC & " Drive D: =" & sDriveD & VbCrLf &
VbCrLf & _
"Automated email from CokeShop System " & VbCrLf &
FormatDateTime(Now,1)
sSubject = "CokeShop Drive space low !!!"
SendEmail sSubject,sBodyText
End If
Function RetDriveSpace(drvpath)
Dim fso, d, s
Set fso = CreateObject("Scripting.FileSystemObject")
Set d = fso.GetDrive(fso.GetDriveName(fso.GetAbsolutePathName(drvpath)))
If FormatNumber(d.AvailableSpace/(1024 * 1000000), 1) < 3 Then
s = FormatNumber(d.AvailableSpace/(1024 * 1000000), 1)
End If
RetDriveSpace = s
Set fso = Nothing
Set d = Nothing
End Function
Function SendEmail(sSubJect, sBody)
'***************************************
***************
'*** Send the message Using CDOSYS Win2k & Win2003 ****
'***************************************
***************
' CDO mail object
sch = "http://schemas.microsoft.com/cdo/configuration/"
Set cdoConfig = CreateObject("CDO.Configuration")
cdoConfig.Fields.Item(sch & "sendusing") = 2
cdoConfig.Fields.Item(sch & "smtpserverport") = iEmailPort
cdoConfig.Fields.Item(sch & "smtpserver") = sMyMailServer
cdoConfig.fields.update
Set cdoMessage = CreateObject("CDO.Message")
Set cdoMessage.Configuration = cdoConfig
cdoMessage.From = sEmailFrom
cdoMessage.To = sEmailTo
cdoMessage.BCC = sConEmailMonitor
cdoMessage.Subject = sSubJect
cdoMessage.TextBody = sBody
'
cdoMessage.item("http://schemas.microsoft.com/cdo/configuration/smtpauthenti
cate").value = 1 ' use clear text authenticate
'
cdoMessage.item("http://schemas.microsoft.com/cdo/configuration/sendpassword
").value ="mypassword"
'
cdoMessage.item("http://schemas.microsoft.com/cdo/configuration/sendusername
").value ="yourusername"
cdoMessage.Fields.Item("urn:schemas:mailheader:X-MSMail-Priority") =
"High"
cdoMessage.Fields.Item("urn:schemas:mailheader:X-Priority") = 2
cdoMessage.Fields.Item("urn:schemas:mailheader:Keywords") = "COKESHOP"
cdoMessage.Fields.Item("urn:schemas:mailheader:Sensitivity") =
"Company-Confidential"
cdoMessage.Fields.Item("urn:schemas:mailheader:X-Message-Flag") = "Do
not Forward"
cdoMessage.Fields.Update
cdoMessage.Send
Set cdoMessage = Nothing
Set cdoConfig = Nothing
End Function
'*****************************
Regards
Don Grover
"Dave K" <anonymous@.discussions.microsoft.com> wrote in message
news:048f01c3dc3c$46938f90$a001280a@.phx.gbl...
quote:sql
> I would like SQL Server (7 and 2K) to alert me when disk
> space drops to a preset level. Is there a way to do this
> using sql agent alerts? I looked at the alerts that are
> pre-defined, they are more DB oriented. If someone could
> point me to some examples it would be appreciated.
> Dave K.
No comments:
Post a Comment