Error 4305 on log restore | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Error 4305 on log restore

Hi, Bit of a nightmare that i hope someone can help me with! I have set up the log shipping as described in the article, when run the backup,move and restore of the DB works fine, however when I run the log backup and restore stored proc I get the following error RESTORE LOG is terminating abnormally. [SQLSTATE 42000] (Error 3013) The log in this backup set begins at LSN 64026000000004300001, which is too late to apply to the database. An earlier log backup that includes LSN 57921000000200600001 can be restored. [SQLSTATE 42000] (Error 4305). Whats strange is that the last backup date on the standby keeps going to the 11th of august as the last one, this does not match with the primary or anything else on our system, I have reset the backups history and repeated the process and still get the same error! So basically, why does it pick this strange date and not the one from the last backup (db backup restore and move one that lists correctly in the primary Db’s properties) and is there a way round this error?
The error 4305 indicates that the restore operation found a gap between the last restore and the transaction log that you attempted to apply. So, to resolve this error you should restore transaction logs in the same order in which they were backed up or pause the log shipping jobs and restore full backup from primary server to the secondary server. Ensure there are no network issues between the servers. Satya SKJ
Moderator
http://www.SQL-Server-Performance.Com/forum
This posting is provided “AS IS” with no rights for the sake of knowledge sharing.
Thats what has really got me both jobs were run one after another, full backup move and restore job, immediately followed by the backup move and restore log(no other log backup ran in between these jobs) but the database on the standby then gets this date and asks for logs from 11th august(even when I delete the DB and start all over again, it seems to get this date when applying the full backup from the primary DB) the timestamp of the last full backup on the primary is the 19th august. There is no network issues between the servers as the full backup and restore works fine via the linked server. In fact everything works fine except the log restore. The logs its looking for dont exist, never have. this does not make sense to me! Why and where is the standby picking up this date? I have included below the details of the backup history of both servers primary
last database backup: 19-08-2004 22:32:25
last transaction log backup: 19-08-2004 22:32:25 standby
last database backup:11-08-2004 22:32:04
last transaction log backup:
and like I say the restore job on the standby last restores the backup from the primary that is dated 19-08-2004 22:32:25 but always comes back with the same date 11-08-2004 22:32:04 How can I change this before my head gets any more sore with all this wall hitting!! thanks in advance David T Abbott
I have exactly this kind of problem when restoring logs during log shipping process Server: Msg 3013, Level 16, State 1, Line 1
RESTORE LOG is terminating abnormally.
Server: Msg 4305, Level 16, State 1, Line 1
The log in this backup set begins at LSN 152000000345500001, which is too late to apply to the database. An earlier log backup that includes LSN 152000000269300001 can be restored.
Server: Msg 7221, Level 18, State 2, Line 1
Could not relay results of procedure ‘restore_log’ from remote server ‘TOPSUN’.
Will appreciate help Regards
Kwame
Check whether any network issues between primary and secondary servers. To overcome this the only resolution is to restore full backup from primary to secondary or restore logs from the last backup, then re-enable the log shipping process. Satya SKJ
Moderator
http://www.SQL-Server-Performance.Com/forum
This posting is provided “AS IS” with no rights for the sake of knowledge sharing.
Check if you are missing any file to restore. Otherwise the best solution is restore the full backup. You will get the last file restored from the system table. -Anup
]]>