Monday 29 June 2015


I came across a job the other day - it was called Check Disk Space.

A laudable aim - we should all check disk space every now and then, maybe even constantly if we have one of these magical monitoring systems that do everything.  This was actually an old legacy system, dating back to the Palaeolithic era of SQL Server 2000.

But the job was failing.  It had worked for years, and now it didn't work.  So I thought I should look inside it.  Turns out it was running a stored procedure called usp_check_disk_space or something like that - so far, so consistent.

So I thought I would have a look at this elderly stored procedure, which has been running for years and giving nobody any trouble.  and it seems it was running xp_fixeddrives to get the amount of free space on the drives, then writing it to a table, and then - er - truncating the table.




No comments:

Post a Comment