MSSQLSERVER_3159

New: 12 December 2006

Details

Product Name

SQL Server

Product Version

9.0

Product Build Number

9.00.1399

Event ID

3159

Event Source

MSSQLSERVER

Component

SQLEngine

Symbolic Name

LDDB_LOGNOTBACKEDUP

Message Text

The tail of the log for the database "%ls" has not been backed up. Use BACKUP LOG WITH NORECOVERY to back up the log if it contains work that you do not want to lose. Use the WITH REPLACE or WITH STOPAT clause of the RESTORE statement to just overwrite the contents of the log.

Explanation

In most cases, under the full or bulk-logged recovery models, SQL Server 2005 requires that you back up the tail of the log to capture the log records that have not yet been backed up. A log backup taken of the tail of the log just before a restore operation is called a tail-log backup.

When you are recovering a database to the point of a failure, the tail-log backup is the last backup of interest in the recovery plan. If you cannot back up the tail of the log, you can recover a database only to the end of the last backup that was created before the failure.

SQL Server 2005 usually requires that you take a tail-log backup before you start to restore a database. The tail-log backup prevents work loss and keeps the log chain intact. However, not all restore scenarios require a tail-log backup. You do not have to have a tail-log backup if the recovery point is included in an earlier log backup, or if you are moving or replacing (overwriting) the database. Also, if the log files are damaged and a tail-log backup cannot be created, you must restore the database without using a tail-log backup. Any transactions committed after the latest log backup are lost. For more information, see "Restoring Without Using a Tail-Log Backup," later in this topic.

Warning

REPLACE should be used rarely, and only after careful consideration.

User Action

Take a tail-log backup, and retry the restore operation.

If you cannot back up the tail of the log, use WITH STOPAT or WITH REPLACE in your RESTORE statements.

See Also

Other Resources

Restoring a Database to a Point Within a Backup
Using the REPLACE Option
How to: Back Up the Transaction Log When the Database Is Damaged (Transact-SQL)
How to: Back Up a Transaction Log (SQL Server Management Studio)
Tail-Log Backups

Help and Information

Getting SQL Server 2005 Assistance