cancel
Showing results for 
Search instead for 
Did you mean: 

SQL restoring with transaction log

Sisso
Level 5

Hello,

I need some advise please.

 

We are running Symantec Netbackup 7.5.0.6 on windows server 2008 R2 SP1.
 

We got SQL server 2008 R2 that backup Full backup every two weeks and transaction log every hour.

Yesterday I received a request to restore the database to month ago, so I chose for the restore the last full backup and all the transaction log until the requested date. Unfortunately it failed due to this following error:

ERR - Error in GetCommand: 0x80770004.
    CONTINUATION: - An abort request is preventing anything except termination actions.
DBMS MSG - ODBC return code <-1>, SQL State <37000>, SQL Message <4305><[Microsoft][ODBC SQL Server Driver][SQL Server]The log in this backup set begins at LSN 366151000000458700001, which is too recent to apply to the database. An earlier log backup that includes LSN 366151000000379700001 can be restored.>.
DBMS MSG - SQL Message <3013><[Microsoft][ODBC SQL Server Driver][SQL Server]RESTORE LOG is terminating abnormally.>
ERR - Error found executing <restore log "GVIYARST" from VIRTUAL_DEVICE='VNBU0-2828-356-1386781688' with  stats = 10, blocksize = 65536, maxtransfersize = 4194304, buffercount = 2, replace , norecovery>.
ERR - Error in VDS->Close: 0x80770004.

 

It seems that is trying to restore a recent transaction log after the DB is already restored to a later time point.

 

Thanks in advance for your help.

1 ACCEPTED SOLUTION

Accepted Solutions

Mark_Solutions
Level 6
Partner Accredited Certified

Very difficult to assist with this withoyt seeing exactly what you have selected

Could you show us a screen shot of your selections in the SQL Agent GUI

I assume your retention periods are all OK for the periods you are using - have to say i havent heard of anyone doing their full backups so far apart!

One other thought - do your backups ever fail (status 1 even) - if your SQL Admins do any SQL maintenance (backups) thenselves during this period it will put things out of sync and the logs will be invalidated

View solution in original post

4 REPLIES 4

Mark_Solutions
Level 6
Partner Accredited Certified

Very difficult to assist with this withoyt seeing exactly what you have selected

Could you show us a screen shot of your selections in the SQL Agent GUI

I assume your retention periods are all OK for the periods you are using - have to say i havent heard of anyone doing their full backups so far apart!

One other thought - do your backups ever fail (status 1 even) - if your SQL Admins do any SQL maintenance (backups) thenselves during this period it will put things out of sync and the logs will be invalidated

MKT
Level 5
Employee Accredited

I'd vote for what Mark indicated, there is most likely a DBA trx dump occuring regularily or during this sequence which means that the restore cannot be sequenced with just NetBackup data.  I'd review the event logs for a SQL backup to a disk target path.  If it's still around, you can load the trx from that dump and then apply the NetBackup ones as well.

The log in this backup set begins at LSN 366151000000458700001, which is too recent to apply to the database. An earlier log backup that includes LSN 366151000000379700001 can be restored.

Sisso
Level 5

Thank you MARK and MRT,

I found the problem, there was a problem in the diff backup policy, it was in deactivate and we didnt notice.

Moreover, there were full backups that took place on this DB that interrupt to the log sequence.

 

 

Mark_Solutions
Level 6
Partner Accredited Certified

Good stuff - if possible close the thread using the "Mark as solution" option on the suggestion that helped the most in solving your issue.