1760111 Members
4033 Online
108890 Solutions
New Discussion юеВ

SQL Restore Errors

 
DASmania Cool
New Member

SQL Restore Errors

I have a little problem guys, any help will be very gratefull, here's the case:

I have these backup files :

- FullTLM_Full_25122005_0000.bak ( SQL Full Backup every 1 week )
- FullTLM_Diff_26122005_0030.bak until FullTLM_Diff_30122005_0030.bak ( SQL Differential Backup every 1 day )
- FullTLM_Log_25122005_0100.bak until FullTLM_Log_30122005_1100.bak ( SQL Log Backup every 2 hours )

I want to restore my database to 30 December 2005 at 09:00. I've run these sequence of restore :
------------------------------------------------------------------------------------------------

restore database fulltlm30
from disk = 'D:\TestLog\FullTLM_Full_25122005_0000.bak'
with norecovery,
move 'FullTLM_Data' to 'C:\Program Files\Microsoft SQL Server\MSSQL\Data\FullTLM30.mdf',
move 'FullTLM_Log' to 'C:\Program Files\Microsoft SQL Server\MSSQL\Data\FullTLM30_Log.mdf'
go

restore database fulltlm30
from disk = 'D:\TestLog\FullTLM_Diff_26122005_0030.bak'
with norecovery,
move 'FullTLM_Data' to 'C:\Program Files\Microsoft SQL Server\MSSQL\Data\FullTLM30.mdf',
move 'FullTLM_Log' to 'C:\Program Files\Microsoft SQL Server\MSSQL\Data\FullTLM30_Log.mdf'
go

restore database fulltlm30
from disk = 'D:\TestLog\FullTLM_Diff_27122005_0030.bak'
with norecovery,
move 'FullTLM_Data' to 'C:\Program Files\Microsoft SQL Server\MSSQL\Data\FullTLM30.mdf',
move 'FullTLM_Log' to 'C:\Program Files\Microsoft SQL Server\MSSQL\Data\FullTLM30_Log.mdf'
go

restore database fulltlm30
from disk = 'D:\TestLog\FullTLM_Diff_28122005_0030.bak'
with norecovery,
move 'FullTLM_Data' to 'C:\Program Files\Microsoft SQL Server\MSSQL\Data\FullTLM30.mdf',
move 'FullTLM_Log' to 'C:\Program Files\Microsoft SQL Server\MSSQL\Data\FullTLM30_Log.mdf'
go

---------------------------------------------------------
This sequence work perfectly, but when i run this query :
---------------------------------------------------------

restore database fulltlm30
from disk = 'D:\TestLog\FullTLM_Diff_29122005_0030.bak'
with norecovery,
move 'FullTLM_Data' to 'C:\Program Files\Microsoft SQL Server\MSSQL\Data\FullTLM30.mdf',
move 'FullTLM_Log' to 'C:\Program Files\Microsoft SQL Server\MSSQL\Data\FullTLM30_Log.mdf'
go

----------------------------------------
error happened with this error message :
----------------------------------------

Server: Msg 3136, Level 16, State 1, Line 1
Cannot apply the backup on device 'D:\TestLog\FullTLM_Diff_29122005_0030.bak' to database 'fulltlm30'.
Server: Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.

------------------------------------------------------------------------------------------------------------------------------------
i also try to restore to date 30 december and receive same error message, and then i try to restore the log file, i run this query :
------------------------------------------------------------------------------------------------------------------------------------

restore log fulltlm30
from disk = 'D:\TestLog\FullTLM_Log_28122005_0100.bak'
with norecovery,
move 'FullTLM_Data' to 'C:\Program Files\Microsoft SQL Server\MSSQL\Data\FullTLM30.mdf',
move 'FullTLM_Log' to 'C:\Program Files\Microsoft SQL Server\MSSQL\Data\FullTLM30_Log.mdf'
go

...
...
... until

restore log fulltlm30
from disk = 'D:\TestLog\FullTLM_Log_30122005_0900.bak'
with recovery,
move 'FullTLM_Data' to 'C:\Program Files\Microsoft SQL Server\MSSQL\Data\FullTLM30.mdf',
move 'FullTLM_Log' to 'C:\Program Files\Microsoft SQL Server\MSSQL\Data\FullTLM30_Log.mdf'
go

-----------------------------
This sequence work perfectly.

All i want to know is the result between restoring each log until dec 30 09:00 has the same result with if I restore the
differential at dec 30 and then restore the log from dec 30 01:00 until dec 30 09:00. I also want to know why those errors happened.

Thank you very much
2 REPLIES 2
Joseph T. Wyckoff
Honored Contributor

Re: SQL Restore Errors

This properly belongs in a Microsoft / SQL forum - moving the question.
Omniback and NT problems? double check name resolution, DNS/HOSTS...
Igor Karasik
Honored Contributor

Re: SQL Restore Errors

Do restore of differential backup from 30
december and then apply all transaction log backups from 30 december.
You don't need to restore 26,27,28,29 differential backups, because differential backup from 30 december contains all these backups.
Regarding error: did you see any errors in SQL logs files and in event viewer?
Which SQL version you use ?