Q: I have a database in my lab environment that I don't back up. How can I stop the transaction logs from growing on my SQL Server 2012 install?

A: In a typical SQL Server database, the transaction logs keep growing until a backup is performed, which truncates the log files. It's logical not to delete transaction logs until a backup, because in the case of a database corruption or loss, the last backup could be restored and all the transaction logs replayed to get the database back to the current state with no loss (which is why the database and log files should always be on different disks).

In a lab environment where backups aren't performed and the data isn't critical, it might be preferable to simply automatically truncate the log files to keep disk space minimized.

To do this, use SQL Server Management Studio to set the recovery model of the database to Simple. Just right-click the database you want to set the recovery model for, and select Properties. Select the Options page and change the Recovery model to Simple (see screen shot below).