|
|
Blogs
Toad World blogs are a mix of insightful how-tos from Quest experts as well as their commentary on experiences with new database technologies. Have some views of your own to share? Post your comments! Note: Comments are restricted to registered Toad World users.
Do you have a topic that you'd like discussed? We'd love to hear from you. Send us your idea for a blog topic.
Jan
10
Written by:
StevenFeuersteinTW
Tuesday, January 10, 2012 10:14 AM
The "new" debugging architecture (Java Debug Wire Protocol-based) that was introduced in Oracle Database 9i Release 2 was a major improvement on the previous one (DBMS_DEBUG), especially because it made it possible to inspect the values of a wider range of data types. However, it's still not possible to inspect the values of all data types, as the JDWP-based debugging architecture has the following limitations on inspection of the following "exotic" data types:
- CLOB: Only the first 511 characters are shown.
- BLOB: Only the first 510 bytes are shown.
- XMLTYPE, ANYDATA, ANYDATASET, ANYTYPE: No value is shown.
Obviously this is counterproductive when using these data types (and they are becoming more and more common), since it's more difficult to debug the values and often one needs to write custom logging/tracing code in order to "inspect" the values.
In August 2009, my friend and Oracle Test Coach Finn Ellebaek Nielsen raised the following Enhancement Request (ER) to Oracle, in order to lift these limitations in the debugging architecture:
ER 8837708: IMPLEMENT INVOKEMETHOD COMMAND IN JDWP-BASED DEBUG PROTOCOL
I believe that it is theoretically still possible to implement this ER for 12c, but I doubt it will happen unless developers around the world make clear that this would be important to them.
So if you often use the "exotic" data types mentioned above and are frustrated with the limitations on debugging, I suggest that you add your business case(s) to the ER as soon as possible.
Note: your PL/SQL tool provider would still then need to update their software to use this enhancement before the debugging capabilities in that tool are extended, but vendors' hands are tied until Oracle implements this enhancement request.
4 comment(s) so far...
Re: Debugging "Exotic" PL/SQL Data Types
Hi Steven,
I work in an environment where Object types are used heavily. Can you advice some technique which can be used while debugging code with Oracle Object types(ADT).
Regards, Praveen
By PraveenPS on
Sunday, January 22, 2012 2:11 PM
|
Re: Debugging "Exotic" PL/SQL Data Types
Hi Praveen
You can debug object types using most data types for the attributes and parameters, apart from the specific data types mentioned above.
Do your object types use CLOB, BLOB, XMLTYPE, ANYDATA, ANYDATASET or ANYTYPE for attributes or parameters? If so, I suggest you add your business case to the ER mentioned ASAP (and then please reply to this comment as I have a non-seamless workaround). If not, you can debug them without any problems.
Best regards
Finn _____________________________________________________
Finn Ellebaek Nielsen | Oracle Test Coach | oracletesting.com
By FinnEllebaekNielsen on
Monday, January 23, 2012 2:29 AM
|
Re: Debugging "Exotic" PL/SQL Data Types
Hi Finn,
Thanking you for your advice.
Here I have a referring to a product which is already developed. They only have attributes,no methods.They don't have CLOB, BLOB, XMLTYPE, ANYDATA, ANYDATASET or ANYTYPE . They heavily use inheritance(Even some objects are inherited 20+ times). Changing ER is not in our control. I need to do debug or dump data from these objects in PL SQL.
Please advice if you need further details.
Regards, Praveen
By PraveenPS on
Friday, February 03, 2012 10:27 AM
|
Re: Debugging "Exotic" PL/SQL Data Types
Hi Praveen
No problem - your object types can easily be debugged using your favorite PL/SQL IDE, eg Toad, SQL Developer etc.
Just make sure that they're compiled with debug info (plsql_debug = true + plsql_optimize_level = 0).
Hope this helps.
Cheers
Finn
By FinnEllebaekNielsen on
Friday, February 17, 2012 5:56 AM
|
|
|