zoukankan      html  css  js  c++  java
  • 转 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 启动的。

  • 相关阅读:
    java数据结构之队列
    java数据结构之线性表
    habase 报错 ERROR: Can't get master address from ZooKeeper; znode data == null
    java.io.IOException: Could not find status of job:job_1534233312603_0002
    windows本地调试安装hadoop(idea) : ERROR util.Shell: Failed to locate the winutils binary in the hadoop binary path
    搭建hadoop_之 创建3个虚拟机配置好网络
    java 数组
    java 中break 和continue 的非常规用法
    java运算符
    java数据类型
  • 原文地址:https://www.cnblogs.com/feiyun8616/p/10559401.html
Copyright © 2011-2022 走看看