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

本站中文解释

Oracle视图 DBA_HIST_SQLCOMMAND_NAME 是收集和存储SQL指令历史跟踪信息的系统视图。使用此视图可以查看前1000次执行的指令名称,数量以及它们的次数。

使用 DBA_HIST_SQLCOMMAND_NAME 视图查看前1000次执行的指令情况,可以使用如下查询语句:

SELECT *
FROM dba_hist_sqlcommand_name
ORDER BY name;

可以查看某一指令的执行情况,可以使用如下查询语句:

SELECT *
FROM dba_hist_sqlcommand_name
WHERE name= name
ORDER BY count;

官方英文解释

DBA_HIST_SQLCOMMAND_NAME displays the mapping between SQL opcodes and names.

Column Datatype NULL Description

DBID

NUMBER

NOT NULL

Database ID

COMMAND_TYPE

NUMBER

NOT NULL

SQL command number

COMMAND_NAME

VARCHAR2(64)

SQL command name

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


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