zoukankan      html  css  js  c++  java
  • ORA16006 audit_trail destination incompatible with database open mode

    错误提示
    sys@ETMCDB> alter database open read only;

    alter database open read only
    *
    ERROR at line 1:

    ORA-16006: audit_trail destination incompatible with database open mode

    解决方法
    sys@ETMCDB> show parameter audit_trail;
    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------------------
    audit_trail                          string      DB, EXTENDED

    sys@ETMCDB> alter system set audit_trail='os' scope=spfile;
    System altered.
    sys@ETMCDB> shutdown immediate;
    sys@ETMCDB> startup mount;
    sys@ETMCDB> alter database open read only;
    Database altered.

    错误原因
    sys@ETMCDB> !oerr ora 16006
    16006, 00000, "audit_trail destination incompatible with database open mode"
    // *Cause:  The audit_trail initialization parameter was set to "DB" (or
    //          TRUE), which is incompatible with a database opened for read-only
    //          access.
    // *Action: When the database is opened for read-only access, the audit_trail
    //          initialization parameter can only be set to "OS" or "NONE" (FALSE).
    //

    sys@ETMCDB> show parameter audit_trail;
    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------------------
    audit_trail                          string      DB, EXTENDED

    后来查了一下,发现是主库设置了审计数据存放到数据库表这个参数,而备库参数是从主库参数修改过来的,现在由于备库要打开只读模式,所以有冲突,那就把审计信息放倒操作系统目录下吧。
    只读模式打开成功。以后如果这个备库switchover或failover成主库的时候,它的审计信息会放到audit_file_dest参数指定的目录里。--引用<<以只读模式打开物理备库的时候,遇到ORA-16006错误>>
    sys@ETMCDB> show parameter audit_trail
    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------------------
    audit_trail                          string      OS
    sys@ETMCDB> show parameter audit_file
    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------------------
    audit_file_dest                      string      /u01/app/oracle/admin/ETMCDB/adump
  • 相关阅读:
    数组常用操作实现
    链表简单实现栈与队列
    亿万级别的表数据处理方式
    ubuntu安装与卸载.dep软件
    pg数据库表接口和数据导出
    深入分析理解Tomcat体系结构
    Servlet源码级别进行详解
    Maven命令行创建java或javaWeb项目
    解释语言与编译语言
    C++中Reference与Pointer的不同
  • 原文地址:https://www.cnblogs.com/buro79xxd/p/1682578.html
Copyright © 2011-2022 走看看