11.8. Tracing PLVobj Activity

You can get feedback on activity in the PLVobj package by requesting that the trace be displayed. PLVobj offers a standard on-off toggle with the following three programs:

PROCEDURE display;
PROCEDURE nodisplay;
FUNCTION displaying RETURN BOOLEAN;

The default setting for PLVobj is no display.

In the following SQL*Plus session, I turn on the trace for PLVobj and then execute a script to see all the lines in PLVio that contain the keyword SUBSTR. The inline.sql program first calls PLVobj.setcurr and later calls PLVobj.bindobj. The first three lines after the call to inline.sql show that I called convobj, then set the current values, and finally performed a bind. The reason that the "convert" trace appeared is that setcurr calls convobj.

SQL>  exec PLVobj.display
SQL>  @inline b:PLVio SUBSTR
convert: Schema.Name.Type = "PLV.."
set: Schema.Name.Type = "PLV.PLVIO.PACKAGE BODY"
bind: Schema.Name.Type = "PLV.PLVIO.PACKAGE BODY"
Lines with SUBSTR in PLV.PLVIO.PACKAGE BODY
330
332
512

Get Advanced Oracle PL/SQL Programming with Packages now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.