Save this Script as .vbs
Then from command line
cscript /nologo scriptname.vbs
pp2170,
2010-05-27 (first published: 2009-04-17)
Save this Script as .vbs
Then from command line
cscript /nologo scriptname.vbs
strComputer = "." Set objWMIService = GetObject _ ( "winmgmts:\\" & strComputer & "\root\cimv2") Set colItems = objWMIService.ExecQuery _ ("Select * From Win32_Volume Where DriveType = 3" ) For Each objItem In colItems iSpc = cDbl(objItem.FreeSpace) ispc1 = cDbl(objItem.Capacity) WScript.Echo objItem.Label, "Drive", "has", FormatiSpc(iSpc) & "GB Free OF Volume size: " & FormatiSpc(iSpc1) & "GB" Next Function FormatiSpc(intSpace) intSpace = intSpace/1024 intSpace = intSpace/1024 intSpace = intSpace/1024 intSpace= FormatNumber(intSpace,1) FormatiSpc = intSpace end Function
The second part of Steve Jones's series on having SQL Server automatically report information to a DBA.
2003-12-25
13,017 reads
In this article by Robert Marda, he shows you how to detect and correct deadlocks.
2002-02-19
8,336 reads
Running a script automatically from SQL Server is easier than you think. Here are a few methods you can use.
2001-10-17
15,842 reads
Have you ever worked with an application that forgot to close its connections? Ever run out of connections on your SQL Server and had to manually go remove the ones that are not in use? This article will present a technique for keeping the database clean.
2001-05-07
5,088 reads
The eighth part of Steve Jones's series on having SQL Server automatically report information to a DBA.
2001-04-29
6,627 reads