Drive Space Monitoring Gets An Update

  • 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.

  • 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.

  • Sure. The latest version can always be found here: http://shaunjstuart.com/archive/2011/07/drive-space-monitoring-page/

  • 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.

  • I created an SSRS report that reads the data table and makes graphs off of that.

  • Browsing around on his home page, it looks like he lives in Arizona.

    So we (in Europe?) need to give him time to wake up. :hehe:

  • Ooops, just realized this is an old discussion...

  • Will this run ok on SQL 2012 or are there any updates to this to support SQL 2012?

  • Hi,

    After adding the database and then I run the power shell script but its shows an error - so please sugget error message is - "cannot be loaded because the execution of scripts is di

    sabled on this system"

  • My question is would your "monitor" be better off using:

    1. dynamically created & remotely executed openquery(s)

    2. using existing linked server coded (lazy DBA's need look no further this dude did it for you)

    3. using Service Broker queue based push approach via service broker based asynchronous messaging.

  • It should run OK on SQL 2012.

  • Pradeept - That sounds like a Windows security setting issue. It sounds like Windows is configured to not allow execution of PowerShell scripts. Check with your network guys and see if perhaps there is AD policy in place that prevents this.

  • Does this script handle mount points and C: drives on passive nodes in a cluster?

  • thadeushuck - Define "better off."

    1. That's your call. It depends on your environment. This is a monitoring routine that I run overnight during a period of little system activity. Performance is not an issue for me in this situation. If you are concerned about optimizing performance, sure, go ahead and use openquery.

    2. Not sure what you a referring to here.

    3. Service broker was not introduced until SQL 2005. My code is written so that is will also work with SQL 2000 servers, as I still have a handful of those in production.

  • It does not handle mount points. I do not have any servers utilizing those in my environment, so I have nothing to test against. Sorry.

    Have not tried it with C: drives on a passive node in a cluster, but it probably wouldn't work as-is because it assumes the server name in the server list table is running sql server. If you put a passive node machine name in there, other parts would fail. You could probably modify the server list table to add a machine name flag and have the PowerShell script check those drives, but have the T-SQL code portion ignore those entries. In that case, you've just created a disk space monitoring routine for all computers, not just SQL Servers 🙂

Viewing 15 posts - 46 through 60 (of 64 total)

You must be logged in to reply to this topic. Login to reply