dbTalk Databases Forums  

HELP:no transactional database corruption after application crash

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


Discuss HELP:no transactional database corruption after application crash in the comp.databases.berkeley-db forum.



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

Default HELP:no transactional database corruption after application crash - 06-14-2006 , 09:05 AM






I create a db without transaction protected.Then i insert
100000 items in it.After that i delete 10000 items in it.
It is work well if i close the application normally.And it
often work well after the application crash(i use the vc.net to debug
the application and push the stop debug button).But some time it work
fail(i open the db sussessful. But when i access the db it throw a
exception).I exit the application and run the db_verify.exe
utilities.it report that invailed ××pgno and DB_VERIFY_BAD .
My questions are :What can i do with this database(how to repair
it)?How can avoid it(because it happen some time not all the time)?


Reply With Quote
  #2  
Old   
Florian Weimer
 
Posts: n/a

Default Re: HELP:no transactional database corruption after application crash - 06-15-2006 , 04:02 AM






* demon:

Quote:
My questions are :What can i do with this database(how to repair
it)?
db_dump can recover what's still there, but the data might not be
consistent.

Quote:
How can avoid it(because it happen some time not all the time)?
Perhaps you can use SEH on Windows, but I wouldn't be surprised if all
bets were off when you use a debugger. To guard your data in such
cases, you need to use the transactional data store.


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

Default Re: HELP:no transactional database corruption after application crash - 06-15-2006 , 09:09 AM




Florian Weimer wrote:
Quote:
* demon:

My questions are :What can i do with this database(how to repair
it)?

db_dump can recover what's still there, but the data might not be
consistent.

How can avoid it(because it happen some time not all the time)?

Perhaps you can use SEH on Windows, but I wouldn't be surprised if all
bets were off when you use a debugger. To guard your data in such
cases, you need to use the transactional data store.
To Florian Weimer:
Thanks for reply me!As you say i used db_dump with R option.But it
report same as db_verify.And it create a file. I use the created file
as my operation db.But it fail as not use db_dump.



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.