Which statement describes the consequence?

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?

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.



Leave a Reply 4

Your email address will not be published. Required fields are marked *


naina

naina

CAN YOU PLEASE EXPLAIN REASON OF THIS ANSWER C?

Magwai

Magwai

http://docs.oracle.com/cd/E11882_01/appdev.112/e40758/d_addm.htm#ARPLS65067
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).

Mario

Mario

This is an example:

var tname varchar2(60);

begin
2 :tname:=’my_instance_analysis’;
3 DBMS_ADDM.INSERT_SEGMENT_DIRECTIVE(:tname,’MarioDirective’,’MARIO’);
4 END;
5 /

PL/SQL procedure successfully completed.

begin
2 DBMS_ADDM.ANALYZE_INST(:tname, 508, 509);
3* end;
4 /

PL/SQL procedure successfully completed.

I execute again the INSERT_SEGMENT_DIRECTIVE:

begin
2 :tname:=’my_instance_analysis’;
3 DBMS_ADDM.INSERT_SEGMENT_DIRECTIVE(:tname,’MarioDirective’,’MARIO’);
4 END;
5 /
begin
*
ERROR at line 1:
ORA-13637: Executing or modifying task my_instance_analysis is disallowed until
the task is reset to its initial state.
ORA-06512: at “SYS.DBMS_SYS_ERROR”, line 86
ORA-06512: at “SYS.PRVT_ADVISOR”, line 5505
ORA-06512: at “SYS.PRVT_ADVISOR”, line 6399
ORA-06512: at “SYS.DBMS_ADVISOR”, line 2748
ORA-06512: at “SYS.DBMS_ADDM”, line 381
ORA-06512: at line 3

eamon

eamon

@Mario, thank you for your excelent explanation.
Really appreciated.