Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 2005
»
Administering
»
Need script that totals free disk space AND...
Need script that totals free disk space AND free space in files
Rate Topic
Display Mode
Topic Options
Author
Message
Indianrock
Indianrock
Posted Friday, December 28, 2012 6:06 AM
Mr or Mrs. 500
Group: General Forum Members
Last Login: Yesterday @ 5:25 AM
Points: 564,
Visits: 1,457
We have a number of ways, including Quest Spotlight in our case, to get either free space on the drives holding the data files, or the free space within the files, but no easy way to get both output in one query. It always includes manual editing of a spreadsheet to add up the two, and I think you really want both in addressing the need for more disk space -- for example you've created a new data file at 100GB and it starts out empty on a drive with 20GB free space. Before asking for more space you need to look at both, not just the 20GB free on disk.
Post #1400884
Steve Jones - SSC Editor
Steve Jones - SSC Editor
Posted Friday, December 28, 2012 10:26 AM
SSC-Dedicated
Group: Administrators
Last Login: Yesterday @ 6:14 PM
Points: 31,421,
Visits: 13,734
The problem is that you are asking for two fundamentally different things. I think you'd have to combine two scripts, perhaps though some union to get this.
Here's one:
http://www.sqlservercentral.com/scripts/Maintenance+and+Management/30881/
This might be the other.:
http://www.sqlservercentral.com/scripts/Database+Maintenance/94850/
Follow me on Twitter:
@way0utwest
Forum Etiquette: How to post data/code on a forum to get the best help
Post #1400972
SQLRNNR
SQLRNNR
Posted Friday, December 28, 2012 10:36 AM
SSCoach
Group: General Forum Members
Last Login: 2 days ago @ 1:07 PM
Points: 18,733,
Visits: 12,332
I think a powershell script would be your best friend for this kind of requirement.
Jason
AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server 2008
SQL RNNR
Posting Performance Based Questions - Gail Shaw
Posting Data Etiquette - Jeff Moden
Hidden RBAR - Jeff Moden
VLFs and the Tran Log - Kimberly Tripp
Post #1400975
Indianrock
Indianrock
Posted Friday, December 28, 2012 3:06 PM
Mr or Mrs. 500
Group: General Forum Members
Last Login: Yesterday @ 5:25 AM
Points: 564,
Visits: 1,457
Tried a few things including the suggested scripts from Steve. Since our production environment uses mount points and because sp_databases returns null for larger databases, etc etc, I'll probably just use our Quest spotlight tool. It will provide both disk free and free inside files, just not in one view. We only have one data file, which needs work, that has a substantial amount of free space in the file -- substantial meaning over 100GB, so free space on disk is probably good enough as something to watch, set up alerts, and request more disk space as needed.
Tried this powershell on our prod environment but it isn't reporting "inside" the mount points, just free space on the folder hosting the mount points.
Get-WmiObject -ComputerName Remoteserver -Class Win32_LogicalDisk | Select -Property DeviceID, @{Name=’FreeSpaceMB’;Expression={$_.FreeSpace/1MB} } | Format-Table -AutoSize
Post #1401077
SQLRNNR
SQLRNNR
Posted Friday, December 28, 2012 8:24 PM
SSCoach
Group: General Forum Members
Last Login: 2 days ago @ 1:07 PM
Points: 18,733,
Visits: 12,332
Here's one that is supposed to gather the mount point free space
http://www.powershellneedfulthings.com/?p=36
Jason
AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server 2008
SQL RNNR
Posting Performance Based Questions - Gail Shaw
Posting Data Etiquette - Jeff Moden
Hidden RBAR - Jeff Moden
VLFs and the Tran Log - Kimberly Tripp
Post #1401111
itsmemegamind
itsmemegamind
Posted Tuesday, January 22, 2013 5:18 AM
Grasshopper
Group: General Forum Members
Last Login: Monday, February 04, 2013 12:43 AM
Points: 10,
Visits: 45
For free space monitoring and alert lepide's & redgate having excellent tool
in case you can check them
http://www.sqlservermanagement.net/
http://www.red-gate.com/products/dba/sql-monitor/
Post #1409963
« Prev Topic
|
Next Topic »
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.