I am using Toad for Oracle version 12.0.0.61 with Oracle version 12c.
I am using Toad to write some queries that work with Oracle data dictionary views that use deprecated LONG data types, like the view 'all_views'. This would probably be moot if Oracle didn't insist on using data types in their own internal tables that they refuse to support or allow anyone else to use. But I digress. I am using DBMS_XMLGEN.GETXMLTYPE to convert these LONG columns to XML data that I can work with. The problem I frequently encounter is that if I attempt to execute a query that uses GETXMLTYPE and results in an XML parsing error, any subsequent execution of even the simplest query will cause Toad to become completely unresponsive and I will lose any unsaved work. This is easily verifiable and repeatable every time.
- Try the following query:
WITH xml AS
(
SELECT DBMS_XMLGEN.GETXMLTYPE('SELECT view_name, text FROM all_views WHERE view_name IN (''ALL_PART_TABLES'',
''USER_LOB_PARTITIONS'',
''ALL_LOBS'',
''ALL_IND_PARTITIONS''
)') AS xmldoc FROM dual
)
SELECT * FROM xml;
- Observe the following error:
OCI-31011: XML parsing failed
-
Press OK to clear the error.
-
Run the following query:
SELECT 1 FROM dual;
- Observe that Toad freezes and becomes completely unresponsive indefinitely.