| Author |
Alert: When DB 80% full or when used space > xxxxMb
|
|
|
| I have a DB that is @ 360Mb; I want to size it at 500Mb (one unfragmented
and contiguous block) and disable the auto-grow feature.
This much I can do...
However, I need an Alert creating that will warn me when the DB space is
nearly used up... This is where I'm lost.
The nearest Performance Condition I can see is - SQL Server: Databases\Data
File(s) Size(s) Kb > xxxx Mb, however this is size of the reserved space and
not how much is used. With Transaction Log files its easy - use % Log File
Used, but there is no data equivalent...
Any ideas?
| |
| John F. 2002-10-30, 10:23 am |
| I've used DBCC SHOWFILESTATS and compared the used extents with total
extents.
I have a procedure that performs this on all databases and produces a report
for me. I can send it to you if you would like. I'm sure there are others
similar to it.
"CJM" <cjmwork@yahoo.co.uk> wrote in message
news:ebOnMuCgCHA.2620@tkmsftngp09...
> I have a DB that is @ 360Mb; I want to size it at 500Mb (one unfragmented
> and contiguous block) and disable the auto-grow feature.
>
> This much I can do...
>
> However, I need an Alert creating that will warn me when the DB space is
> nearly used up... This is where I'm lost.
>
> The nearest Performance Condition I can see is - SQL Server:
Databases\Data
> File(s) Size(s) Kb > xxxx Mb, however this is size of the reserved space
and
> not how much is used. With Transaction Log files its easy - use % Log File
> Used, but there is no data equivalent...
>
> Any ideas?
>
>
| |
|
| If you could send that to me that would be great... thanks
I must say I am curious as why there isnt a ready built method.... but there
you go...
Thanks
cjmwork@ya-nospam-hoo.co.uk
| |
| Tibor Karaszi 2002-10-31, 5:23 am |
| You could use sp_dbm_warn_if_full_db.sql at http://www.dbmaint.com/utilproc.html, and then
configure an alert for the error message (or modify the proc to do xp_sendmail instead of
RAISERROR).
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=...ublic.sqlserver
"CJM" <cjmwork@yahoo.co.uk> wrote in message news:eWIIKoDgCHA.2532@tkmsftngp09...
> If you could send that to me that would be great... thanks
>
> I must say I am curious as why there isnt a ready built method.... but there
> you go...
>
> Thanks
>
> cjmwork@ya-nospam-hoo.co.uk
>
>
|
|
|
|