Oracle管理

System表空间占用率100%,管理Oracle系统审计

时间:2014-12-3 23:05:42  作者:solgle  来源:www.solgle.com  查看:805  评论:0
内容摘要:C:\Users\user>sqlplus sys/********@lin_solgle as sysdbaSQL*Plus: Release 11.2.0.1.0 Production on Wed Dec 3 16:59:35 2014Copyright (c) 1982,...
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
 
Copyright (c) 1982, 2010, Oracle.  All rights reserved.
本文出自:http://www.solgle.com/news/112.html
 
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.

 
标签:system表空间占用率100% 管理oracle系统审计 

solgle.com 版权所有,欢迎分享!!!

相关文章
    相关评论
       Copyright © 2013-2020 solgle.com,All rights reserved.[solgle.com] 公安机关备案号:51010802000219
    Email:solgle@solgle.com; weixin:cd1008610000 ICP:蜀ICP备14011070号-1