Chinaunix首页 | 论坛 | 博客
  • 博客访问: 19039
  • 博文数量: 2
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 60
  • 用 户 组: 普通用户
  • 注册时间: 2014-05-11 17:37
文章分类
文章存档

2014年(2)

我的朋友

分类: Oracle

2014-05-12 00:22:52

下面测试来至于11G

1,数据库的版本

> select * from v$version;

 

BANNER

--------------------------------------------------------------------------------

Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 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参数

> alter system set event='10235 trace name context forever,level 512', '10015 trace name context forever, level 1' scope=spfile;

 

System altered.

 

> startup force;

 

 

> @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后面接的:没有','

 

> 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

> !grep "event" /tmp/123.txt

*.event='10235 trace name context forever,level 512:10015 trace name context forever,level 1'

方法2

> !grep "event" /tmp/123.txt

*.event='10235 trace name context forever,level 512'

*.event='10015 trace name context forever,level 1'

方法3

>  !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文件

> @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

> alter system set event='' scope=spfile ;

其实这里我们还可以使用reset event scope=spfile sid='*'来操作

System altered.

 

> 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.

> @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.

阅读(1748) | 评论(0) | 转发(0) |
0

上一篇:没有了

下一篇:ORA-00245

给主人留下些什么吧!~~