Category Archive: Internals

Oct 04 2010

HOWTO: Trace “ORA-19022: Unoptimized XML construct”

So you’re on 11.2.0.2.0 and you encountered in SQL*Plus this new feature “Unoptimized XML construct detected (enable XMLOptimizationCheck for more information)“. What can you do and how to get more info…? I encountered this new feature in SQL*Plus a month or so ago via the executing the following:   SQL> SET autotrace ON   SQL> …

Continue reading »

Jul 15 2010

XMLDB Whitepapers and Tooling about Design, Performance and Selectivity

From time to time the main Oracle XML DB page gets updated with new whitepapers, tooling or Oracle By Example/ Hands-on Lab examples. “Lately” some cool and interesting new whitepapers and updated tooling content were created on this main Oracle XML DB page. The following items and content are really worth reading. Small issue, though, …

Continue reading »

Jan 17 2010

ORA-31098: Internal event to turn on XDB tracing

“Do not document”… …if not only due to that comment, it is a very interesting event, if not only that it seems that it is used for multiple items and not only tracing. I tried to figure out what I could do with this event regarding the XDB Protocol Server trying to figure out how …

Continue reading »

Mar 25 2009

Creating an alert log via XML/SQL

I don’t know what it is today, but reading Tanel’s post about “Oracle 11g: Reading alert log via SQL“, I just wanted to see if I could manage to do it backwards. In principle you don’t have to use the statements below, because I noticed that the DBMS_SYSTEM.KSDWRT will do it for you automatically. The …

Continue reading »

Mar 24 2009

When is an XQuery Statement too Long?

I just saw Daniel Fink’s – OptimalDBA – blog post: When is a sql statement too long? When the following OTN XMLDB Forum post popped up in my mind… “xquery” versus “select xmlquery” and passing clauses. It tells the story about using bind variables and its performance issues, some alternative ways of dealing with things, charactersets and the ORA-19102 error (“XQuery string literal expected”), ORA-19114 (“Error during parsing the XQuery expression: string”) or ORA-01704 (“String literal too long”).

So when is a XQuery string too long…?

Oct 21 2008

XMLDB Internals: Non-recursive statement used during “SQL*Plus XQuery” statement

During a mind exercise with some of my OTN XMLDB forum peers, I discovered (tkprof…), that the non-recursive statement used for, for example the following: SQL> xquery 2 let $auction := ora:VIEW("XTAB") RETURN 3 FOR $b IN $auction/site/people/person[@id = "person0"] 4 RETURN $b/name/text() 5 / is internally rewritten to SQL> SELECT COLUMN_VALUE RESULT_PLUS_XQUERY FROM XMLTABLE …

Continue reading »

Aug 29 2008

Oracle XMLDB Related “Events”

Undocumented stuff is always very interesting, although there is of course a reason why it is undocumented… Event settings are more or less in this category. They are often used by Oracle Support in their quest to do a good job solving our problems. Sometimes events disable or enable features. Sometimes they trace internal processes. …

Continue reading »