error: {"code":-1,"message":"CDB : Error -30974, can't open database wallet.dat"}
This error is
DB_RUNRECOVERY.
Assuming a simple restart doesn't fix it, there are two things I'd try.
If you're on Linux, you probably have easy access to the Berkeley DB tools. On Debian/Ubuntu, they can be installed with "sudo apt-get install db-util".
After closing bitcoind and making a backup of the wallet.dat file, try running "db_recover -c wallet.dat" from inside the .bitcoin directory. If that succeeds, you're probably all set.
If you're not on Linux, or if the above doesn't succeed, try running "bitcoind -salvagewallet" (Bitcoin will make a backup on its own before trying to run the salvage routine).
If this also doesn't work and you're on Linux,
look over here for another option.
If you're still having problems, pywallet is probably your next option, however it's got its own problems (that I mention in the post above).
Good luck!
that's very helpful, thank you!
I installed Berkeley DB tools but when execute db_recover -c wallet.dat in the .bitcoin dir i get just
".bitcoin$ db_recover -c wallet.dat
usage: db_recover [-cefVv] [-h home] [-P password] [-t [[CC]YY]MMDDhhmm[.SS]]"
also when i run bitcoind, it finds the corrupt wallet and attemps salvagint automatically. It actually reports it salvaged the data (and just copied a back-up of the original file before the salvaging as .bak file)
but then when i start it again with the supposedly salvaged wallet it says "Wallet corrupted"
so, the bitcoin salvaging doesn't seem to work for me, hopefully the db tool will do the trick as soon as i can get it to work