I was trying to view the trace file output of a session trace. Used TKPROF to read the trace file for me. This is a part of the file I found:
SELECT XMLELEMENT("ISA", XMLAGG(T.COLUMN_VALUE))
FROM
XMLTABLE('/ISA/node()[ora:matches(name(),"ISA")]' PASSING :B1 ) T
call count cpu elapsed disk query current rows
------- ------ -------- ---------- ---------- ---------- ---------- ----------
Parse 1 0.01 0.00 0 0 0 0
Execute 1 0.03 0.15 4 271 0 0
Fetch 1 0.00 0.02 0 16 0 1
------- ------ -------- ---------- ---------- ---------- ---------- ----------
total 3 0.04 0.18 4 287 0 1
Misses in library cache during parse: 1
Misses in library cache during execute: 1
Optimizer mode: ALL_ROWS
Parsing user id: 268 (XXDAN) (recursive depth: 1)
Rows Row Source Operation
------- ---------------------------------------------------
1 SORT AGGREGATE (cr=10672 pr=226 pw=0 time=7785206 us)
16 COLLECTION ITERATOR PICKLER FETCH XQSEQUENCEFROMXMLTYPE (cr=10656 pr=226 pw=0 time=7765080 us)
error during execute of EXPLAIN PLAN statement
ORA-00932: inconsistent datatypes: expected - got CHAR
parse error offset: 184
I am guessing this has something to do with the XQuery within the sql statement I had in there.
Right after that , I had this piece of information:
********************************************************************************
begin :1 := sys.dbms_xqueryint.getXQueryX(:2); end;
call count cpu elapsed disk query current rows
------- ------ -------- ---------- ---------- ---------- ---------- ----------
Parse 20 0.00 0.00 0 0 0 0
Execute 20 0.45 0.87 0 460 596 20
Fetch 0 0.00 0.00 0 0 0 0
------- ------ -------- ---------- ---------- ---------- ---------- ----------
total 40 0.45 0.87 0 460 596 20
Misses in library cache during parse: 1
Misses in library cache during execute: 1
Optimizer mode: ALL_ROWS
Parsing user id: 268 (XXDAN) (recursive depth: 2)
Although I don't have the second piece of code in my procedure ( and I TKPROF'ed with sys=no), so, I am guessing that both the pieces are related. I could be totally wrong though.
Anyway, I would like to know what happened here to give this ora-00932 error?
Thank you for your consideration,
Rahul.