sitemap

RSS地图

收藏本站

设为首页

Oracle研究中心

当前位置:Oracle研究中心 > 运维DBA >

【学习笔记】Oracle数据库配置event参数案例

时间:2016-10-22 22:35   来源:Oracle研究中心   作者:HTZ   点击:

天萃荷净 Oracle研究中心学习笔记:分享一篇关于Oracle数据库中event参数的配置、使用的案例,通过操作来验证、认识Oracle数据库的event参数。
下面测试来至于11G

1,数据库的版本

oracleplus.net>select * from v$version;

BANNER
——————————————————————————–
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0http://www.oracleplus.net – 64bit Production
PL/SQL Release 11.2.0.4.0 – Production
CORE 11.2.0.4.0 Production
TNS for Linux: Version 11.2.0.4.0 – Production
NLSRTL Version 11.2.0.4.0 – Production

2,在spfile中修改event参数

oracleplus.net>alter system set event=’10235 trace name context forever,level 512′, ‘10015 trace name context forever, level 1’ scope=spfile;

System altered.

oracleplus.net>startup force;


oracleplus.net>@dump_event.sql
“***************************************************************************”
“session – Dump session group’s event settings “
“process – Dump process group’s event settings “
“system – Dump system group’s event settings(Ie the instance wide events) “
“***************************************************************************”
Statement processed.
Enter value for input: system
10015 trace name context forever, level 1
10235 trace name context forever,level 512

清空event的值
ALTER SYSTEM RESET EVENT SCOPE=SPFILE SID=’*’;

其实我们还可以使用下面的方法
这里需要注意的是:level 512后面接的:没有‘,’

oracleplus.net>alter system set event=’10235 trace name context forever,level 512:10015 trace name context forever,level 1′ scope=spfile;

System altered.

“***************************************************************************”
“session – Dump session group’s event settings “
“process – Dump process group’s event settings “
“system – Dump system group’s event settings(Ie the instance wide events) “
“***************************************************************************”
Statement processed.
Enter value for input: system
10235 trace name context forever,level 512
10015 trace name context forever,level 1

3,在init中修改event参数

方法1
oracleplus.net>!grep “event” /tmp/123.txt
*.event=’10235 trace name context forever,level 512:10015 trace name context forever,level 1′
方法2
oracleplus.net>!grep “event” /tmp/123.txt
*.event=’10235 trace name context forever,level 512′
*.event=’10015 trace name context forever,level 1′
方法3:
oracleplus.net> !grep -A1 “event” /tmp/123.txt
*.event=’10235 trace name context forever,level 512:\
10015 trace name context forever,level 1′

4,清空event的方法

如果使用init参数文件,直接删除event参数,如果使用spfile文件
oracleplus.net>@dump_event.sql
“***************************************************************************”
“session – Dump session group’s event settings “
“process – Dump process group’s event settings “
“system – Dump system group’s event settings(Ie the instance wide events) “
“***************************************************************************”
Statement processed.
Enter value for input: system
10235 trace name context forever,level 512
10015 trace name context forever,level 1
oracleplus.net>alter system set event=” scope=spfile ;
其实这里我们还可以使用reset event scope=spfile sid=’*’来操作
System altered.

oracleplus.net>startup force;
ORACLE instance started.

Total System Global Area 379965440 bytes
Fixed Size 2253464 bytes
Variable Size 171969896 bytes
Database Buffers 201326592 bytes
Redo Buffers 4415488 bytes
Database mounted.
Database opened.
oracleplus.net>@dump_event.sql
“***************************************************************************”
“session – Dump session group’s event settings “
“process – Dump process group’s event settings “
“system – Dump system group’s event settings(Ie the instance wide events) “
“***************************************************************************”
Statement processed.
Enter value for input: system
Statement processed.

本文固定链接: http://www.htz.pw/2014/05/12/oracle-%e9%85%8d%e7%bd%aeevent%e5%8f%82%e6%95%b0.html | 认真就输

--------------------------------------ORACLE-DBA----------------------------------------

最权威、专业的Oracle案例资源汇总之【学习笔记】Oracle数据库配置event参数案例

本文由大师惜分飞原创分享,网址:http://www.oracleplus.net/arch/1033.html

Oracle研究中心

关键词:

Oracle数据库event的使用方法

Oracle event的使用案例

如何配置Oracle数据库的event参数