What Happens to Your Transaction Log in SIMPLE Recovery Model?

PASS Summit Unite 2009 Speaker Tip

SIMPLE recovery model causes SQL Server to truncate the transaction log every time a CHECKPOINT operation occurs.

Before SQL Server 2008, you could force a truncation with an option to the BACKUP LOG command:

BACKUP LOG <database_name> WITH TRUNCATE_ONLY

Starting in SQL Server 2008, however, this option is no longer available. If you want to truncate the log, the only way to do it is to switch your database to SIMPLE recovery. But because the log is regularly being truncated, you cannot take backups of the transaction log. In order to make log backups, you need to start with a full database backup and then keep an unbroken chain of log backups, so a truncation of the log will disallow log backups.

In addition, if you have never performed a full database backup, you can’t make log backups, so the database will behave as if you are in SIMPLE recovery. You will be in a mode called auto_truncate, and even though the recovery model might be FULL, your log will be truncated every time a CHECKPOINT occurs.

Read more from Kalen about her Nov. 2 PASS Summit 2009 pre-conference seminar, "Care and Feeding of the Transaction Log."


Editor's Note: SQL Server Magazine would like to thank PASS for providing this technical tip.

Please or Register to post comments.

IT/Dev Connections

Las Vegas
September 30th - October 4th

Paul ThurottOur Experts will show you:
• Common SQL Server
Problems
• Best Practices for T-SQL
• SQL Server Integration
Services
• Database Development

Come See Mike Otey & Tim Ford in Person!

Early Registration Now Open

From the Blogs
May 9, 2013
blog

My ISO 8601-Compliant Signature 2

My family recently just "officially" announced that we're in the process of adopting a child from South Africa. We're quite excited, of course, but there's a ton of paperwork to do—along with the need for gobs of signatures....More
May 8, 2013
blog

Use SSIS for ETL from Hadoop

In this blog post, Mark Kromer walks you through using SSIS as a way to use ETL techniques using Microsoft's Hadoop on Windows (HDInsight) as a source using Hive connectors...More
Vision road sign
May 6, 2013
blog

Cheaters Never Win, Even in TPC Benchmarks

In this portion of the series on database benchmarking, I want to tell you about one of my favorite aspects of the TPC benchmarks – CHEATING....More
SQL Server Pro Forums

Get answers to questions, share tips, and engage with the SQL Server community in our Forums.