Skip to Main Content

Berkeley DB Family

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

How do you know when to open an environment (DbEnv) with the DB_RECOVER flag?

User_S9HENDec 19 2022

I'm using the C++ BerkeleyDB API for an application.
Imagine that I open a new environment, start a new transaction, write something to the database using the transaction, and then kill the application before the transaction has been committed.
When I then re-open the database, any writes to the database will hang indefinitely, likely because there is a previous unfinished transaction. Opening the environment using the recovery flag solved the issue. How can I check if there are any of these unfinished transactions in order to know when to open the environment using the recovery flag?

Comments

Processing

Post Details

Added on Dec 19 2022
0 comments
288 views