Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Drive Space Monitoring Gets An Update


Drive Space Monitoring Gets An Update

Author
Message
Raunak Jhawar
Raunak Jhawar
Ten Centuries
Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)

Group: General Forum Members
Points: 1095 Visits: 1944
A WMI Query can also be used for the same

Regards/Raunak
Now a member of Linkedin

Please visit the all new Performance Point Forum
Please visit the all new Data Mining and Business Analytics Forum
Lyn Duong
Lyn Duong
Grasshopper
Grasshopper (14 reputation)Grasshopper (14 reputation)Grasshopper (14 reputation)Grasshopper (14 reputation)Grasshopper (14 reputation)Grasshopper (14 reputation)Grasshopper (14 reputation)Grasshopper (14 reputation)

Group: General Forum Members
Points: 14 Visits: 235
Hi, we use mountpoints in our clustered SQL instance. I think it would be great to include this into your scripts
shaun.stuart
shaun.stuart
SSCommitted
SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)

Group: General Forum Members
Points: 1994 Visits: 846
I've updated the Powershell portion of this routine to collect the total disk free space amount for the drives SQL Server uses. this also requires adding one column to the DatabaseDiskStats table. Details can be found at my blog: http://shaunjstuart.com/archive/2010/11/drive-space-monitoring-gets-an-update-update This should allow you to have better insight into your disk space usage.

Sorry, still no mount point support - I don't have a configuration I can use for testing that.

Shaun
shaun.stuart
shaun.stuart
SSCommitted
SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)

Group: General Forum Members
Points: 1994 Visits: 846
I just wanted to let people know I found a bug in the stored procedure portion of this that may result in the @@SERVERNAME system variable being set to NULL after a restart on the machine this routine is executed on. Details and a fix are at http://shaunjstuart.com/archive/2011/01/drive-space-monitoring-gets-an-update-bug-fix. Not sure if this is due to a bug in the sp_dropserver system stored procedure or if it is by design.
Eugene.Teh
Eugene.Teh
Forum Newbie
Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)

Group: General Forum Members
Points: 9 Visits: 88
I believe there's a bug with the sproc, where if the @servername starts with a number, e.g. "1SQLServer", the following error would be thrown.

Msg 102, Level 15, State 1, Line 13
Incorrect syntax near '1'.
Msg 102, Level 15, State 1, Line 13
Incorrect syntax near '1'.

(0 row(s) affected)
shaun.stuart
shaun.stuart
SSCommitted
SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)

Group: General Forum Members
Points: 1994 Visits: 846
Eugene - I am unable to duplicate this issue. I created a VM named 1SQLSVR, installed SQL 2008 R2 on it, and loaded my routines. Everything worked correctly.
Eugene.Teh
Eugene.Teh
Forum Newbie
Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)

Group: General Forum Members
Points: 9 Visits: 88
That's odd, it worked correctly for me with servers without numbers in front, but not if there were numbers. Could you send me a link to your routines? Maybe I'm using a different version of your sproc.
shaun.stuart
shaun.stuart
SSCommitted
SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)

Group: General Forum Members
Points: 1994 Visits: 846
Sure. The latest version can always be found here: http://shaunjstuart.com/archive/2011/07/drive-space-monitoring-page/
Eugene.Teh
Eugene.Teh
Forum Newbie
Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)

Group: General Forum Members
Points: 9 Visits: 88
Thanks Shaun! The latest script works without error.

How do you normally display the data in a report? I'm currently running the sproc without using the powershell script.
shaun.stuart
shaun.stuart
SSCommitted
SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)

Group: General Forum Members
Points: 1994 Visits: 846
I created an SSRS report that reads the data table and makes graphs off of that.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search