not a valid undo file | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

not a valid undo file

Hi, I’ve restored a database from backup, with STANDBY option. Now, when I’m trying to apply further Transaction logs to this database, the restore log command is failing with an error ‘File ‘d:standby.undo’ is not a valid undo file for database ‘xyz’, database ID 24. Please let me know how to I avoid this error and restore logs to this database.
Have you done multiple restores? Something I’ve noticed with Enterprise Manager is when it defaults in the file name and location for the undo file it doesn’t check that it already exists. If you select a file that does exist it just overwrites it. In the restore screen you can change the location and name as required. Try restoring the database again and then restoring a log before restoring another database.
Yes, I’ve done multiple restores through QA and used same undo file for all of them. And I thought that’s allowed because the UNDO file will be deleted anyway after each restore. Now, I don’t have the original backup file anymore. How can I restore more logs without restoring it from scratch ?

Have you specified the undo filename while using the STANDBY clause? What WITH STANDBY = ‘undo filename’ does is tell SQL Server to "recover" the database to a consistent state, so all uncommitted transactions will be rolled back. However, the file specified stores the actions that SQL Server took to roll back those transactions. If you want to apply another backup, SQL Server can undo the effects of the recovery process and continue applying backup files. 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.
Yes Satya, I did specify the undo filename with STANDBY clause. The problem is, I’ve specified the same file name for multiple restores of multiple databases.
So, it looks like the undo information has been over written and now I want to restore more logs into the first database. And I don’t have the full backup anymore. How to restore more logs without having a valid UNDO file ?

Ah, there is the problem and if you don’t want to use this restored databse then only option is to restore database WITH NORECOVERY and restore corresponding logs for updation. You can restore the differential backup after you restore the database if you’re sure that the damage occurred after you performed the differential backup. However, if you’re not sure when the damage occurred, using the individual log backups will give your restores better granularity so that you can work more slowly through smaller restore time frames. 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.
]]>