This is not about the amount of data. The OCI, when in Unicode mode, has some problems with Binary XML. That’s why you get the error in Toad, and that’s why the SB adds the GetClobVal. SQLP Plus does not use the OCI in Unicode mode, and that’s why it
does not produce the error.
From: Boneist [bounce-Boneist@toadworld.com]
Sent: Wednesday, June 12, 2013 12:50 AM
Subject: RE: [Toad for Oracle - Beta Discussion Forum] Toad AV when selecting a table in the editor (possibly array fetch size related?)
I’ve tested the sql copied over from the schema browser, and it does indeed work when run in the editor. If I remove one of the .getclobval’s and rerun, the error reappears.
What I do not understand, though, is that a very similar table (same columns, bar two non-xmltype columns, and with a heck of a lot more data) has no issue when run as select * from table_name in the editor!
… Ah, in trying to set up a test case, I think I’ve noticed where the problem might lie - in the table where I get the issue, the XMLTYPEs are stored as binary xml, not CLOB as I said originally (11g mindset, where are you?!). If I recreate the table
with the XMLTYPE columns stored as CLOBs, I can select * from it in the editor without any problems.
Here is a simplified test case to reproduce the error:
create table test_table (col1 xmltype);
insert into test_table values (xmltype(‘1’));
select * from test_table; — error occurs
create table test_table2 (col1 xmltype)
XMLTYPE col1 STORE AS CLOB (
ENABLE STORAGE IN ROW);
insert into test_table2 values (xmltype(‘1’));
select * from test_table2; — returns row as expected
Is that likely to be a client issue, or is it Toad not handling the new binary XMLTYPE column very well? SQL*Plus works just fine when selecting from the test_table.