博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
053第18
阅读量:4923 次
发布时间:2019-06-11

本文共 4983 字,大约阅读时间需要 16 分钟。

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

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 16-14 INSERT_SEGMENT_DIRECTIVE Procedure Parameters

Parameter Description

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 viewsDBA_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_REPORTdoes 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;

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 INITIALstatus), or for all subsequently created ADDM tasks (such as a system directive).

Syntax

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

Parameters

Table 16-12 INSERT_FINDING_DIRECTIVE Procedure Parameters

Parameter Description

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.

finding_name

Name of an ADDM finding to which this directive applies. All valid findings names appear in the NAME column of view DBA_ADVISOR_FINDING_NAMES.

min_active_sessions

Minimal number of active sessions for the finding. If a finding has less than this number, it is filtered from the ADDM result.

min_perc_impact

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.

INSERT_PARAMETER_DIRECTIVE Procedure

This procedure creates a directive to prevent ADDM from creating actions to alter the value of a specific system parameter. 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_PARAMETER_DIRECTIVE (   task_name             IN VARCHAR2,   dir_name              IN VARCHAR2,   parameter_name        IN VARCHAR2);

Parameters

Table 16-13 INSERT_PARAMETER_DIRECTIVE Procedure Parameters

Parameter Description

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.

parameter_name

Specifies the parameter to use. Valid parameter names appear inV$PARAMETER.

转载于:https://www.cnblogs.com/llguanli/p/8915957.html

你可能感兴趣的文章
理解Backtracking
查看>>
T3 光
查看>>
搭建交叉调试环境 arm-linux-gdb配合gdbserver
查看>>
使用Jsoup 抓取页面的数据
查看>>
使用命令批量对文件中出现的字符串进行替换
查看>>
C#获取URL参数值
查看>>
oracle extract 函数简介
查看>>
JVM——参数设置、分析
查看>>
Struts 框架 之 文件上传下载案例
查看>>
【重走Android之路】【路线篇(二)】知识点归纳
查看>>
graphviz入门
查看>>
JAVA编码(37)—— Java字符串转换为MAP对象
查看>>
jquery.validate.js 一个jQuery验证格式控件
查看>>
有表格的九九乘法表
查看>>
WPF 4 DataGrid 控件(自定义样式篇)
查看>>
改善C#程序的建议1:非用ICloneable不可的理由
查看>>
PHP的错误机制总结
查看>>
SharePoint 2013 工作流设计之Designer 使用“可视化视图”
查看>>
window.location
查看>>
C#实现万年历(农历、节气、节日、星座、星宿、属相、生肖、闰年月、时辰)
查看>>