Shrink Database Log Files One by One


I have about 25-30 client databases on my computer for testing purposes when I support or do new development for them. Unfortunately, the databases were set up with simple recovery for some and full recovery for others. The simple recovery databases are not an issue for this purpose, but the full recovery databases have a tendency to grow in the log files and clog up my hard drive.

I had to continuously go and check which log files were bloated and shrink them till one day I decided to automate the process. Now I am not as sharp as some