Out of disk space…Log file grown too big?

It’s early in the morning, and you’ve got disk space problems… log file, right?  Yep.   OK, we need a script that will tell us what we need to know ASAP.  Since i experienced this issue multiple times…and since they always happened on Sunday morning…just before i was going to church (how much more inconvenient can it get?)…i created just such a script.  Using two CTE’s i first gather the information i need about the database data files, and then the database log files.  Since there can be multiple physical files for either type, i max and sum the needed values before grouping.  Then, i combine that data with sys.database information.  The result gives me almost all i need to know in a single picture…i’m ready then, with a simple “xp_fixeddrives” to get straight to fixing things. Continue reading “Out of disk space…Log file grown too big?”