物理standby adump目录下每天产生6万多个aud文件
1、环境介绍2套RAC承担订单业务,每套RAC有各自的单实例physical standby。版本如下:SQL> select * from v$version;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
PL/SQL Release 11.2.0.3.0 - Production
CORE 11.2.0.3.0 Production
TNS for Linux: Version 11.2.0.3.0 - Production
NLSRTL Version 11.2.0.3.0 - Production
2、前两天发现RAC2的DG无法连接,经检查发现adump目录下inode达到600多W,(其他节点,包括RAC1的standby都正常几千个~几十万个)
于是紧急扩展LV的容量,然后使用find . -mtime +60 -exec rm -rf {} \;慢慢删除。目前删除到只剩下30万了,可以打开一些文件查看了。文件信息大多如下:
Audit file /app/oracle/admin/order2dg/adump/order2dg_ora_23380_4.aud
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ORACLE_HOME = /app/oracle/ora11g
System name: Linux
Node name: order2dbdg
Release: 2.6.32-431.el6.x86_64
Version: #1 SMP Fri Nov 22 03:15:09 UTC 2013
Machine: x86_64
Instance name: order2dg
Redo thread mounted by this instance: 1
Oracle process number: 93
Unix process pid: 23380, image: oracle@order2dbdg
Thu Dec 18 12:27:32 2014 +08:00
LENGTH: "378"
SESSIONID: "4294967295" ENTRYID: "1" STATEMENT: "1" USERID: "ORDER8" USERHOST: "acctdb01" ACTION: "100" RETURNCODE: "0" COMMENT$TEXT: "Authenticated by: DATABASE; Client address: (ADDRESS=(PROTOCOL=tcp)(HOST=192.168.200.31)(PORT=55446)); DBLINK_INFO: (SOURCE_GLOBAL_NAME=acctdb.7617671)" OS$USERID: "grid" DBID: "3572486253" PRIV$USED: "5"
Thu Dec 18 12:27:33 2014 +08:00
LENGTH: "302"
SESSIONID: "4294967295" ENTRYID: "1" USERID: "ORDER8" ACTION: "101" RETURNCODE: "0" COMMENT$TEXT: "DBLINK_INFO: (SOURCE_GLOBAL_NAME=acctdb.7617671)" LOGOFF$PREAD: "2" LOGOFF$LREAD: "31099" LOGOFF$LWRITE: "0" LOGOFF$DEAD: "0" DBID: "3572486253 " SESSIONCPU: "17"
故障DG库上的参数如下,和RAC1的DG参数设置一致:
SQL> show parameter audit
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
audit_file_dest string /app/oracle/admin/order2dg/adu
mp
audit_sys_operations boolean FALSE
audit_syslog_level string
audit_trail string OS
SQL> select * from dba_priv_audit_opts ;
USER_NAMEPROXY_NAME PRIVILEGE SUCCESS FAILURE
---------- ---------- ---------------------------------------- ---------- ----------
CREATE EXTERNAL JOB BY ACCESSBY ACCESS
CREATE ANY JOB BY ACCESSBY ACCESS
GRANT ANY OBJECT PRIVILEGE BY ACCESSBY ACCESS
EXEMPT ACCESS POLICY BY ACCESSBY ACCESS
CREATE ANY LIBRARY BY ACCESSBY ACCESS
GRANT ANY PRIVILEGE BY ACCESSBY ACCESS
DROP PROFILE BY ACCESSBY ACCESS
ALTER PROFILE BY ACCESSBY ACCESS
DROP ANY PROCEDURE BY ACCESSBY ACCESS
ALTER ANY PROCEDURE BY ACCESSBY ACCESS
CREATE ANY PROCEDURE BY ACCESSBY ACCESS
USER_NAMEPROXY_NAME PRIVILEGE SUCCESS FAILURE
---------- ---------- ---------------------------------------- ---------- ----------
ALTER DATABASE BY ACCESSBY ACCESS
GRANT ANY ROLE BY ACCESSBY ACCESS
CREATE PUBLIC DATABASE LINK BY ACCESSBY ACCESS
DROP ANY TABLE BY ACCESSBY ACCESS
ALTER ANY TABLE BY ACCESSBY ACCESS
CREATE ANY TABLE BY ACCESSBY ACCESS
DROP USER BY ACCESSBY ACCESS
ALTER USER BY ACCESSBY ACCESS
CREATE USER BY ACCESSBY ACCESS
CREATE SESSION BY ACCESSBY ACCESS
AUDIT SYSTEM BY ACCESSBY ACCESS
USER_NAMEPROXY_NAME PRIVILEGE SUCCESS FAILURE
---------- ---------- ---------------------------------------- ---------- ----------
ALTER SYSTEM BY ACCESSBY ACCESS
23 rows selected.
请问问题会出在哪呢?
我统计过,每天大约增长6W多个!
用df -i 能明显看到在增长 原因已找到,确实是开了审计功能,解决方法如下:
alter system set audit_trail=none scope=spfile;
重启数据库生效!
官方文档 ID 1171314.1 Bug 8642202Lots of audit files due to "Audit Commit Delay exceeded" This note gives a brief overview of bug 8642202.
The content was last updated on: 28-JUN-2013
Click here for details of each of the sections below.
Affects:
Product (Component)Oracle Server (Rdbms)
Range of versions believed to be affectedVersions BELOW 12.1
Versions confirmed as being affected
[*]11.2.0.1
[*]11.1.0.7
Platforms affectedGeneric (all / most platforms affected)
Fixed:
This issue is fixed in
[*]12.1.0.1 (Base Release)
[*]11.2.0.2 (Server Patch Set)
[*]11.2.0.1.1 Database Patch Set Update
[*]11.2.0.1 Bundle Patch 4 for Exadata Database
[*]10.2.0.5 (Server Patch Set)
[*]11.1.0.7 Patch 40 on Windows Platforms
Symptoms:Related To:
[*](None Specified)
[*]Security ( Authentication / Privileges / Auditing )
DescriptionLots of audit files may be produced due to:AUD: Audit Commit Delay exceeded, written a copy to OS Audit Trail This fix increases the Audit Commit Delay increased to 15 seconds andenforced only when AUD$ is initialized for cleanup这个比较常见,因为太多人使用11.2.0.1版本
楼主的版本是11.2.0.3这个Bug应该已经被Fixed。
页:
[1]