In a user session, tracing is enabled as follows:
SQL> EXECUTE
DBMS_TRACE.SET_PLSQL_TRACE(DBMS_TRACE.TRACE_ENABLED_LINES);
PL/SQL procedure successfully completed.
You executed the procedure as follows:
SQL> EXECUTE PROC10
PL/SQL procedure successfully completed.
When you examine the PLSQL_TRACE_EVENTS table, you find that no trace information was
written into it.
View the Exhibit.
What is the reason for this?
A.
The PROC10 procedure is created with the invoker’s right.
B.
The PROC10 procedure is not compiled with the DEBUG option.
C.
Tracing is not enabled with the TRACE_ENABLED_CALLS option.
D.
The TRACE_ENABLED parameter is set to FALSE for the session.
B
https://docs.oracle.com/cd/B28359_01/appdev.111/b28419/d_trace.htm#i1002144
“Tracing Lines
Two levels of line tracing are available:
Level 1: Trace all lines. This corresponds to the constant TRACE_ALL_LINES.
Level 2: Trace lines in enabled program units only. This corresponds to the constant TRACE_ENABLED_LINES.”
and this
“Controlling Data Volume
Profiling large applications may produce a large volume of data. You can control the volume of data collected by enabling specific program units for trace data collection.
You can enable a program unit by compiling it debug.”
C
the possibilities of values that can be used to the level of the trace are many more than two
They are to be precise those contained in the package and their constant crossings added if they volessere enable more ‘than a condition.
they are
trace_all_calls INTEGER 1
trace_enabled_calls INTEGER 2
trace_all_exceptions INTEGER 4
trace_enabled_exceptions INTEGER 8
trace_all_sql INTEGER 32
trace_enabled_sql INTEGER 64
trace_all_lines INTEGER 128
trace_enabled_lines INTEGER 256
no_trace_administrative INTEGER 32768
no_trace_handled_exceptions INTEGER 65536
IF you want to start a trace with set trace level to 12
I for example
begin
DBMS_TRACE.SET_PLSQL_TRACE (
trace_all_exceptions + – + 4
trace_enabled_exceptions INTEGER); -8
if the year is set to 2
and then …. exec something …….
DBMS_TRACE.CLEAR_PLSQL_TRACE
trace_enable parameter does not seem to hit anything with the package dbms_trace
https://docs.oracle.com/cd/B28359_01/server.111/b28320/initparams246.htm#REFRN10219
But it serves to Oracle
and so my opinion is that the answer is C
please write your opinion, thanks
Piero
First step for tracing is enabling the block for debug, either using compile for debug ou set PLSQL_DEBUG = true for the session.
Then you can set the trace level.
From the exhibit no information was collected, which means that debug was not enabled.
B is the answer.
Regards
B,
thanks RF for aids.
C.
— Collecting Trace Data —
The PL/SQL features you can trace are described in the script DBMSPBT.SQL. Some of the key tracing features are:
Tracing Calls
Tracing Exceptions
Tracing SQL
Tracing Lines
Tracing Calls
Two levels of call tracing are available:
Level 1: Trace all calls. This corresponds to the constant TRACE_ALL_CALLS.
Level 2: Trace calls to enabled program units only. This corresponds to the constant TRACE_ENABLED_CALLS.
https://docs.oracle.com/cd/B28359_01/appdev.111/b28419/d_trace.htm#i1002144
— Controlling Data Volume —
Profiling large applications may produce a large volume of data.
You can control the volume of data collected by enabling specific program units for trace data collection.
You can enable a program unit by compiling it debug.
This can be done in one of two ways:
alter session set plsql_debug=true;
create or replace … /* create the library units – debug information will be generated */
or:
/* recompile specific library unit with debug option */
alter [PROCEDURE | FUNCTION | PACKAGE BODY] compile debug;
— DBMS_TRACE —
Creating Database Tables to Collect DBMS_TRACE Output
You must create database tables into which the DBMS_TRACE package writes output. Otherwise, the data is not collected. To create these tables, run the script TRACETAB.SQL. The tables this script creates are owned by SYS
docs.oracle.com/cd/B28359_01/appdev.111/b28419/d_trace.htm
— Create Trace Output Table —
$ORACLE_HOME/rdbms/admin/tracetab.sql
Rem DESCRIPTION
Rem Create tables for the PL/SQL tracer
create table sys.plsql_trace_runs …
comment on table sys.plsql_trace_runs is ‘Run-specific information for the PL/SQL trace’;
create table sys.plsql_trace_events …
comment on table sys.plsql_trace_events is ‘Accumulated data from all trace runs’;
create sequence sys.plsql_trace_runnumber start with 1 nocache;
psoug.org/reference/dbms_trace.html
Sorry B is ok
Explanation ok