OCP 1Z0 053 18

18.You create a new Automatic Database Diagnostic Monitor (ADDM) task: 
instance_analysis_mode_task. To view the ADDM report, you use the following command: 
SQL> SELECT dbms_addm.get_report('my_instance_analysis_mode_task') FROM dual; 
You want to suppress ADDM output relating to Segment Advisor actions on user SCOTT's segments. 
What would you do to achieve this? 
A. Add a finding directive for the ADDM task. 
B. Add a segment directive for the ADDM task. 
C. Add a parameter directive for the ADDM task. 
D. Disable the Segment Advisor from the Automatic Maintenance Task. 
Answer: B

http://docs.oracle.com/cd/B28359_01/appdev.111/b28419/d_addm.htm#CACECFCJ

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).

Syntax

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);

Parameters

Table 15-13 INSERT_SEGMENT_DIRECTIVE Procedure Parameters

ParameterDescription

task_name

Name of the task this directive applies to. If the value is NULL, it applies to all subsequently created ADDM Tasks.

dir_name

Name of the directive. All directives must be given unique names.

owner_name

Specifies the owner of the segment/s to be filtered. A wildcard is allowed in the same syntax used for "like" constraints.

object_name

Name of the main object to be filtered. Again, wildcards are allowed. The default value of NULL is equivalent to a value of '%'.

sub_object_name

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 NULL is equivalent to a value of '%'.

object_number

Object number of the SEGMENT that this directive is to filter, found in views DBA_OBJECTS or DBA_SEGMENTS


Examples

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_REPORTwill 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;



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值