题目:
219.You executed the following PL/SQL block successfully:
VARIABLE tname VARCHAR2(20)
BEGIN dbms_addm.insert_finding_directive (NULL, DIR_NAME=>'Detail CPU Usage',
FINDING_NAME=>'CPU Usage', MIN_ACTIVE_SESSIONS=>0,
MIN_PERC_IMPACT=>90); :tname := 'database ADDM task4';
dbms_addm.analyze_db(:tname, 150, 162);
END; /
Then you executed the following command:
SQL> SELECT dbms_addm.get_report(:tname) FROM DUAL;
The above command produces Automatic Database Diagnostic Monitor (ADDM) analysis ____.
A. with the CPU Usage finding if it is less than 90
B. without the CPU Usage finding if it is less than 90
C. with the CPU Usage finding for snapshots below 90
D. with the CPU Usage finding for snapshots not between 150 and 162
参考答案 B
解析
如果小于90,则不进行CPU使用率查找。选择B 。
参考文档:
https://docs.oracle.com/cd/E11882_01/appdev.112/e40758/d_addm.htm#ARPLS65061
INSERT_FINDING_DIRECTIVE Procedure
This procedure creates a directive to limit reporting of a specific finding type. The directive can be created for a specific task (only when the task is in INITIAL
status), or for all subsequently created ADDM tasks (such as a system directive).
DBMS_ADDM.INSERT_FINDING_DIRECTIVE (
task_name IN VARCHAR2,
dir_name IN VARCHAR2,
finding_name IN VARCHAR2,
min_active_sessions IN NUMBER := 0,
min_perc_impact IN NUMBER := 0);
Table 16-12 INSERT_FINDING_DIRECTIVE Procedure Parameters
Parameter | Description |
---|---|
| Name of the task this directive applies to. If the value is |
| Name of the directive. All directives must be given unique names. |
| Name of an ADDM finding to which this directive applies. All valid findings names appear in the |
| Minimal number of active sessions for the finding. If a finding has less than this number, it is filtered from the ADDM result. |
| Minimal number for the "percent impact" of the finding relative to total database time in the analysis period. If the finding's impact is less than this number, it is filtered from the ADDM result. |
A new ADDM task is created to analyze a local instance. However, it has special treatment for 'Undersized SGA' findings. The result of GET_REPORT
shows only an 'Undersized SGA' finding if the finding is responsible for at least 2 average active sessions during the analysis period, and this constitutes at least 10% of the total database time during that period.
var tname VARCHAR2(60);
BEGIN
DBMS_ADDM.INSERT_FINDING_DIRECTIVE(
NULL,
'Undersized SGA directive',
'Undersized SGA',
2,
10);
:tname := 'my_instance_analysis_mode_task';
DBMS_ADDM.ANALYZE_INST(:tname, 1, 2);
END;
To see a report containing 'Undersized SGA' findings regardless of the directive:
SELECT DBMS_ADVISOR.GET_TASK_REPORT(:tname, 'TEXT', 'ALL') FROM DUAL;
END
-- 2019-08-27 add
题目:
225.View the Exhibit to examine the Automatic Database Diagnostic Monitor (ADDM) tasks. You executed
the following commands:
SQL> VAR tname VARCHAR2(60);
SQL> BEGIN :tname := 'my_instance_analysis_mode_task';
DBMS_ADDM.INSERT_SEGMENT_DIRECTIVE(:tname,'Sg_directive','SCOTT');
END;
Which statement describes the consequence?
A. The ADDM task is filtered to suppress the Segment Advisor suggestions for the SCOTT schema.
B. The ADDM task is filtered to produce the Segment Advisor suggestions for the SCOTT schema only.
C. The PL/SQL block produces an error because the my_instance_analysis_mode_task task has not been reset to its initial state.
D. All subsequent ADDM tasks including my_instance_analysis_mode_task are filtered to suppress the Segment Advisor suggestions for the SCOTT schema.
参考答案 C
解析
选择C 。具体可以参考官方文档。
参考文档:
INSERT_SEGMENT_DIRECTIVE Procedure
This procedure creates a directive to prevent ADDM from creating actions to "run Segment Advisor" for specific segments. The directive can be created for a specific task (only when the task is in INITIAL
status), or for all subsequently created ADDM tasks (such as a system directive).
DBMS_ADDM.INSERT_SEGMENT_DIRECTIVE (
task_name IN VARCHAR2,
dir_name IN VARCHAR2,
owner_name IN VARCHAR2,
object_name IN VARCHAR2 := NULL,
sub_object_name IN VARCHAR2 := NULL);
DBMS_ADDM.INSERT_SEGMENT_DIRECTIVE (
task_name IN VARCHAR2,
dir_name IN VARCHAR2,
object_number IN NUMBER);
Table 16-14 INSERT_SEGMENT_DIRECTIVE Procedure Parameters
Parameter | Description |
---|---|
| Name of the task this directive applies to. If the value is |
| Name of the directive. All directives must be given unique names. |
| Specifies the owner of the segment/s to be filtered. A wildcard is allowed in the same syntax used for "like" constraints. |
| Name of the main object to be filtered. Again, wildcards are allowed. The default value of |
| Name of the part of the main object to be filtered. This could be a partition name, or even sub partitions (separated by a '.'). Again, wildcards are allowed. The default value of |
| Object number of the |
A new ADDM task is created to analyze a local instance. However, it has special treatment for all segments that belong to user SCOTT
. The result of GET_REPORT
does not show actions for running Segment advisor for segments that belong to SCOTT
.
var tname VARCHAR2(60);
BEGIN
DBMS_ADDM.INSERT_SEGMENT_DIRECTIVE(NULL,
'my Segment directive',
'SCOTT');
:tname := 'my_instance_analysis_mode_task';
DBMS_ADDM.ANALYZE_INST(:tname, 1, 2);
END;
To see a report containing all actions regardless of the directive:
SELECT DBMS_ADVISOR.GET_TASK_REPORT(:tname, 'TEXT', 'ALL') FROM DUAL;
END