Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 

Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved scripts in your SSC briefcase from the favorites tab.
Download now (direct download link)

How much space could you get shrinking all databases

By Gonzalo Moles,

This is script is useful when you are short of space on a drive and you need to know how much space can you get shrinking your databases. Although is shrinking is not a recommended practice some times you need to get free space in your drive. Just execute the script and it will tell you the free space you can obtain.

You gan modify the line where[UsageType] = 'data'  to specify log or data files.

As well you can uncomment the line --where MB_Free < 5000 to specify drives with less than 'x mbytes'.

Total article views: 2553 | Views in the last 30 days: 13
 
Related Articles
FORUM

Whoops there goes more drive space

Drive space keeps disappearing

SCRIPT

Disk space alert per drive

This script validates the sufficient disk space per drive. When you'll reach a minimum on a diskdri...

FORUM

Missing Disk Space on Log Drive reappears after reboot

Rebooting reclaims GBs of space on Log Drive

BLOG

Drive Space

I found a cool series of scripts from Jeremiah Peschka on getting disk space from SQL Server. They’r...

FORUM

Getting Fixed Drives Total Space and Free Space by using SSIS package using WMI queries

Getting Fixed Drives Total Space and Free Space SSIS package using WMI queries

Tags
 
Contribute

Join the most active online SQL Server Community

SQL knowledge, delivered daily, free:

Email address:  

You make SSC a better place

As a member of SQLServerCentral, you get free access to loads of fresh content: thousands of articles and SQL scripts, a library of free eBooks, a weekly database news roundup, a great Q & A platform… And it’s our huge, buzzing community of SQL Server Professionals that makes it such a success.

Join us!

Steve Jones
Editor, SQLServerCentral.com

Already a member? Jump in:

Email address:   Password:   Remember me: Forgotten your password?
Steve Jones