At our organisation we have several non-Production environments where Developers run free and wild with TSQL code and databases. The DBA team do not normally monitor or maintain them. Recently several developers using one server have had to write procedures that throw around mountains of code such that their log files are growing to 10-20GB (on DBs approx 15-40GB) until they run out of space on the drive volume we have provided for the log files. The databases are all in Simple recovery mode and backups are (almost) never taken.
As a bandaid I've created a SQL Agent Job that can be run by anyone to shrink all user log files on the server.
What are some valid Log File Management strategies that might be used?
For example it is my understanding that as the users generally do a blitz of intensive work that checkpoints are probably being throttled back and that thus issuing manual checkpoints would see no advantage. Is that the case or should we in fact investigate adding manual checkpoints to their code?
And just to be clear it is log file space on disk we are interested in not space within the log file.
shrink all user log files on the server
- do you know how self-defeating this is? Shrink the files, let them grow, shrink the files, let them grow, this gets old very fast and is just a bunch of pointless busy work. You need to get a handle on the transactions that are blowing up the log and break them into smaller chunks. See this and this.