December 28, 2013 at 4:59 pm
I would like a script/stored procedure to return me the used/free database space for a database so that this could serve as an ALERT counter.
e.g. Database size = 100MB. Space used = 40MB.
Prodcedure returns: Size = 100, Used = 40, %Used = 40%
I want to monitor the free space so that the server will automatically warn me if I run over 70% or 80% of my database size.
December 29, 2013 at 3:19 am
a
Søren,
MCITP SQL 2008 (administration / programming), MCITP SQL 2005 (BI), MCT
December 29, 2013 at 7:01 am
have a look at the article Allen White published a while ago: https://www.simple-talk.com/sql/backup-and-recovery/alert-based-transaction-log-backups---automate-your-database-maintenance-part-2/
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data/code to get the best help[/url]
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Need a bit of Powershell? How about this
Who am I ? Sometimes this is me but most of the time this is me
December 29, 2013 at 8:56 am
Thanks. Its involved .net code. It is hard to me.
December 29, 2013 at 9:23 am
Here's some code that might help from the SQL Monitor Metrics site. You have to implement your own scheduling and checking, but this will get you space.
http://sqlmonitormetrics.red-gate.com/percentage-of-free-log-space/
December 30, 2013 at 7:00 am
Mark Nash wrote a great "How to" right here on SSC
http://www.sqlservercentral.com/articles/Monitoring/monitoringdriveanddatabasefreespace/1415/
Chris Powell
George: You're kidding.
Elroy: Nope.
George: Then lie to me and say you're kidding.
December 30, 2013 at 12:36 pm
Thanks
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply