I need a script for sending mails to all DBA's if any db reaches to 90%...Could you please suggest any script for it...
asked Jul 19, 2012 at 08:39 AM in Default
For example you could alert on a given data size, if your databases are fixed size and not set to auto-grow.
If there is no alert suitable for your scenario, then maybe have a scheduled job that runs periodically and fires an email to your defined Operators, using
answered Jul 19, 2012 at 09:10 AM
Kev Riley ♦♦
Not sure you relate the DB Size to Data Files Size With/Without including Log files? Anyways, how about the following script to know the Data/Log files sizes and the space remining. You can use a CURSOR / LOOP to get all the databases information
Moreover, you can filter out some output using type column as used in the WHERE clause to return information about the DATA and Log files. Hope it helps.
answered Jul 19, 2012 at 09:48 AM