RA-16006 audit_trail destination incompatible with database open mode

本文介绍了解决在尝试以只读模式打开Oracle物理备用数据库时遇到的ORA-16006错误的方法。该错误源于审计跟踪设置与只读模式不兼容。通过调整审计跟踪参数为操作系统级别,可以成功开启只读模式。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

物理standby,我打算以open read only的方式打开备库,结果报错:

SQL> alter database open read only;
alter database open read only
*
ERROR at line 1:
ORA-16006: audit_trail destination incompatible with database open mode

查看这个错误:

# 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).
//    

查看参数

SQL> show parameter audit_trail;
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
audit_trail                          string      DB_EXTENDED

原来是这个参数的问题。

主库设置了审计数据存放到数据库表这个参数,而备库参数是从主库参数修改过来的,现在由于备库要打开只读模式,所以有冲突

可以把审计信息放到操作系统的文件。

这个参数不可以动态修改:

SQL> alter system set audit_trail='os' scope=spfile;

然后重启

SQL> alter database open read only;

Database altered.

如需转载,请注明出处:http://blog.youkuaiyun.com/nanaranran/article/details/30475239

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值