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

相关推荐
城北徐宫9 小时前
MySQL数据类型整理
数据库·mysql
数据库小学妹10 小时前
数据库容量规划:四个数与扩容触发线
运维·数据库·后端
时间的拾荒人10 小时前
Redis Cluster 集群详解:分片算法、搭建、故障处理与扩容实战
数据库·redis·算法·集群
纆兰13 小时前
MySQL的多表查询
数据库·mysql
七夜zippoe13 小时前
Nexent 模型配置:4 字段与 9 个槽位
数据库·人工智能·模型·nexent
进击的荆棘13 小时前
MySQL——表的操作
数据库·mysql
nice_lcj52015 小时前
MySQL 慢查询与 EXPLAIN:怎么定位、怎么优化
java·数据库·后端·mysql
OceanRoy1 天前
数据库表的设计
数据库·内连接·外连接·er图·表的约束·三大范式·多表连接
Pniubi1 天前
怎么排查慢SQL,怎么解决?
java·数据库·sql
Decay__1 天前
VMware 安装 SQL Server 双节点 AlwaysOn 可用性组教程 —— WSFC、AG 与侦听器完整部署(系列核心篇)
运维·数据库·sql·mysql·架构