ORACLE EVENT事件跟踪

前端之家收集整理的这篇文章主要介绍了ORACLE EVENT事件跟踪前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

设置10035事件

sql> exec dbms_workload_repository.create_snapshot();

PL/sql procedure successfully completed.

sql> alter session set events '10035 trace name context forever,level 1';

Session altered.

sql>

sql> alter system set events '10035 trace name context forever,level 1';

System altered.

sql>

查看sql来源:

# 这种一般是plsql等客户端的工具写的sql

sql> oradebug setospid 26630;

Oracle pid: 67,Unix process pid: 26630,image: oracle@pldb1

sql> oradebug setospid 52811;

ORA-00072: process "52811" is not active

sql>

# 一般是应用程序过来的sql语句

sql> oradebug setospid 57135;

ORA-00072: process "57135" is not active

sql>

看到alert log后,记得关闭

ALTER SYSTEM SET EVENTS '10035 trace name context off';

原文链接:https://www.f2er.com/oracle/212790.html

猜你在找的Oracle相关文章