dbTalk Databases Forums  

Anyone know how to activate logging?

comp.databases.berkeley-db comp.databases.berkeley-db


Discuss Anyone know how to activate logging? in the comp.databases.berkeley-db forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
carpe_diem
 
Posts: n/a

Default Anyone know how to activate logging? - 02-01-2005 , 08:33 PM






Dear all,

I am trying to get my program to activate transactional logging so that
when a transaction performs an operation (put, get, etc..) information
is written to log.*. I use INIT_LOG in dbenv.open() but it doesn't
work. I ran every single example in example_cxx/ and none creates and
writes to a log. I am swamped and tired. Plz help. Basically what I
want is feed Berkeley DB's scheduler with a number of transactions and
I want to see the outputted schedule from the scheduler in log or
somewhere so that I can verify it's really using 2PL. Please help.
Thanks in advance~


Reply With Quote
  #2  
Old   
Michael Cahill
 
Posts: n/a

Default Re: Anyone know how to activate logging? - 02-01-2005 , 10:17 PM






You'll want DB_INIT_TXN and db_printlog to see what's in the log.

Try excxx_tpcb, for example. Run it first as:

excxx_tpcb -i

which will initialize databases without creating logs, then:

excxx_tpcb -n 1000
which will execute 1000 transactions.

Regards,
Michael.


Reply With Quote
  #3  
Old   
carpe_diem
 
Posts: n/a

Default Re: Anyone know how to activate logging? - 02-02-2005 , 12:33 AM



First of all I gotta thank you for your generous help. I did exactly
what you suggested but I got "Berkeley DB library configured to support
only DB_PRIVATE environemtns" error without it doing anything (it's
TpcbExample.cpp in my directory). Is there an easy way to fix it?
Thanks a bunch.


Reply With Quote
  #4  
Old   
carpe_diem
 
Posts: n/a

Default Re: Anyone know how to activate logging? - 02-02-2005 , 12:35 AM



First of all I gotta thank you for your generous help. I did exactly
what you suggested but I got "Berkeley DB library configured to support
only DB_PRIVATE environemtns" error without it doing anything (it's
TpcbExample.cpp in my directory). Is there an easy way to fix it?
Thanks a bunch.


Reply With Quote
  #5  
Old   
Michael Cahill
 
Posts: n/a

Default Re: Anyone know how to activate logging? - 02-02-2005 , 01:31 AM



This indicates that Berkeley DB was configured with mutexes that can't
be shared between processes. If you're on an older x86 Linux system,
the solution is to configure Berkeley DB with
"--with-mutex=x86/gcc-assembly".

Alternatively, if you don't need multi-process access to environments,
add DB_PRIVATE to the DB_ENV->open call.

Regards,
Michael.


Reply With Quote
  #6  
Old   
carpe_diem
 
Posts: n/a

Default Re: Anyone know how to activate logging? - 02-04-2005 , 07:56 PM



I can't thank you enough for your generous help. Take care~


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.