Re: Database corrupted after power loss!
Fred Toussi <[email protected]>
| Newsgroups | gmane.comp.java.hsqldb.user |
|---|---|
| Message-ID | <[email protected]> |
Please also check there is no other change in the software, for example JDK version. In fact, using a .log file is much easier than you think. You need the setting SET FILES LOG SIZE 0 in your database to prevent automatic checkpoint. 1. You connect to a copy of the backup database and perform SHUTDOWN after it has processed its log file. This is called the "old database" 2. You change a line in the .properties file of the old database to "modified=yes" 3. You add the .log file from the latest database to the older database files. 4. You connect to the older database and perform SHUTDOWN after it has processed the new log. The database is now updated and usable. After checking it, you can back it up for the future. Fred On Thu, Nov 7, 2013, at 11:46, giri wrote: > Thank you for your reply.. > > Currently, we suspect faulty RAM module to be a source of our problems. > > We managed to recover a week old backup, which was not corrupted.. > > We also managed to recover .log files, which were filled by data during > the > last week. Files .backup from during last week are damaged and we can not > use those. > > Now the question is - is it reasonable to expect, that if we take week > old, > correct DB and apply all lines from all .log files created during this > week > (together over 20MB), we end up with current database? > > Do the .log files contain simply all SQL commands (changing some data) > performed since start of DB? > Our app does not use CHECKPOINT, Shutdown Compact nor any similar HSQLDB > specific functions, therefore if .log contains all changes since start, > it > should be possible to re-apply it on DB backed up just before that start, > correct? > > One problem is that .log files do not use "update" SQL functions, but > rather > "delete"&"insert".. > Currently we work on code that would transform those "delete"&"insert" > into > "update" queries, so we would not get into troubles with foreign keys > etc. > > What do you think about that? > > Thank you very much for your help, > Jan > > > > -- > View this message in context: > http://hsqldb.10974.n7.nabble.com/Database-corrupted-after-power-loss-tp3979p3981.html > Sent from the HSQLDB - User mailing list archive at Nabble.com. > > ------------------------------------------------------------------------------ > November Webinars for C, C++, Fortran Developers > Accelerate application performance with scalable programming models. > Explore > techniques for threading, error checking, porting, and tuning. Get the > most > from the latest Intel processors and coprocessors. See abstracts and > register > http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk > _______________________________________________ > Hsqldb-user mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/hsqldb-user ------------------------------------------------------------------------------ November Webinars for C, C++, Fortran Developers Accelerate application performance with scalable programming models. Explore techniques for threading, error checking, porting, and tuning. Get the most from the latest Intel processors and coprocessors. See abstracts and register http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk