|
|
Question : How do I recover a corrupted transaction log?
|
|
Dear Experts, during a scheduled backup using sybase dbbackup command ("d:\program files..\dbbackup -c "eng=xxx;dbn=xxx;uid=xxx;pwd=xxx" -y d:\..\daily -o c:\..\log\day_backup -x") I received this message: Disk Full 'Fatal error: c:\..\xxx.log' -- transaction rolled back To solve the problem I've made some extra space on the hard disk (300MB), but when I started the DB I getted the error message "Cannot open transaction log file --c:\..\..\file.log is not a database" Is there any way to start this DB? It seems that during the rollback, some error has occurred due to the disk out of space. Thaks.
|
Answer : How do I recover a corrupted transaction log?
|
|
The first action is to check if the transaction log could be translated into a sql script using the sybase utility "Translate Log Utility". If Yes, then run the script generated into the database, to update th db to the last check point. If the transaction log could not be translated becuase the file is corrupted, detete the log file and then run the "Change log file settings" sybase utility to recreate the transaction log. In this case you will lose the data of the corrupted transaction log. For this reason, I will suggest these settings to manage log corruptions: 1) Set up a DB whith also a mirror log. 2) When a dbbackup is performed, use also the -x switch to delete and restart the transaction log. 3) Perform scheduled backups with a time interval depending on the amount of data that you will accept to lose
|
|
|
|
|