正德厚生,臻于至善

How To Set EVENTS In The SPFILE

如果我们想设置多个event,
比如想关闭直接路径读,又想关闭延迟验证,如下:

--关闭直接路劲读
ALTER system SET EVENT='10949 TRACE NAME CONTEXT FOREVER' scope=spfile;

--关闭口令延迟读
ALTER system SET EVENT='28401 trace name context off' scope=spfile;

结果,重启后,结果,我们发现,只有最后一个EVENT生效。
怎么才能同时设置多个事件呢?

方法1:
SQL> ALTER SYSTEM SET
           EVENT='10325 trace name context forever, level 10',
           '10015 trace name context forever, level 1'
           COMMENT='Debug tracing of control and rollback' SCOPE=SPFILE;  

System altered.

方法2:
SQL> alter system set event='10325 trace name context forever, level 10:10015 trace name context forever, level 1' scope=spfile;

比如上面的,同时关闭直接路径读,和延迟认证,执行下面的语句即可:
ALTER system SET EVENT='10949 TRACE NAME CONTEXT FOREVER:28401 trace name context off' scope=spfile;
或ALTER system SET EVENT='10949 TRACE NAME CONTEXT FOREVER','28401 trace name context off' scope=spfile;

也可以修改PFILE文件:
比如:
EVENT="10949 TRACE NAME CONTEXT FOREVER"
EVENT="28401 trace name context off"

重启生效.
任何,通过 alter system set events 'immediate eventdump(system)' ,再去看TRACE文件,

会发现:
Dumping Event (group=SYSTEM)
10949 TRACE NAME CONTEXT FOREVER
28401 trace name context off
赞(0) 打赏
未经允许不得转载:徐万新之路 » How To Set EVENTS In The SPFILE

评论 抢沙发

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫

微信扫一扫

登录

找回密码

注册