A database instance is configured in the shared server mode and it supports multiple applications
running on a middle tier. These applications connect to the database using different services. You
enabled the statistics gathering for the service by using the following command:
SQL > EXECUTE DBMS_MONITOR.SERV_MOD_ACT_STAT_ENABLE (‘APPS1’, NULL, NULL);
Which two statements are true regarding statistics gathered for APPS1 service?
A.
The statistics are gathered for all the modules and actions within the service.
B.
The statistics are collected at the session level for all sessions connected using the service.
C.
The statistics are aggregated and stored in the V$SERV_MOD_ACT_STATS view.
D.
The statistics are gathered for all the modules using the service only when
DBMS_APPLICATION_INFO.SET_MODULE is executed to register with the service.
E.
Statistics gathering is enabled only for the subsequent sessions using the service.
F.
The statistics are gathered for all the applications using the service only when
DBMS_APPLICATION_INFO.SET_ACTION is executed to register with the service.
Explanation:
SERV_MOD_ACT_STAT_ENABLE Procedure
This procedure enables statistic gathering for a given combination of Service Name, MODULE and
ACTION. Calling this procedure enables statistic gathering for a hierarchical combination of
Service name, MODULE name, and ACTION name on all instances for the same database.
Statistics are accessible by means of the V$SERV_MOD_ACT_STATS view.
Note:
* Syntax
DBMS_MONITOR.SERV_MOD_ACT_STAT_ENABLE(
service_name IN VARCHAR2,
module_name IN VARCHAR2,
action_name IN VARCHAR2 DEFAULT ALL_ACTIONS);
Parameter, Description
service_name
Name of the service for which statistic aggregation is enabled
module_name
Name of the MODULE. An additional qualifier for the service. It is a required parameter.
action_name
Name of the ACTION. An additional qualifier for the Service and MODULE name. Omitting the
parameter (or supplying ALL_ACTIONS constant) means enabling aggregation for all Actions for a
given Server/Module combination. In this case, statistics are aggregated on the module level.
Reference: Oracle Database PL/SQL Packages and Types Reference 11g,
SERV_MOD_ACT_STAT_ENABLE Procedure
A and C are correct. Not B
only C is correct.
“Using ALL_ACTIONS for an action specification means that aggregation is enabled for all actions with a given module name, while using NULL (or empty string) means that aggregation is enabled for an action whose name is an empty string.”
C, D are correct , i think
“Name of the MODULE. An additional qualifier for the service. It is a required parameter.”
But we have empty module…
Actually, the default values for module_name and action_name are specified as ANY_MODULE and ANY_ACTION in the documentation, but if you attempt to use those, an error will be raised. The documentation also states that if you leave either parameter null, then it will use the “all” default
B,C
SERV_MOD_ACT_STAT_ENABLE is similar for SERV_MOD_ACT_TRACE_ENABLE. Its params are:
MODULE – An optional additional qualifier for the Service. If omitted, SQL trace is enabled or all modules and actions in a given service.
ACTION – An optional additional qualifier for the Service and MODULE name. If omitted, SQL trace is enabled for all actions in a given module.
So it point to A, not B