A database supports three applications: CRM, ERP, and ACC. These applications connect to the
database by using three different services: CRM_SRV for the CRM application, ERP_SRV for the
ERP application, and ACC_SRV for the ACC application.
You enable tracing for the ACC_SRV service by issuing the following command:
SQL> EXECUTE DBMS for the ACC_SRV service by issuing the following command:
SQL> EXECUITIVE DBMS_MONITOR. SERV_MOD_ACT_TRACE_ENABLE (service_name =>
‘ACC_SRV’, waits => TRUE, binds = > FALSE, instance_name = > ‘inst1’);
Which statement is true?
A.
All trace information for the service connection to inst1 will be stored in a single trace file.
B.
A trace file is not created because the module name is not specified.
C.
A single trace file is created for each session that uses the ACC_SRV service.
D.
Only those SQL statements that are identified with the ACC_SRV service executed on the inst1
instance are recorded in trace files.
E.
All trace information for the ACC_SRV service connected to inst1 is stored in multiple trace
files, which can be consolidated by using the tkprof utility.
Explanation:
SERV_MOD_ACT_TRACE_ENABLE
serv_mod_act_trace_enable and serv_mod_act_trace_disable, which enables and disables trace
for given service_name, module and action.
For example for a given service name you can trace all session started from SQL*Plus.
Module and action in your own created application can be set using dbms_application_info
set_module and set_action procedures.
serv_mod_act_trace_enable fills sys table wri$_tracing_enabled and view dba_enabled_traces on
top of this table as follows:
SQL> exec dbms_monitor.serv_mod_act_trace_enable(service_name=>’orcl’,
module_name=>’SQL*Plus’)
PL/SQL procedure successfully completed.
SQL> select * from sys.wri$_tracing_enabled;
TRACE_TYPE PRIMARY_ID QUALIFIER_ID1 QUALIFIER_ID2 INSTANCE_NAME FLAGS
———- ———- ————- ————- ————- —–4 orcl SQL*Plus 8
SQL> select * from dba_enabled_traces;
TRACE_TYPE PRIMARY_ID QUALIFIER_ID1 QUALIFIER_ID2 WAITS BINDS
INSTANCE_NAME
————– ———- ————- ————- —– —– ————-
SERVICE_MODULE orcl SQL*Plus TRUE FALSE
I think correct is D.
Because we enable tracing for both SERVICE and INSTANCE.
A is not correct as multiple trace files would be created
B is not correct as it will generate for all modules, if not specified
C is not correct , same as A
E is not correct multiple traces can be consolidated using trcsess not tkprof
so D is correct.
C isn’t wrong because it’s like A; If you actually do the trace, it does generate one trace file per session. It can be wrong because if the size of the generated trace file for a session exceeds MAX_DUMP_FILE_SIZE, then you’ll end up multiple trace files for a session.
C. single trace file for each session, will be multiple trace files for this service.
D
Not A, because all trace information will be stored in multiple trace files.
Not B, because “Omitting a qualifier behaves like a wild-card, so that not specifying an ACTION means all ACTIONs.”
Source: http://docs.oracle.com/cd/B19306_01/appdev.102/b14258/d_monitor.htm#CFAGCHJC
Not C, because a single trace file is created for each session that uses the ACC_SRV service on instance ‘inst1’ (not globally for the database).
Not E, because we use the trcsess tools to consolidate.