Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1443917
  • 博文数量: 239
  • 博客积分: 5909
  • 博客等级: 大校
  • 技术积分: 2715
  • 用 户 组: 普通用户
  • 注册时间: 2010-07-24 20:19
文章分类

全部博文(239)

文章存档

2014年(4)

2013年(22)

2012年(140)

2011年(14)

2010年(59)

我的朋友

分类: Oracle

2012-09-11 10:53:31

This is one of the good way to know whether the EVENTS has been enabled / disabled or not.

Example:-

1. Enabling now.

SQL> ALTER SYSTEM SET EVENTS '10442 trace name context forever, level 10';

2. Disabling now.

SQL> ALTER SYSTEM SET EVENTS '10442 trace name context off';

System altered.

The same can be found form the alert log.

OS Pid: 24789 executed alter system set events '10442 trace name context off'
Sat Jul 14 04:30:25 2012

There are ways to find out from the db level, whether this is disabled or enabled.

one way is to use dbms_system.read_ev

set serveroutput on

DECLARE
lev BINARY_INTEGER;
BEGIN
dbms_system.read_ev(10442, lev);
dbms_output.put_line(lev);
END;
/
1 -- means the event is enabled.

PL/SQL procedure successfully completed.


set serveroutput on

DECLARE
lev BINARY_INTEGER;
BEGIN
dbms_system.read_ev(10442, lev);
dbms_output.put_line(lev);
END;
/
0 -- means the event is disabled.

The output 0 means disabled or if not set.
阅读(3677) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~