Solved

Restore database

Posted on 2007-12-04
1
1,007 Views
Last Modified: 2012-06-27
I ma trying to restore a Microsoft SQL Server 2005 database (full and transaction log backup)

i ma using the following script

restore database xxxxxxx
from disk = '\\xxxxxxx\xxxxxxxx\xxxxxxxxx\xxxxxx_backup_200711302217.bak'
with norecovery;

restore database agrprod
from disk = '\\xxxxxxxx\xxxxxxx\xxxxxx\xxxxxx_backup_200712032007.trn'
with recovery

However, I am getting the following error


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


Msg 3117, Level 16, State 4, Line 5
The log or differential backup cannot be restored because no files are ready to rollforward.
Msg 3013, Level 16, State 1, Line 5
RESTORE DATABASE is terminating abnormally.


Please help as its urgent

Many thanks
0
Comment
Question by:novicedbaUK
1 Comment
 
LVL 75

Accepted Solution

by:
Anthony Perkins earned 125 total points
ID: 20405105
Well, which option do you want:
1. Use the WITH REPLACE or WITH STOPAT clause of the RESTORE statement to just overwrite the contents of the log. or
2. Backup the Transaction log again.

I suspect you want the first.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction: I have seen many questions on EE and elsewhere, asking about how to find either gaps in lists of numbers (id field, usually) ranges of values or dates overlapping date ranges combined date ranges I thought it would be a good …
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

759 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

18 Experts available now in Live!

Get 1:1 Help Now