Hi I want restore database from backup file so i have used the following command

restore database myTestDbName from disk ='C:\temp\mybackuo.bak'

while executing the command I got following error

"The tail of the log for the database "myTestDbName" 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. RESTORE DATABASE is terminating abnormally."

To get the back up of data base i used following command

backup database myTestDbName to disk ='c:\temp\mybackuo.bak' with init,stats=10

Please reply me as soon as possible.



  • the error message gives you the answer to your problem – Nick Kavadias Oct 13 '10 at 0:31

This is really a question for ServerFault, but the documentation is quite clear about what the error means and what action you need to take:


See also here:


In your case, if you really do want to overwrite the existing database, you need to specify WITH REPLACE.

| improve this answer | |

You have the solution to your problem in your question. :-

The problem is that you have an existing database log that you need to backup before you restore the database.

You can either do the command Backup Log with NoRecovery, then you will be able to restore your DB


If you want to overwrite this log you can use the with backup log with replace or with stopat clauses.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy