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)

Prevent DISK FULL when database grows

By Gonzalo Moles,

This procedure helps you to know when the database space free is over the @percent filled up and the disk space left is below  @M_free_high bigint OR the disk space left is below < @M_free_low

Example:  EXEC msdb.dbo.[get_space_free] 2000, 15000, 80 
This means 'Give me information of all databases filled at 80% capacity with less than 15 Mbytes (15 Gbytes) of disk space OR just all database drives with less than 2000 Mbytes (2 gbytes)'
Very useful to prevent DISK FULL when database grows.
This is the display: 

Total article views: 2443 | Views in the last 30 days: 33
 
Related Articles
FORUM

Sql 2000, Database don't have available space

Sql 2000, Database don't have avialable space

SCRIPT

Total Space Used for all databases per disk

Tells you how much the databases are using the space on disk taking in account the free space at the...

FORUM

Space for Database SQL Server 2005

After Truncate a table database not releasing the space.

ARTICLE

Monitoring Drive and Database Free Space

SQL Server will autogrow your databases as they run out of space. But the process doesn't manage spa...

BLOG

Space Used by Database Files

Retrieve data about size and space used for all the files in the current database with this script. ...

Tags
maintenance    
space    
 
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