Link to home
Start Free TrialLog in
Avatar of novicedbaUK
novicedbaUK

asked on

Restore database

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
ASKER CERTIFIED SOLUTION
Avatar of Anthony Perkins
Anthony Perkins
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial