dbTalk Databases Forums  

ERROR in DB

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


Discuss ERROR in DB in the comp.databases.berkeley-db forum.



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

Default ERROR in DB - 05-01-2006 , 05:50 PM






Hello,
i try used berkeleyDB version 4.1.25 in BTREE mode and after crash
system.
I want read data from database, via db_dump and i get this errors:
----------------------------------------------------------------
db_dump: fatal region error detected; run recovery
db_dump: tiket_h.db: metadata page checksum error
db_dump: tiket_h.db: unexpected file type or format
db_dump: open: test.db: Unknown error: -1
---------------------------------------------------------------
When I try read some data from database via used cursor i get error
'(dbenv->open(): DB_RUNRECOVERY: Fatal error, run database recovery
(fatal region error detected; run recovery))' in 'db->open' function.
I try switch-off test function(__db_chk_meta) for checking meta in
"berkeley-4.1.25/db/db_open.c:line 438" via putting "return 0;" on
after start this function. And after this db_dump say same error, bad
via open->cursor->cursor_get(DB_NEXT) i read i think every entry from
database.

I want you ask how can i dump this database without this change in
berkeley-db function?
Thank you for yours answers


Reply With Quote
  #2  
Old   
Alex
 
Posts: n/a

Default Re: ERROR in DB - 05-01-2006 , 08:02 PM






Have you tried db_dump with the -r or -R recovery flags?
http://www.sleepycat.com/docs/utility/db_dump.html

- Alex


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

Default Re: ERROR in DB - 05-02-2006 , 06:13 AM



Yes i tried every options for db_dump:
1. db_dump test.db
db_dump: test.db: metadata page checksum error
db_dump: test.db: unexpected file type or format
db_dump: open: test.db: Unknown error: -1

2. db_dump -r test.db
db_dump: checksum error: catastrophic recovery required
db_dump: PANIC: DB_RUNRECOVERY: Fatal error, run database recovery
db_dump: test.db: pgin failed for page 0
db_dump: fatal region error detected; run recovery
db_dump: test.db: DB_RUNRECOVERY: Fatal error, run database recovery
db_dump: fatal region error detected; run recovery
db_dump: fatal region error detected; run recovery
db_dump: fatal region error detected; run recovery
db_dump: fatal region error detected; run recovery
db_dump: fatal region error detected; run recovery
db_dump: close: DB_RUNRECOVERY: Fatal error, run database recovery
db_dump: fatal region error detected; run recovery
db_dump: dbenv->close: DB_RUNRECOVERY: Fatal error, run database
recovery

3. db_dump -R test.db
db_dump: checksum error: catastrophic recovery required
db_dump: PANIC: DB_RUNRECOVERY: Fatal error, run database recovery
db_dump: test.db: pgin failed for page 0
db_dump: fatal region error detected; run recovery
db_dump: fatal region error detected; run recovery
db_dump: fatal region error detected; run recovery
..........many same errors..........
db_dump: fatal region error detected; run recovery
db_dump: test.db: DB_RUNRECOVERY: Fatal error, run database recovery
DATA=END
db_dump: fatal region error detected; run recovery
db_dump: fatal region error detected; run recovery
db_dump: fatal region error detected; run recovery
db_dump: fatal region error detected; run recovery
db_dump: fatal region error detected; run recovery
db_dump: close: DB_RUNRECOVERY: Fatal error, run database recovery
db_dump: fatal region error detected; run recovery
db_dump: dbenv->close: DB_RUNRECOVERY: Fatal error, run database
recovery

4. db_dump -R -r test.db -> it's same as a 'db_dump -R'

Problem is when open this DB via 'DB->open', return error and db_dump
exit.


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

Default Re: ERROR in DB - 05-02-2006 , 07:18 PM



I try run db_dump with my changes in function "__db_chk_meta" as i
wrote in my first email on this DB.After i load this dump to new DB,
database looks good. I try compare this 2 files/bad->good/ via "cmp -b
../bad/test.db ./good/test.db" and i get this "bad/test.db good/test.db
differ: byte 27, line 1 is 1 ^A 0 ^@"".


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 - 2012, Jelsoft Enterprises Ltd.