转 Oracle]如何在Oracle中设置Event
https://www.cnblogs.com/gaojian/p/7619960.html
为了调查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中如何找出统计信息过期的表
- Oracle SQL
- 如何删除oracle 的用户及其数据
- Oracle数据库:oracle事务处理语言TCL,commit,rollback,savepoint语句
- Oracle数据库:啥是oracle数据库?你为啥要学oracle?
- 如何在五分钟内快速反馈Oracle数据库问题
- Oracle官方并发教程之Guarded Blocks
- oracle密码过期之后如何修改成永久不过期
- 【Oracle学习笔记】where、group by、 having和order by如何连用
- 《Oracle数据库管理与维护实战》导读
- Oracle数据库之单表查询
- 如何评估oracle AWR 的在oracle 中的存储情况
- oracle大表添加字段default经验分享
- Oracle 11g AWR 系列五:如何生成 AWR 报告?
- [Oracle工程师手记]如何查询表空间的使用率
- [Oracle 工程师手记]如何设置RAC环境自动启动 PDB
- [Oracle]如何获得出现故障时,客户端的详细连接信息
- 查看Oracle数据库中的,已经连接好的..当前用户状况
- 英语linux+英语firefox+英语Oracle OEM如何设置成显示日语
- Ubuntu12.04.3LTS安装Oracle Java 7
- SQL server与Oracle数据库镜像对比
- oracle递归函数
- Oracle数据库体系结构、启动过程、关闭过程
- Oracle的层次查询(oracle树查询)
- SQL SERVER与ORACLE的几点区别
- 如何快速查看Oracle的安装目录
- Oracle:如何创建一个只有查看权限的用户
- Oracle 基础系列之1.1 oracle的安装