Truncate Logs for All Databases in T-SQL

Sometimes, when developing, you don’t really want to worry about running out of space on your development SQL server. In that same development environment, it may not be important to preserve a transactional record of your test data. In that case, you can truncate transaction logs all you want.

This script has been tested only on Microsoft SQL Server 2005.

View the code snippet at GitHub.