[Oracle]如何在Oracle中设置Event
为了调查Oracle 的故障,可以通过设置event ,来了解详细的状况。方法如下:
■ 如果使用 SPFILE,
=============
To enable it:
1. Check the current event setting status:
SQL> show parameter event;
2. Add an event and set it up:
If there is no existing event, it is set as follows:
SQL> alter system set event = '235 errorstack (3) systemstate (10)' scope = spfile;
If there is an existing event, add it and set it as follows:
For example, if there is already an event of "902 errorstack (3) systemstate (10)" as a result of the above "1"
SQL> alter system set event = '902 errorstack (3) systemstate (10): 235 errorstack (3) systemstate (10)' scope = spfile;
3. Just to be sure, I will get a backup of SPFILE:
Example of execution:
SQL> create pfile = '/ home / oracle / pfile.ora' from spfile;
4. Restart the database.
=============
To disable it:
1. Delete event 235:
If there is no existing event, it is set as follows:
SQL> alter system set event = '' scope = spfile;
If there is an existing event, restore the original value:
For example, if there is already an event "902 errorstack (3) systemstate (10)" before this event setting,
SQL> alter system set event = '902 errorstack (3) systemstate (10)' scope = spfile;
2. Restart the database.
■ 如果使用 PFILE,
=============
To enable it:
1. Check the line related to "*. Event" with the cat command in the contents of PFILE.
2. Add and configure event 235:
If there is no existing event, please modify it as follows:
*. Event = '235 errorstack (3) systemstate (10)'
The existing event will be appended and set as follows:
For example, if the event of *. Event = '902 errorstack (3) systemstate (10)' already exists as a result of the above "1"
In some cases,
*. Event = '902 errorstack (3) systemstate (10): 235 errorstack (3) systemstate (10)'
3. Restart the database.
=============
To disable it:
1. Correct the line related to "*. Event" to the contents of PFILE.
If there is no existing event, it is set as follows:
*. Event = ''
If there is an existing event, restore the original value:
For example,
if there is already an event of *. Event = '902 errorstack (3) systemstate (10)' before this event setting,
leave it as following:
*. Event = '902 errorstack (3) systemstate (10)'
2. Restart the database.
至于数据库是使用了PFILE, 还是使用了SPFILE,可以通过查看如下的SQL文来看:
select * from v$spparameter where value is not null;
如果返回0行,则表明是使用了 spfile 启动的。
相关文章
- 如何删除oracle 的用户及其数据
- 45个很实用的 Oracle 查询语句小结
- Oracle数据库:oracle内连接inner join on,多表查询各种自链接、内连接、外连接的练习示例
- Oracle数据库:啥是oracle数据库?你为啥要学oracle?
- 如何在五分钟内快速反馈Oracle数据库问题
- 如何将 Oracle 11g 升级到 Orcale 12c
- [转]Oracle中的索引详解
- oracle恢复broken的job,Oracle JOB异常中断原因分析
- Oracle 如何对中文字段进行排序
- 使用淘宝Str2varlist与str2numlist 代替 in/exist ,提升性能(Oracle)
- 如何解析oracle执行计划
- 《大话Oracle Grid:云时代的RAC》——1.3 环境准备
- 转 如何观察 undo Oracle DML语句回滚开销估算
- 转 oracle 如何停下oracle 服务
- 《高并发Oracle数据库系统的架构与设计》一第2章 高效B树索引
- 深入内核:从Oracle ASM自动备份头块到ASMFD
- Oracle之别名小结
- [Oracle工程师手记]如何获得 RMAN 的 debug log
- [Oracle 工程师手记] 如何构造数据库的 log on trigger
- [Oracle][Metadata]如何查找与某一个功能相关的数据字典名
- [Oracle]如何为数据库设置Event(eg: ORA-00235)
- 如何测试Oracle并行执行的并行度状况
- 如何补装oracle的sample schema
- oracle之ROWNUM的查询应用
- ORACLE 11G 利用泠备份恢复standby库
- Robot:robot如何连接Oracle数据库(windows+linux)
- Oracle的层次查询(oracle树查询)