[Zope-DB] Unpickling data from OracleStorage
Randy Jay Yarger
10 Oct 2002 17:56:18 -0400
I'm trying to 'manually' unpickle some objects from OracleStorage and am
not having much luck. Here is the situation in brief:
* A bad block on a disk caused part of the ZODB_RECORD table to become
* Oracle allowed me to export all of the rest of the tables and at least
part of ZODB_RECORD
* Zope won't start with this new configuration (I'm assuming that it's
because the newest T_IDs are missing from the truncated ZODB_RECORD, but
that's just a guess)
* Giving up on getting Zope working I'm now trying to resurrect my old
objects out of ZODB_PICKLE
* I wrote a small JDBC Java program to read the contents of ZODB_PICKLE
(I haven't tackled Pythons database modules yet)
* I'm feed the contents of a pickle field into the 'decode_str' function
found in the Full.py module of OracleStorage (which seems to be what it
does right after reading from the database)
* I then send the resulting string to pickle.loads() and get:
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/lib/python2.2/pickle.py", line 985, in loads
File "/usr/lib/python2.2/pickle.py", line 596, in load
Has anyone tried anything like this before? Here's an example pickle
that I invite any brave soul to try to unpickle... (The pickle was done
using Python 2.1.3 on Win32 if that matters...):
That's the first copy of z_oid #1 in ZODB_PICKLE.
I can send the script I'm using to decode if anyone is interested.
Thanks in advance!