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

相关推荐
oMcLin3 分钟前
如何在AlmaLinux 9上优化MariaDB Galera Cluster,提升数据库集群的事务一致性与并发处理能力?
数据库·mariadb
yuankunliu3 分钟前
【redis】1、Redis的安装部署
数据库·redis·缓存
model20055 分钟前
mariadb系统盘迁移数据盘
数据库·mariadb
码农学院30 分钟前
使用腾讯翻译文本
服务器·数据库·c#
@zulnger40 分钟前
正则表达式
数据库·正则表达式
源代码•宸1 小时前
Golang基础语法(go语言error、go语言defer、go语言异常捕获、依赖管理、Go Modules命令)
开发语言·数据库·后端·算法·golang·defer·recover
optimistic_chen1 小时前
【Redis 系列】持久化特性
linux·数据库·redis·分布式·中间件·持久化
Coder码匠1 小时前
从项目实践中学习 Spring 事务范围优化
数据库·spring
我的golang之路果然有问题1 小时前
mysql 个人笔记导出之-数据库时间戳问题以及增删改查
数据库·笔记·学习·mysql·分享·个人笔记