C:\Users\user>sqlplus sys/********@lin_solgle as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Wed Dec 3 16:59:35 2014
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management,
OLAP,
Data Mining and Real Application Testing options
SQL> show parameter audit
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
audit_file_dest string /u02/app/admin/solgle/adump
audit_sys_operations boolean FALSE
audit_syslog_level string
audit_trail string DB
SQL> select count(1) from aud$;
COUNT(1)
----------
5722342
-----将系统审计信息移到系统文件目录中
SQL> alter system set audit_trail=xml,extended scope=spfile;
System altered.
SQL>
-----log on linux system
[grid@rac2 bin]$ pwd
/u01/app/grid/11.2.0/bin
[grid@rac2 bin]$ ./srvctl stop database -d solgle
[grid@rac2 bin]$ ./srvctl start database -d solgle
[grid@rac2 bin]$
----查看设置情况
SQL> show parameter audit;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
audit_file_dest string /u02/app/admin/solgle/adump
audit_sys_operations boolean FALSE
audit_syslog_level string
audit_trail string XML, EXTENDED
SQL>
----存db,数据存sys.aud$中
select * from dba_audit_trail;
---清空aud$
truncate table dba_audit_trail;
----ORA-01702: a view is not appropriate here
truncate table aud$;
---dba_audit_trail 数据就清空
----存xml,数据位于audit_file_dest指定路径中
select * from v$xml_audit_trail;
---删除数据
[oracle@rac2 adump]$ pwd
/u02/app/admin/solgle/adump
[oracle@rac2 adump]$ rm -rf ./*
---*/
select * from dba_common_audit_trail;
---os 将数据写入操作系统日志中
---audit_trail = none 关闭审计
SQL> alter system set audit_trail=none scope=spfile;
System altered.