OEM sql monitoring 类似SQL

不够OEM 全面

select a.inst_id,a.time_since_last_wait_micro,a.last_call_et,a.sql_id,a.sql_hash_value, a.username,a.pdml_enabled,a.pdml_status ,a.prev_sql_id from gv$session a

where a.status='ACTIVE' and a.sql_id is not null and a.username is not null

select a.inst_id,sid, sql_id, sql_exec_id, to_char(sql_exec_start,'DD-Mon-YY HH24:MI:SS') sql_exec_start, sql_plan_hash_value plan_hash_value,

elapsed_time, buffer_gets, disk_reads,a.status--,a.*

from gv$sql_monitor a

where --a.sql_exec_start<sysdate-1 and

a.status not like 'DONE%';

--where sql_id like nvl('&sql_id',sql_id)

SELECT DBMS_SQLTUNE.report_sql_monitor_list(type =>'TEXT',report_level => 'ALL') AS report FROM dual;

select *From gv$session gs where gs.blocking_session is not null


How to view the same information from a target database without going through OEM performance to monitor SQL performance:

OEM > targets > databases >select a target database> click on performance. sql monitoring>

Solution

Queries are derived from the view V$SQL_MONITOR for OEM, and inbuilt query.

Use query something like below:

select sid, sql_id, sql_exec_id, to_char(sql_exec_start,'DD-Mon-YY HH24:MI:SS') sql_exec_start, sql_plan_hash_value plan_hash_value,

elapsed_time , buffer_gets, disk_reads

from v$sql_monitor

where sql_id like nvl('&sql_id',sql_id)

Oracle® Database Administration

12c Release 1 (12.1)

16 Monitoring Database Operations

Monitoring Database Operations

相关推荐
kirs_ur3 小时前
ECC & LDPC — SSD 的数据卫士
服务器·数据库·性能优化
是三一seven4 小时前
Sql注入基础
数据库·安全·网络安全
Sirens.4 小时前
MySQL表设计进阶-约束范式连接索引与事务
android·数据库·mysql
字节跳动开源5 小时前
火山引擎开源 Agent 驱动的搜索自迭代技术
数据库·开源·agent
Oo大司命oO7 小时前
藏在正则表达式里的陷阱
数据库·mysql·正则表达式
_oP_i8 小时前
mysql统计数据库使用存储大小
数据库
会编程的土豆8 小时前
MySQL 入门:库、表、行、主键是什么
linux·数据库·网络协议·http
jjjava2.08 小时前
系统日志:从入门到精通的完整指南
网络·数据库
写代码的强哥9 小时前
云原生数据库与传统数据库相比“新”在哪里
数据库·云原生·架构