Workaround solution for Error 4305

sioman88sioman88 Posts: 4
edited December 16, 2011 11:26AM in SQL Backup Previous Versions
I am using full backup files and transaction log files (.sqb) to restore database on SQL Backup 6.4. However, there are days that we cannot recover neither the transaction log files nor the full backup file, which leads to the failure of the database restore.

As far as I tried, there is no way to restore a database when there is missing transaction log files in between, and I received error 4305 when doing so. I would like to know if there is any workaround solution to bypass this error. Maybe is there a way to generate a "dummy" transaction log for the missing day to just connect the LSN in the log files?

Thanks in advance. Really appreciate if someone can provide opinion or solution. :)

Comments

  • Eddie DEddie D Posts: 1,641 Rose Gold 5
    Thank you for your post into the forum and sorry that you have encountered a problem.

    As you know SQL Error 4305 indicates that you have a gap in the sequence of log files that you wish to restore.

    There can be a number reasons as to why this problem occurs and I have tried to list the most common problems I have seen reported to us at Red Gate Product Support:
      1. Another backup application has taken a log backup outside of the SQL Backup scheduled job you have configured. For example, a job previously disabled or not deleted using native backup has performed a log backup. Or someone has taken an Ad-Hoc backup of the database transaction log. If this the cause, you need identify where the log backup is located and restore manually in the correct sequence. 2. If Log Shipping, the log backup on the source database failed to copy to the network share, causing a gap to occur in the log backup sequence. To resolve locate the missing backup file and copying it to the network share manually. 3. Rare to occur, the log backup file created has no LSN information. So when restoring multiple log backup files, the LSN information is used to sort the files selected into the correct sequence. If this has occurred, the log backup file with the missing LSN information can still be restored but not part of a multiple file restore. You need to restore to the point when the file containing the missing LSN is next to be restored. Restore the backup file with the missing LSN on it's own and then continue restoring the with the remaining files.

    Unfortunately there is no workaround for this error as it comes from SQL Server itself and a SQL Backup Error, however there maybe other SQL Server and SQL Bcakup Exit codes that may help further identify the cause.

    Many Thanks
    Eddie
    Eddie Davis
    Product Support Engineer
    Redgate Software Ltd
    Email: [email protected]
  • Thank you for the information, Eddie.

    I found a post about exit code 680: http://www.red-gate.com/supportcenter/c ... 0903000366. And this issue seems to be similar to the situation I am having (restore failed due to LSN, although I am pretty sure they are different type of error).

    I followed the instruction on the post, which is "to restore them one at a time using WITH STANDBY in date order using the extended stored procedure. This will negate the need for the SQL Backup header and restore these troublesome files in order". However, I am still getting error 4305.

    So right now, I am going to try the second solution on the post, which is to use the SQBHeaderFix utility. Would you please let me know if SQBHeaderFix can fix the LSN in the .sqb files if I provide a disconnected backup set? Also, SQBHeaderFix only takes in non-encrypted files, does Red Gate has any standalone decrypt application that I can use?

    Thanks again.
  • This maybe totally unrelated to this issue, but I would also like to know if there is any RedGate tool/software to allow user read the data and the transaction detail in a transaction log file (.sqb)?
  • Eddie DEddie D Posts: 1,641 Rose Gold 5
    Thank you for your replies.

    SQL Backup Error 680, indicates that you did not specify all the files in a backup set. This problem occurs if you spilt a backup across multiple files and did not include all the files created when you performed the restore.

    I am unaware of the SQBHeader Fix Utility you have referred to. We have a utility that will check the File Header and extract the header information but it does not provide a fix.

    Are you sure that you do not have a native log backup job or another 3rd party backup tool still running?

    Or an Ad-Hoc backup that has been taken and the file is not available?

    If the 4305 error occurs after attemptting to restore the first log backup after successfully restoring the last full backup, try restoring the log backup created immediately before the full backup, as the first log backup to restore?

    As regards to this question:
    This maybe totally unrelated to this issue, but I would also like to know if there is any RedGate tool/software to allow user read the data and the transaction detail in a transaction log file (.sqb)?

    If your database is SQL 2000 you can try using a tool called SQL Log Rescue. Due to licensing restrictions we never developed the tool for use with SQL 2005 and 2008 databases. Idera had a product called Log Explorer but I do not have any information regaing this product or if it is still available.

    Many Thanks
    Eddie
    Eddie Davis
    Product Support Engineer
    Redgate Software Ltd
    Email: [email protected]
Sign In or Register to comment.