Quote:
At the end of the session, before exiting, my application performs a
checkpoint, closes db, and closes the environment. The environment is
configured to auto-remove logs. Despite that, one log file is always
present after application cleanly exits. |
There must be at least one log file even after the application exits
cleanly.
If you have active transactions in log files that have not ended
(either commit or abort) then those log files will not be archived
either.
db_stat -t can help you monitor this.
Quote:
It appears that simply moving this database file to another location
without an accompanying log file leads to corruption sometimes. Now,
the db4.4 has the DB_ENV->lsn_reset function to take care of this.
Is there anything I can do with earlier bsddb versions to this extent?
Is DB_ENV->remove going to reset the logs sequence number? Any solution
to make db portable on clean exit is greatly appreciated. |
In the Berkeley DB 4.3 release, you can use the -r option to
the db_load utility:
http://www.sleepycat.com/docs/utility/db_load.html
Alternatively, you can overwrite the first 8 bytes of all of
the database pages with nul bytes.
https://iweb.sleepycat.com/db/4.2.52...nsapp/faq.html
Ron Cohen
Berkeley DB
Oracle Corporation