Restore fails with tail of log error

For sql server 2005 and above, When you take a full backup of the FULL recovered database and try to restore earlier backup it may fail with following error

Msg 3159, Level 16, State 1, Line 1

The tail of the log for the database “restoretest” has not been backed up. Use BACKUP LOG WITH NORECOVERY to backup the log if it contains work 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.

Msg 3013, Level 16, State 1, Line 1

RESTORE DATABASE is terminating abnormally.

Error itself explains that the database is backuped up but not tail log backedup, due to which you cannot restore on that database.

There are two ways you can resotre on it

Create a tail log backup for that database no_truncate and then restore with old backup.

Make that database into “Simple” recovery model so that the transaction log chain will be break and sql server will allow you to restore.

This entry was posted in Backup and Restore, Transaction Log, Troubleshooting and tagged , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.