Transaction Logs

May 29, 2010

If you’re receiving backup copies of client databases, to do customizations or migrations on, and they haven’t been truncating their transaction logs, it’s not unusual for a restored database to have a 3 GB .log file attached to it.

Those can fill up the space on a VPC very quickly.

To shrink them down to size, right-click on the database in SSMS, and select Properties. In the Options section, set the Recovery model to Simple, and click OK.

Right-click on the database again in SSMS, and select Tasks -> Shrink -> Database. Click OK.

Voila. No more Gigabytes.