﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / Discuss Content Posted by Mark Nash / Article Discussions / Article Discussions by Author  / Monitoring Drive and Database Free Space / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Sat, 25 May 2013 02:27:59 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Monitoring Drive and Database Free Space</title><link>http://www.sqlservercentral.com/Forums/Topic122188-179-1.aspx</link><description>Hello,Thank you for the code, the only problem I am having with this is the:from msdb..DASDwhat table is that? where did you get that from, its throwing the error message 'invalid object name 'msdb..DASD'thanks again</description><pubDate>Thu, 14 Jun 2012 09:03:04 GMT</pubDate><dc:creator>Siten0308</dc:creator></item><item><title>RE: Monitoring Drive and Database Free Space</title><link>http://www.sqlservercentral.com/Forums/Topic122188-179-1.aspx</link><description>hey Mark,I read this Article and i am trying to implement it, however the Report is coming up with the database name only. 1. How do i get all the information in the database. 2. How do i go about changing the date to run lets say Tuesday at 1:00 PM in the sp_DASD_Report.sql. Thanks in advance</description><pubDate>Thu, 27 Aug 2009 16:02:38 GMT</pubDate><dc:creator>merchiem</dc:creator></item><item><title>RE: Monitoring Drive and Database Free Space</title><link>http://www.sqlservercentral.com/Forums/Topic122188-179-1.aspx</link><description>Hi ThereI'm also trying to get this to work in SQL 2005 and am struggling. If anyone has documented what needs to change in the scripts for this to work in the 2005 environment that would be great!Thanks in advance.</description><pubDate>Thu, 13 Nov 2008 08:21:06 GMT</pubDate><dc:creator>jim.smith</dc:creator></item><item><title>RE: Monitoring Drive and Database Free Space</title><link>http://www.sqlservercentral.com/Forums/Topic122188-179-1.aspx</link><description>I have installed this into our TEST environment and when I execute the dbo.sp_Monitor_Capture_DB_Space_Info procedureMsg 8152, Level 16, State 2, Line 1String or binary data would be truncated.The statement has been terminated.Msg 8152, Level 16, State 14, Procedure sp_Monitor_Capture_DB_Space_Info, Line 105String or binary data would be truncated.The statement has been terminated.Msg 8152, Level 16, State 14, Procedure sp_Monitor_Capture_DB_Space_Info, Line 146String or binary data would be truncated.The statement has been terminated.Msg 8152, Level 16, State 2, Line 1String or binary data would be truncated.The statement has been terminated.Msg 8152, Level 16, State 14, Procedure sp_Monitor_Capture_DB_Space_Info, Line 105String or binary data would be truncated.The statement has been terminated.Msg 8152, Level 16, State 14, Procedure sp_Monitor_Capture_DB_Space_Info, Line 146String or binary data would be truncated.The statement has been terminated.Msg 8115, Level 16, State 2, Line 1Arithmetic overflow error converting expression to data type int.The statement has been terminated.Msg 8152, Level 16, State 2, Line 1String or binary data would be truncated.The statement has been terminated.Msg 8152, Level 16, State 14, Procedure sp_Monitor_Capture_DB_Space_Info, Line 105String or binary data would be truncated.The statement has been terminated.Msg 8152, Level 16, State 14, Procedure sp_Monitor_Capture_DB_Space_Info, Line 146String or binary data would be truncated.The statement has been terminated.I receive the below errors when I execute the sp_HH_MSSQL_Recovery_Info procedureMsg 208, Level 16, State 1, Procedure sp_HH_MSSQL_Recovery_Info, Line 56Invalid object name 'master..sysfiles1'.And finally when I run the DASD_report , there is no size data (probably because the other procedures failed to populate completely)Any assistance in</description><pubDate>Mon, 27 Oct 2008 16:54:13 GMT</pubDate><dc:creator>Dave Myers-429047</dc:creator></item><item><title>RE: Monitoring Drive and Database Free Space</title><link>http://www.sqlservercentral.com/Forums/Topic122188-179-1.aspx</link><description>Hi Chunghow will i execute your script?!?;phow can i view the results.. thanks</description><pubDate>Tue, 03 Jun 2008 19:08:09 GMT</pubDate><dc:creator>paksyeet</dc:creator></item><item><title>RE: Monitoring Drive and Database Free Space</title><link>http://www.sqlservercentral.com/Forums/Topic122188-179-1.aspx</link><description>Hello All, Can you tell me if the procedures need update for SQL Server 2005?</description><pubDate>Wed, 27 Feb 2008 02:31:02 GMT</pubDate><dc:creator>k.przewozniak</dc:creator></item><item><title>RE: Monitoring Drive and Database Free Space</title><link>http://www.sqlservercentral.com/Forums/Topic122188-179-1.aspx</link><description>Good morning everyone,I want to implement jobs from the article. With first one I had no problem - Drive Space Monitoring - however my job with the database space info is failing. When I run manually one by one there is no problem, when I start a job then the second step (Capture Space Info on all DBs) finishes with the error message"[i]String or binary data would be truncated. [SQLSTATE 22001] (Error 8152)  The statement has been terminated. [SQLSTATE 01000] (Error 3621).  The step failed.[/i]Do you have any ideas what can cause the problem? I run it under SQL Server 2005Regards, Kasia11.01.08I have turned off ANSI WARNINGS by using the following SET command: SET ANSI_WARNINGS OFF. Now job runs with success, however I am not sure if I am not missing any data..</description><pubDate>Thu, 10 Jan 2008 08:37:45 GMT</pubDate><dc:creator>k.przewozniak</dc:creator></item><item><title>RE: Monitoring Drive and Database Free Space</title><link>http://www.sqlservercentral.com/Forums/Topic122188-179-1.aspx</link><description>The links to the Stored Procs are broken. Does anybody stil have the code or a new link to the SP's</description><pubDate>Mon, 08 Oct 2007 06:32:27 GMT</pubDate><dc:creator>Andries Vermaak-433333</dc:creator></item><item><title>RE: Monitoring Drive and Database Free Space</title><link>http://www.sqlservercentral.com/Forums/Topic122188-179-1.aspx</link><description>yes i have thesame problem overhere, none of the links are working rightnow, whats up?</description><pubDate>Wed, 11 Apr 2007 03:55:00 GMT</pubDate><dc:creator>Bannji Kumoye</dc:creator></item><item><title>RE: Monitoring Drive and Database Free Space</title><link>http://www.sqlservercentral.com/Forums/Topic122188-179-1.aspx</link><description>it seems that none of the links in the article are working.. could you please fix... thanks</description><pubDate>Tue, 10 Apr 2007 13:38:00 GMT</pubDate><dc:creator>Hagop Hagopian</dc:creator></item><item><title>RE: Monitoring Drive and Database Free Space</title><link>http://www.sqlservercentral.com/Forums/Topic122188-179-1.aspx</link><description>&lt;P&gt;Hi Rcarlson ,&lt;/P&gt;&lt;P&gt;Thanks for the VB script.  It works great for me.  I took the liberty to parametize the server name so that I can use for multiple servers and drives.  (Sorry Aaron Myers, I am one step ahead of you.)  Here is the modified script:&lt;/P&gt;&lt;P&gt;' Returns drive size results to an HTML file.On Error Resume Next' HTML codingconst H_HEAD = "&amp;lt;HTML&amp;gt;&amp;lt;HEAD&amp;gt;"const T_HEAD = "&amp;lt;TITLE&amp;gt;STATUS REPORT&amp;lt;/TITLE&amp;gt;&amp;lt;/HEAD&amp;gt;"const B_HEAD = "&amp;lt;BODY BACKGROUND=one.jpg&amp;gt;&amp;lt;CENTER&amp;gt;&amp;lt;H3&amp;gt;SERVER DISK SPACE UTILIZATION REPORT - - DATE:  "const H_CLOSE = "&amp;lt;/CENTER&amp;gt;&amp;lt;/BODY&amp;gt;&amp;lt;/HTML&amp;gt;"' HTML TABLE CODESconst S_TABLE = "&amp;lt;TABLE BORDER=4 CELLPADDING=3&amp;gt;"const T_TABLE = "&amp;lt;TR&amp;gt;&amp;lt;TH&amp;gt;FILE NAME&amp;lt;/TH&amp;gt;&amp;lt;TH&amp;gt;STATUS&amp;lt;/TH&amp;gt;&amp;lt;/TR&amp;gt;"const E_TABLE = "&amp;lt;/TABLE&amp;gt;&amp;lt;BR&amp;gt;"' HTML SUCCESS OR FAILURE CODEconst F_SUCCESS = "&amp;lt;TD ALIGN=CENTER&amp;gt;&amp;lt;FONT COLOR=GREEN&amp;gt;OK&amp;lt;/FONT&amp;gt;&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;"const F_FAILED = "&amp;lt;TD ALIGN=CENTER BGCOLOR=WHITE&amp;gt;&amp;lt;FONT COLOR=RED SIZE=+1&amp;gt;&amp;lt;B&amp;gt;FAILED&amp;lt;/B&amp;gt;&amp;lt;/FONT&amp;gt;&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;"' Conversion codes Bites to Megabytes and 2000 megabytes thresholdconst CONVERSION_FACTOR = 1048576const WARNING_THRESHOLD = 2000&lt;/P&gt;&lt;P&gt;Set objFSO = CreateObject("Scripting.FileSystemObject")Set objNewFile = objFSO.CreateTextFile("statusSize.htm")objNewFile.WriteLine H_HEADobjNewFile.WriteLine T_HEADobjNewFile.WriteLine B_HEAD &amp;amp; Now() &amp;amp; "&amp;lt;/H3&amp;gt;"objNewFile.WriteLine S_TABLE&lt;/P&gt;&lt;P&gt;'*** Start building display rows ***objNewFile.WriteLine "&amp;lt;TR&amp;gt;&amp;lt;TD&amp;gt;SERVER&amp;lt;/TD&amp;gt; &amp;lt;TD&amp;gt;DRIVE&amp;lt;/TD&amp;gt; &amp;lt;TD&amp;gt;DESC&amp;lt;/TD&amp;gt; &amp;lt;TD&amp;gt;Total Size MB&amp;lt;/TD&amp;gt; &amp;lt;TD&amp;gt;FREE MB&amp;lt;/TD&amp;gt; &amp;lt;TD&amp;gt;STATUS&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;"&lt;/P&gt;&lt;P&gt;'--- Enter as many server names and drives as you like ---Call BuildRow("servername", "C:", "Windows")&lt;/P&gt;&lt;P&gt;objNewFile.WriteLine "&amp;lt;TR&amp;gt;&amp;lt;/TR&amp;gt;"Call BuildRow("servername", "E:", "Application")'-------------------------------------------------------&lt;/P&gt;&lt;P&gt;objNewFile.WriteLine E_TABLEobjNewFile.WriteLine H_CLOSE&lt;/P&gt;&lt;P&gt;const MAXIMIZE_WINDOW = 3Set objNetwork = Wscript.CreateObject("Wscript.Network")Set objShell = Wscript.CreateObject("Wscript.Shell")objShell.Run "statusSize.htm", MAXIMIZE_WINDOW&lt;/P&gt;&lt;P&gt;STOP&lt;/P&gt;&lt;P&gt;Sub BuildRow(pvsComputer, pvsDriveLetter, pvsDriveDesc)Dim FreeMegaBytesDim SizeMegaBytesDim objWMIServiceDim colProcessesDim objLogicalDisk&lt;/P&gt;&lt;P&gt; Set objWMIService = GetObject("winmgmts:\\" &amp;amp; pvsComputer) Set colProcesses = objWMIService.ExecQuery _  ("SELECT * FROM Win32_Process")  '-- Drive Letter -- '------------------ Set objLogicalDisk = objWMIService.Get("Win32_LogicalDisk.DeviceID='" &amp;amp; pvsDriveLetter &amp;amp; "'") FreeMegaBytes = objLogicalDisk.FreeSpace / CONVERSION_FACTOR SizeMegaBytes = objLogicalDisk.Size / CONVERSION_FACTOR If FreeMegaBytes &amp;lt; WARNING_THRESHOLD Then     strColor = "RED" Else     strColor = "YELLOW" End If  objNewFile.WriteLine "&amp;lt;TR  BGCOLOR=" &amp;amp; strColor &amp;amp; " &amp;gt;" objNewFile.WriteLine "&amp;lt;TD&amp;gt;" &amp;amp; pvsComputer &amp;amp; "&amp;lt;/TD&amp;gt;" objNewFile.WriteLine "&amp;lt;TD&amp;gt;" &amp;amp; pvsDriveLetter &amp;amp; "&amp;lt;/TD&amp;gt;" objNewFile.WriteLine "&amp;lt;TD&amp;gt;" &amp;amp; pvsDriveDesc &amp;amp; "&amp;lt;/TD&amp;gt;" objNewFile.WriteLine "&amp;lt;TD&amp;gt;" &amp;amp; Int(SizeMegaBytes) &amp;amp; "&amp;lt;/TD&amp;gt;" objNewFile.WriteLine "&amp;lt;TD&amp;gt;" &amp;amp; Int(FreeMegaBytes) &amp;amp; "&amp;lt;/TD&amp;gt;" If strColor = "RED" Then     objNewFile.WriteLine "&amp;lt;TD&amp;gt;" &amp;amp; "LOW" &amp;amp; "&amp;lt;/TD&amp;gt;" Else     objNewFile.WriteLine "&amp;lt;TD&amp;gt;" &amp;amp; "OK" &amp;amp; "&amp;lt;/TD&amp;gt;" End If objNewFile.WriteLine "&amp;lt;/TR&amp;gt;" '*** End building display rows ***End Sub&lt;/P&gt;</description><pubDate>Fri, 25 Aug 2006 12:21:00 GMT</pubDate><dc:creator>chung-327878</dc:creator></item><item><title>RE: Monitoring Drive and Database Free Space</title><link>http://www.sqlservercentral.com/Forums/Topic122188-179-1.aspx</link><description>&lt;P&gt;Hi Mark,&lt;/P&gt;&lt;P&gt;It works. Running DBCC UPDATEUSAGE works.&lt;/P&gt;&lt;P&gt;Thank you very much for your script, and for your help.&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Henrik Staun Poulsen&lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description><pubDate>Mon, 22 Aug 2005 07:58:00 GMT</pubDate><dc:creator>Henrik Staun Poulsen-237657</dc:creator></item><item><title>RE: Monitoring Drive and Database Free Space</title><link>http://www.sqlservercentral.com/Forums/Topic122188-179-1.aspx</link><description>Aaron, I use nagios, http://www.nagios.org, webmin, http://www.webmin.com, and nagmin http://nagmin.sourceforge.net. It is extensible, free, cross platform, and very powerful. It takes a little getting used configs to, the can get ugly. I use nagmin to manage my configs but after a bit of reading i'm sure you can make it work for you.</description><pubDate>Fri, 22 Jul 2005 09:30:00 GMT</pubDate><dc:creator>Tory Skyers</dc:creator></item><item><title>RE: Monitoring Drive and Database Free Space</title><link>http://www.sqlservercentral.com/Forums/Topic122188-179-1.aspx</link><description>&lt;P&gt;Hi Mark,&lt;/P&gt;&lt;P&gt;Thank you very much for writing back to me, even just before I go on holiday (today) as well. I have tried DBCC UPDATEUSAGE (dbname) locally, and found problems, so I expect that I'll find problems on the client site as well.&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Henrik&lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description><pubDate>Fri, 22 Jul 2005 06:25:00 GMT</pubDate><dc:creator>Henrik Staun Poulsen-237657</dc:creator></item><item><title>RE: Monitoring Drive and Database Free Space</title><link>http://www.sqlservercentral.com/Forums/Topic122188-179-1.aspx</link><description>&lt;P&gt;Hello Henrik,&lt;/P&gt;&lt;P&gt;Sorry for the slow response, been on vacation since  7/2/05.&lt;/P&gt;&lt;P&gt;Whenever we get negative numbers for free_DB_Space there has been a problem with sysindexes.  Try running DBCC UPDATEUSAGE (dbname) and see if you get positive numbers..&lt;/P&gt;</description><pubDate>Thu, 21 Jul 2005 08:56:00 GMT</pubDate><dc:creator>markenash</dc:creator></item><item><title>RE: Monitoring Drive and Database Free Space</title><link>http://www.sqlservercentral.com/Forums/Topic122188-179-1.aspx</link><description>&lt;P&gt;Mark,&lt;/P&gt;&lt;P&gt;I'm getting a negative free_DB_Space for two of our databases. When running these two queries:   select size, maxsize 'maxsize' from sysfiles where (status &amp;amp; 64 = 0) compute sum(size) select sum(reserved) 'totalreserved'  from [sysindexes] where indid in (0, 1, 255) I get &lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New"&gt;size        maxsize     ----------- ----------- 319872      -19600000     -1109120      -19487992     -1&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New"&gt;===========19516984&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New"&gt;totalreserved ------------- 20830649&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;So the sum from sysindexes is bigger than sysfiles. Is this because we're using filegroups on these databases?&lt;/P&gt;&lt;P&gt;TIA&lt;/P&gt;&lt;P&gt;Henrik Staun Poulsen, Denmark&lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description><pubDate>Wed, 06 Jul 2005 03:08:00 GMT</pubDate><dc:creator>Henrik Staun Poulsen-237657</dc:creator></item><item><title>RE: Monitoring Drive and Database Free Space</title><link>http://www.sqlservercentral.com/Forums/Topic122188-179-1.aspx</link><description>I totally agree, Mark's monitor is great for efficiently tracking individual DB's inside SQL. I get a little nervous modifying MSDB or running XP procedures so there is a little tweaking I may do there to isolate the security and data.Tory, what is the open source system monitor you are using? I've been playing around with Perfmon logging directly to SQL, and building some of my own ASP.NET to tie the data together in web pages. http://aaronsmyers.blogspot.com/2005/04/nlogger-update.htmlIf there is already something out there to help, by all means I'd like to give it a try. MOM is just too expensive to justify for most of our servers/applications.</description><pubDate>Fri, 01 Jul 2005 09:51:00 GMT</pubDate><dc:creator>Aaron Myers</dc:creator></item><item><title>RE: Monitoring Drive and Database Free Space</title><link>http://www.sqlservercentral.com/Forums/Topic122188-179-1.aspx</link><description>I'm an SQL newbie but very familiar w/ os level scripting, WMI can be costly be careful where and when you use it! &lt;img src='images/emotions/smile.gif' height='20' width='20' border='0' title='Smile' align='absmiddle'&gt;. Your script is great btw, i use a similar script locally on some servers to monitor and kick out to an opensource system monitor however i've found that certain WMI queries can be taxing on systems. Using a native to the db call on the system the db is running on in theory should be less costly cpu/resource wise than using wmi. Then there is wmi security, network transport security etc, all of which you avoid by using the db system service to run the queries. On a semi-related note, did you use wbemtest to find the properties of the disk device? I've been having some trouble locating particular wmi attribute detail. Do you know if sql publishes info via wmi? </description><pubDate>Fri, 01 Jul 2005 09:30:00 GMT</pubDate><dc:creator>Tory Skyers</dc:creator></item><item><title>RE: Monitoring Drive and Database Free Space</title><link>http://www.sqlservercentral.com/Forums/Topic122188-179-1.aspx</link><description>Thanks for the script Rcarlson! It doesn't quite do the same thing but it is more useful in general (non sql server administration). I think I'll parameterize the inputs so there will be nothing hardcoded inside the script.</description><pubDate>Fri, 01 Jul 2005 07:57:00 GMT</pubDate><dc:creator>Aaron Myers</dc:creator></item><item><title>RE: Monitoring Drive and Database Free Space</title><link>http://www.sqlservercentral.com/Forums/Topic122188-179-1.aspx</link><description>&lt;P&gt;Good morning rscarlson,&lt;/P&gt;&lt;P&gt;Our space monitoring system was presented in the article for review and evaluation by fellow DBA's. Those that deemed it useful were free to install all or part of it at their sites. This system fits our institutions needs for space management.&lt;/P&gt;&lt;P&gt;You have developed your own system for space management, we are glad it fulfills your sites needs.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description><pubDate>Fri, 06 Aug 2004 08:15:00 GMT</pubDate><dc:creator>markenash</dc:creator></item><item><title>RE: Monitoring Drive and Database Free Space</title><link>http://www.sqlservercentral.com/Forums/Topic122188-179-1.aspx</link><description>&lt;P&gt;I found this an easier approach&lt;/P&gt;&lt;P&gt;I run the following batch file at logon:&lt;/P&gt;&lt;P&gt;cscript status.vbsrem pause&lt;/P&gt;&lt;P&gt;The status.vbs is as below, you need admin access, the name of the computer and a drive mapped to same, and the drive letter of the drive you want to read the size of.  This returns a web page with the drive size in mega bytes and alerts if less than 2 gigabytes (the threshold = 2000).   I monitor several databases with this script and the web page shows at a glance potential trouble spots (just repeat the code for other dbs).&lt;/P&gt;&lt;P&gt;' Returns drive size results to an HTML file.On Error Resume Next' HTML codingconst H_HEAD = "&amp;lt;HTML&amp;gt;&amp;lt;HEAD&amp;gt;"const T_HEAD = "&amp;lt;TITLE&amp;gt;STATUS REPORT&amp;lt;/TITLE&amp;gt;&amp;lt;/HEAD&amp;gt;"const B_HEAD = "&amp;lt;BODY BACKGROUND=one.jpg&amp;gt;&amp;lt;CENTER&amp;gt;&amp;lt;H3&amp;gt;STATUS REPORT - - DATE:  "const H_CLOSE = "&amp;lt;/CENTER&amp;gt;&amp;lt;/BODY&amp;gt;&amp;lt;/HTML&amp;gt;"' HTML TABLE CODESconst S_TABLE = "&amp;lt;TABLE BORDER=4 CELLPADDING=3&amp;gt;"const T_TABLE = "&amp;lt;TR&amp;gt;&amp;lt;TH&amp;gt;FILE NAME&amp;lt;/TH&amp;gt;&amp;lt;TH&amp;gt;STATUS&amp;lt;/TH&amp;gt;&amp;lt;/TR&amp;gt;"const E_TABLE = "&amp;lt;/TABLE&amp;gt;&amp;lt;BR&amp;gt;"' HTML SUCCESS OR FAILURE CODEconst F_SUCCESS = "&amp;lt;TD ALIGN=CENTER&amp;gt;&amp;lt;FONT COLOR=GREEN&amp;gt;OK&amp;lt;/FONT&amp;gt;&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;"const F_FAILED = "&amp;lt;TD ALIGN=CENTER BGCOLOR=WHITE&amp;gt;&amp;lt;FONT COLOR=RED SIZE=+1&amp;gt;&amp;lt;B&amp;gt;FAILED&amp;lt;/B&amp;gt;&amp;lt;/FONT&amp;gt;&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;"' Conversion codes Bites to Megabytes and 2000 megabytes thresholdconst CONVERSION_FACTOR = 1048576const WARNING_THRESHOLD = 2000&lt;/P&gt;&lt;P&gt;strComputer = "."Set objWMIService = GetObject("winmgmts:\\" &amp;amp; strComputer)Set colProcesses = objWMIService.ExecQuery _ ("SELECT * FROM Win32_Process")Set objFSO = CreateObject("Scripting.FileSystemObject")Set objNewFile = objFSO.CreateTextFile("statusSize.htm")objNewFile.WriteLine H_HEADobjNewFile.WriteLine T_HEADobjNewFile.WriteLine B_HEAD &amp;amp; Now() &amp;amp; "&amp;lt;/H3&amp;gt;"objNewFile.WriteLine "&amp;lt;FONT COLOR=PURPLE&amp;gt;&amp;lt;B&amp;gt;DATABASE SPACE ON DRIVE &lt;FONT color=#ff1111&gt;E&lt;/FONT&gt;:&amp;lt;/B&amp;gt;&amp;lt;/FONT&amp;gt;"objNewFile.WriteLine S_TABLEComputer = "&lt;FONT color=#ff1111&gt;ComputerName&lt;/FONT&gt;"Set objWMIService = GetObject("winmgmts://" &amp;amp; Computer)Set objLogicalDisk = objWMIService.Get("Win32_LogicalDisk.DeviceID='&lt;FONT color=#ff1111&gt;e&lt;/FONT&gt;:'")    FreeMegaBytes = objLogicalDisk.FreeSpace / CONVERSION_FACTOR    If FreeMegaBytes &amp;lt; WARNING_THRESHOLD Then        objNewFile.WriteLine "&amp;lt;TR&amp;gt;&amp;lt;TD BGCOLOR=WHITE&amp;gt;&amp;lt;FONT COLOR=RED SIZE=+1&amp;gt;&amp;lt;B&amp;gt;INADEQUATE&amp;lt;/B&amp;gt;&amp;lt;/FONT&amp;gt;&amp;lt;/TD&amp;gt;"        objNewFile.WriteLine "&amp;lt;TD BGCOLOR=WHITE&amp;gt;Actual Space " &amp;amp; Int(FreeMegaBytes) &amp;amp; " Megabytes.&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;"    Else       objNewFile.WriteLine "&amp;lt;TR&amp;gt;&amp;lt;TD BGCOLOR=CCFFCC&amp;gt;ADEQUATE&amp;lt;/TD&amp;gt;"       objNewFile.WriteLine "&amp;lt;TD BGCOLOR=CCFFCC&amp;gt;Actual Space " &amp;amp; Int(FreeMegaBytes) &amp;amp; " Megabytes.&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;"End IfobjNewFile.WriteLine E_TABLEobjNewFile.WriteLine H_CLOSE&lt;/P&gt;&lt;P&gt;const MAXIMIZE_WINDOW = 3Set objNetwork = Wscript.CreateObject("Wscript.Network")Set objShell = Wscript.CreateObject("Wscript.Shell")objShell.Run "statusSize.htm", MAXIMIZE_WINDOW&lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description><pubDate>Fri, 06 Aug 2004 06:54:00 GMT</pubDate><dc:creator>rscarlson</dc:creator></item><item><title>RE: Monitoring Drive and Database Free Space</title><link>http://www.sqlservercentral.com/Forums/Topic122188-179-1.aspx</link><description>&lt;P&gt;Good morning Sree,&lt;/P&gt;&lt;P&gt;I am sorry to hear you have had problems. Here are the points I check first.&lt;/P&gt;&lt;P&gt;If the dates on the report are all '20201225' (December 25, 2020) then you are just reporting the 'separator' row. I put in this row just to create a break between databases. I figured I would never be using this system in 2020 :-)&lt;/P&gt;&lt;P&gt;- Do a TSQL select on the DASD table and just make sure there are rows in it other than the above separator rows.&lt;/P&gt;&lt;P&gt;- We run the job that populates the DASD table once daily, between 04:00 and 04:59 on all servers. We found that reporting on all days of the week was too much detailed information for a general report, so we limited it to just report DASD rows created on Friday between 04:00 - 04:59. &lt;/P&gt;&lt;P&gt;Possibly the issue in the  'insert into #DASDRpt' statement.  The 'select' in this statement was designed to only select rows created on &lt;/P&gt;&lt;P&gt;1) Friday  "datepart(dw,(convert(....)))) = 6" &lt;/P&gt;&lt;P&gt;2) created during hour '04'  "substring(createDTM,9,2) = '04'"&lt;/P&gt;&lt;P&gt;If you have not scheduled the job that creates DASD rows to run at least on Friday between 04:00 - 04:59 you will not return any rows.&lt;/P&gt;&lt;P&gt;If the date, time selects are the issue, modify the report sql as you wish.&lt;/P&gt;&lt;P&gt;Let me know if this information helps, if not we will look further!!&lt;/P&gt;</description><pubDate>Tue, 13 Jul 2004 05:52:00 GMT</pubDate><dc:creator>markenash</dc:creator></item><item><title>RE: Monitoring Drive and Database Free Space</title><link>http://www.sqlservercentral.com/Forums/Topic122188-179-1.aspx</link><description>&lt;P&gt;I have followed all steps but couldn't able to produce the report when i ran sp_DASD_Report it only shows servername and list of databases on that particular server.&lt;/P&gt;&lt;P&gt;Is there anyting need to be modified for the given code?&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description><pubDate>Mon, 12 Jul 2004 19:09:00 GMT</pubDate><dc:creator>Sree-121435</dc:creator></item><item><title>RE: Monitoring Drive and Database Free Space</title><link>http://www.sqlservercentral.com/Forums/Topic122188-179-1.aspx</link><description>&lt;FONT face="Times New Roman" size=3&gt;Awsome. Thanks, Steve. Can you also change my vote to "Excellent" for me? &lt;/FONT&gt;</description><pubDate>Thu, 01 Jul 2004 08:58:00 GMT</pubDate><dc:creator>Joan OBryan</dc:creator></item><item><title>RE: Monitoring Drive and Database Free Space</title><link>http://www.sqlservercentral.com/Forums/Topic122188-179-1.aspx</link><description>Apologies!My fault. Mark asked me to link it in and I forgot &lt;img src='images/emotions/sad.gif' height='20' width='20' border='0' title='Sad' align='absmiddle'&gt;. It's up there now.</description><pubDate>Thu, 01 Jul 2004 07:32:00 GMT</pubDate><dc:creator>Steve Jones - SSC Editor</dc:creator></item><item><title>RE: Monitoring Drive and Database Free Space</title><link>http://www.sqlservercentral.com/Forums/Topic122188-179-1.aspx</link><description>&lt;FONT face="Times New Roman" size=3&gt;This article is a good read, but would be much more useful if the rest of the code was included.&lt;/FONT&gt;</description><pubDate>Thu, 01 Jul 2004 07:21:00 GMT</pubDate><dc:creator>Joan OBryan</dc:creator></item><item><title>RE: Monitoring Drive and Database Free Space</title><link>http://www.sqlservercentral.com/Forums/Topic122188-179-1.aspx</link><description>Some stored procedures were missed, likeEXEC msdb..sp_Monitor_Capture_DB_Space_InfoEXEC msdb.dbo.sp_Monitor_Email_Low_DB_FreeSpace 0.1EXEC msdb..sp_MSSQL_Recovery_Info</description><pubDate>Thu, 01 Jul 2004 01:56:00 GMT</pubDate><dc:creator>Kishore.P</dc:creator></item><item><title>RE: Monitoring Drive and Database Free Space</title><link>http://www.sqlservercentral.com/Forums/Topic122188-179-1.aspx</link><description>&lt;P&gt;Where's the beef? Most of the code to utilize this outstanding monitoring system is not included! Please make source available. &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description><pubDate>Wed, 30 Jun 2004 23:06:00 GMT</pubDate><dc:creator>Fred Salchli</dc:creator></item><item><title>Monitoring Drive and Database Free Space</title><link>http://www.sqlservercentral.com/Forums/Topic122188-179-1.aspx</link><description>Comments posted to this topic are about the content posted at &lt;A HREF=http://www.sqlservercentral.com/columnists/mnash/monitoringdriveanddatabasefreespace.asp&gt;http://www.sqlservercentral.com/columnist</description><pubDate>Mon, 21 Jun 2004 13:39:00 GMT</pubDate><dc:creator>markenash</dc:creator></item></channel></rss>