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!

DB_VERSION_MISMATCH error every day

534850Sep 27 2006 — edited Sep 29 2006

Every day when I run my test.pl program for the first time, I see this:

DbEnv::open: DB_VERSION_MISMATCH: Database environment version mismatch in test.pl,
line 35

The docs say that this error means "The version of the Berkeley DB library doesn't match the version that created the database environment". But I haven't changed my BDB XML installation.

If I delete all the files in my test database directory and reload my test data, everything is fine. I can run my test program again and again all day long. But when I come in next morning, I get the error! This is the code I'm using:

    my $ENVIRONMENT = 'test-env';
    my $ENV_FLAGS   = Db::DB_CREATE | Db::DB_INIT_LOCK | Db::DB_INIT_LOG
                        | Db::DB_INIT_MPOOL | Db::DB_INIT_TXN;
    my $env = new DbEnv;
    x eval { $env->open($ENVIRONMENT, $ENV_FLAGS, 0) };

'x' is just a function that traps the exception. Line 35 is the line with the open() call.
Does anybody know what I'm doing wrong?

Thanks, Dave

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 27 2006
Added on Sep 27 2006
8 comments
1,820 views