I agree with bryan's first suggestions, more info from derby.log would help.
If it is possible just posting
it currently might help (one from debug with line numbers even better). i would
suggest filing a JIRA
and posting info and moving discussion there.
Some other questions/suggestions.
o can you tell us more about the ddl, i have not used describe much. What i am
looking mostly for is if there are any unique keys.
o what exactly are the indexes that you have on this table? what i am looking
for is what columns are in the indexes.
o look at the query plans for the queries that you are running, both the ones
that are working and the
ones that are not. what i am looking for is if the optmizer has been able to run
some queries as "covering" which means it gets
all the values from the index and never goes to the base table.
o if indexes are being used you might try using the optimizer hints to force
index or force not index to better understand where
corruption is.
on the ordering question, it depends on the answers to the above. If indexes
are used the ordering is going to be different
for each. A base table scan should theoretically give same order for each
scan as long as there is no updates happening.
does anyone know if describe prints the columns in the order they are actually
stored in the db?
if you have unique keys and the indexes are good, there may be some ways to
better get at the data.
/mikem
On 7/27/2016 7:16 AM, Bergquist, Brett wrote:
I wrote a tool to call SYSCS_UTIL.SYSCS_CHECK_TABLE on each table in the
database and not just stop on error.
I have a database returns the error:
Checking CORE_V1.DEVICE_ENTITY failed with exception: Restore of a
serializable or SQLData object of class , attempted to read more data than was
originally stored
The table has 1261157 rows in it. I can query each of the columns in the
table individually like:
SELECT ID FROM CORE_V1.DEVICE_ENTITY;
SELECT DTYPE FROM CORE_V1.DEVICE_ENTITY;
...
SELECT DESCRIPTION FROM CORE_V1.DEVICE_ENTITY;
These all return 1261157 rows for each select result.
If I select multiple columns such as
SELECT ID, DTYPE FROM CORE_V1.DEVICE_ENTITY;
Then I get:
ERROR XSDA7: Restore of a serializable or SQLData object of class , attempted
to read more data than was originally stored
ERROR XJ001: Java exception: ': java.io.EOFException'.
ij>
The table schema looks like:
ij> describe core_v1.device_entity;
COLUMN_NAME |TYPE_NAME|DEC&|NUM&|COLUM&|COLUMN_DEF|CHAR_OCTE&|IS_NULL&
------------------------------------------------------------------------------
DTYPE |VARCHAR |NULL|NULL|64 |NULL |128 |YES
OPLOCK |INTEGER |0 |10 |10 |0 |NULL |NO
RELATIVE_POSITION |SMALLINT |0 |10 |5 |NULL |NULL |YES
ALIAS_NAME |VARCHAR |NULL|NULL|255 |NULL |510 |YES
DESCRIPTION |VARCHAR |NULL|NULL|255 |NULL |510 |YES
DEVICE_NAME |VARCHAR |NULL|NULL|255 |NULL |510 |YES
PARENTENTITY_ID |INTEGER |0 |10 |10 |NULL |NULL |YES
ID |INTEGER |0 |10 |10 |NULL |NULL |NO
8 rows selected
I am trying to figure out how to recover and correct this table. Once thought
is to query each column separately and then join the output externally back
together and re-import the data. I wonder however if I query each column if
the order of the rows returned will be the same. This will be necessary
because I cannot select the ID with the other column to identify the rows.
Any thoughts will be most welcome.
Canoga Perkins
20600 Prairie Street
Chatsworth, CA 91311
(818) 718-6300
This e-mail and any attached document(s) is confidential and is intended only
for the review of the party to whom it is addressed. If you have received this
transmission in error, please notify the sender immediately and discard the
original message and any attachment(s).
.
--
email: Mike Matrigali - [email protected]
linkedin: https://www.linkedin.com/in/MikeMatrigali