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

相关推荐
王仲肖3 分钟前
PostgreSQL 索引内部机制与表重建深度解析
数据库·postgresql
摇滚侠9 分钟前
Redis 怎么用,Java 开发,Redis 怎么用
java·数据库·redis
云边有个稻草人10 分钟前
Oracle替换工程实践:迁移落地实操与成本全解析
数据库·oracle
勤劳的进取家13 分钟前
Excel 公式技术手册
数据库·excel
BullSmall14 分钟前
接口测试-- SQL 注入测试(安全合规版)
数据库·sql·oracle·安全性测试
王仲肖15 分钟前
PostgreSQL 冻结(Freeze)机制深度解析
数据库·postgresql
执 、19 分钟前
PageHelper 插件实现分页查询
java·sql
赵渝强老师19 分钟前
【赵渝强老师】Redis中的字符串
数据库·redis·nosql
天空属于哈夫克321 分钟前
告别重复粘贴:如何利用 API 实现企业微信群公告自动更新
数据库·自动化·企业微信·rpa
梦想的旅途225 分钟前
企业微信自动发送文本消息的实现与配置
数据库·企业微信