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

相关推荐
程序员小八7773 小时前
MySQL 事务:一文把 ACID、隔离级别、MVCC、锁全串起来
数据库·mysql
lzhdim3 小时前
提高 SQL 语句执行速度的方法
java·开发语言·数据库·sql·oracle
ltl4 小时前
ClickHouse Distributed 引擎与分布式查询路由
数据库
Wang's Blog4 小时前
PostgreSQL笔记60: 权限与角色管理——从层级体系到最佳实践
数据库·笔记·postgresql
whcyhhh5 小时前
头歌实践教学平台:大数据存储2023(六)
大数据·数据库·python
Elastic 中国社区官方博客6 小时前
让大模型思考,让小模型执行:在 Elastic Workflows 中拆分 LLM 成本
大数据·运维·数据库·人工智能·elasticsearch·ai
Faith_xzc6 小时前
一条 SQL 顶一条 Flink 链路?Doris Streaming Job 持续导入全景解析
大数据·数据库·sql·flink
爱学习的小白柏6 小时前
【AI问数技术】多Agent协同架构:查询规划/SQL生成/洞察分析/报告生成
java·网络·人工智能·windows·sql·架构·llama
摆烂z7 小时前
简单理解StarRocks
sql
这个DBA有点耶9 小时前
多模数据库深度解读:从“多库拼装”到“一库多能”的架构演进
数据库·mysql·dba