Oracle 视图 DBA_HIST_SESSMETRIC_HISTORY 官方解释,作用,如何使用详细说明

本站中文解释

Oracle视图 DBA_HIST_SESSMETRIC_HISTORY 是一个AWR视图,用于收集当前和历史会话的当前指标和性能数据。它统计会话信息,但它不保存任何SQL出现次数,执行时间,语句文本等细节。

使用 Oracle 视图 DBA_HIST_SESSMETRIC_HISTORY 的方法:

1、使用以下表格查询指标历史数据:

SELECT DISTINCT sesmetric_name, instance_number, metric_name
FROM dba_hist_sessmetric_history
ORDER BY sesmetric_name;

2、通过以下表达式查询某个监视器指标的历史数据:

SELECT snap_id, value
FROM dba_hist_sessmetric_history
WHERE sesmetric_name = ‘value’
ORDER BY snap_id
/

官方英文解释

DBA_HIST_SESSMETRIC_HISTORY displays the history of several important session metrics.

Note:

This view is populated only if a session metric exceeds a server metric threshold that was configured using the DBMS_SERVER_ALERT package.

Column Datatype NULL Description

SNAP_ID

NUMBER

NOT NULL

Unique snapshot ID

DBID

NUMBER

NOT NULL

Database ID for the snapshot

INSTANCE_NUMBER

NUMBER

NOT NULL

Instance number for the snapshot

BEGIN_TIME

DATE

NOT NULL

Begin time of the interval

END_TIME

DATE

NOT NULL

End time of the interval

SESSID

NUMBER

NOT NULL

Session ID

SERIAL#

NUMBER

NOT NULL

Session serial number

INTSIZE

NUMBER

NOT NULL

Interval size (in hundredths of a second)

GROUP_ID

NUMBER

NOT NULL

Group ID

METRIC_ID

NUMBER

NOT NULL

Metric ID

METRIC_NAME

VARCHAR2(64)

NOT NULL

Metric name

VALUE

NUMBER

NOT NULL

Metric Value

METRIC_UNIT

VARCHAR2(64)

NOT NULL

Unit of measurement

CON_DBID

NUMBER

The database ID of the PDB for the sampled session

CON_ID

NUMBER

The ID of the container that CON_DBID identifies. Possible values include:

  • 0: This value is used for rows containing data that pertain to the entire CDB. This value is also used for rows in non-CDBs.

  • 1: This value is used for rows containing data that pertain to only the root

  • n: Where n is the applicable container ID for the rows containing data

See Also:

The DBMS_SERVER_ALERT package in Oracle Database PL/SQL
Packages and Types Reference


数据运维技术 » Oracle 视图 DBA_HIST_SESSMETRIC_HISTORY 官方解释,作用,如何使用详细说明