Solved

Failed DB Recovery - 'The tail of the log....'

Posted on 2008-10-07
2
731 Views
Last Modified: 2012-05-05
I'm testing database restores and every time I attempt to restore a full database backup I receive the following messge:

System.Data.SqlClient.SqlError: The tail of the log for the database "DataMartAZ" 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. (Microsoft.SqlServer.Smo)

What causes this?  The Full Backup operation performs fine with no errors, but on restore I get this.  Any advice is appreciated.
0
Comment
Question by:jobprojn
2 Comments
 
LVL 15

Accepted Solution

by:
jorge_toriz earned 250 total points
Comment Utility
BACKUP your database, then, BACKUP your log

RESTORE your database (with "WITH NORECOVERY" option) and then RESTORE your log
0
 

Author Comment

by:jobprojn
Comment Utility
Thanks.
0

Featured Post

Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

Join & Write a Comment

Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now