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

相关推荐
kura_tsuki5 小时前
[Oracle数据库] Oracle 常用函数
数据库·oracle
YA3336 小时前
java基础(十)sql的mvcc
数据库
weixin_307779139 小时前
VS Code配置MinGW64编译SQLite3库
开发语言·数据库·c++·vscode·算法
SelectDB10 小时前
Apache Doris 4.0 AI 能力揭秘(一):AI 函数之 LLM 函数介绍
数据库·人工智能·数据分析
我是哈哈hh10 小时前
【MySQL】在UBuntu环境安装以及免密码登录入门
linux·数据库·mysql·ubuntu
HeyZoeHey10 小时前
Mybatis执行sql流程(一)
java·sql·mybatis
喪彪11 小时前
MySQL新手教学
数据库·mysql·adb
丘大梨13 小时前
QT 基础聊天应用项目文档
运维·数据库·系统架构
HMBBLOVEPDX14 小时前
MySQL的多版本并发控制(MVCC):
数据库·mysql·mvcc