on 2013 May 03 6:11 PM
I have a database that had an assertion failed. When I get the last backup and try to apply the LOG file I get a validation error. Come to find out the indexes on 6 tables needed to be rebuilt. The catch 22 is when I fix the indexes and try to apply the LOG, i get the message that the DB is newer and cannot apply log. Is there any way to force apply the LOG?
TIA,
Kevin
Request clarification before answering.
I don't think you would get a "validation error" (which I associate with running dbvalid) when applying a log. Exactly what error did you see?
You could try going to an even older backup and applying all logs since that backup.
Also, if you are content with the database with rebuilt indexes, you could translate the log (using dbtran) and apply the SQL against the database using dbisql.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In addition to what John said...
As you know, or have discovered, you can't apply log files out of order in recovery mode, which is what happens when you start a backup database normally and run new transactions (e.g., reorganize indexes), and then try to apply an old log file in recovery mode that has older transactions.
If possible, try starting over... and document EXACTLY what steps you take and EXACTLY what results and/or error messages you get so we can help.
If there are any differences between what you did (or are doing) and the following steps, please describe those differences as well.
Get (copy) the backup xxx.db file and the associated backup xxx.log file. Make copies so you can go back and start over if necessary.
Apply the copy of the backup xxx.log file in recovery mode to the copy of the backup xxx.db file via dbsrv12.exe xxx.db -a xxx.log
Get (copy) the recent xxx.log file that has the transactions up to when the assertion error. This assumes there are no OTHER log files between the one applied in step 2 and this one.
Apply the copy of the recent xxx.log file in recovery mode to the xxx.db file via dbsrv12.exe xxx.db -a xxx.log
Start the database normally (no -a xxx.log option).
You may find some ideas in the following blog posts:
April 1, 2011 Demonstrating Full and Incremental Backups
April 6, 2011 Quiz: Which log backups are required to restore a database?
April 8, 2011 Recovering Across Multiple Backup Generations
April 18, 2011 Answer: Which log backups are required to restore a database?
April 22, 2011 Validating Backups
April 25, 2011 Demonstrating Backup, Validation and Restore
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
54 | |
6 | |
6 | |
5 | |
5 | |
5 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.