Ever been fighting corruption on a server you don’t usually have anything to do with and suddenly get a message that C-drive is running out of space? This happened to me today and not knowing the server I wasn’t sure if a very low amount of disk space on C-drive was normal or was something I was causing. As I watched it I could see it continue to drop about 5-8mb a time.
I couldn’t identify where it was going, and being a client server I wasn’t keen to download some third party tool on there to tell me, so I did it the old fashioned way and looked through a bunch of likely suspects. Eventually I checked with a colleague who went through roughly the same process before popping into the SQL log folder to check if there was huge logfiles being generated. They were reasonably big, but more importantly was that every time one of my corrupt databases was being accessed it was generating an 8MB dump file. There were 5-10 a minute being generated and the directory contained some 4000 of them. When I cleaned up those and moved off a couple of the larger error logs I was able to free up 15GB of space, and then taking the corrupted databases online and working on them one at a time reduced the buildup of stackdumps against the server to a manageable level.
When you are up to your ears in database corruption you don’t want to waste time dealing with not being able to open management studio properly etc because there is no disk space so hopefully this will be useful to someone. By default your SQL error logs directory is going to be:
Program Files\Microsoft SQL Server\MSSQL.n\MSSQL\LOG\ERRORLOG
If you see similar symptoms have a look in there, clear out what you aren’t going to need and then get back to beating that corruption!