One of my friends working on SQL Server 2000 to 2005 faced following issue.

Msg 3159, Level 16, State 1, Line 1
The tail of the log for the database “databasename” 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.

As mentioned in the error detail mentioned above, the backup failed because tail log backup is not available. The error message further states that to resolve overwrite the log by using WITH REPLACE/STOPAT option. The T-SQL to fix the error is given below



Ahmad Osama

Like us on FaceBook Join the fastest growing SQL Server group on FaceBook

Follow me on TwitterFollow me on FaceBook