将审计表aud$移到专门的空间

本文介绍如何在Oracle数据库中配置审计跟踪,并将AUD$表空间从SYSTEM表空间迁移到专门的SYSAUDIT_D表空间中,以提高审计日志管理效率。


alter  system set audit_trail=DB_EXTENDED scope=spfile;
SQL>audit select,insert,update,delete on mydb.yyp by access whenever successful;

From:


Oracle Security - For auditing, move the aud$ to another tablespace

If you are performing any kind of auditing on the database, we recommend that you move the aud$ tablespace from the system tablespace to another tablespace. In this example, we are moving the aud$ tablespace to a tablespace called SYSAUDIT_D.

If you are on ASM, you would change the file location to an ASM diskgroup such as ‘+data’.

  1. def DB='&1'  
  2. def FS='&2'  
  3.   
  4. CREATE TABLESPACE SYSAUDIT_D DATAFILE  
  5.   '/data/oracle/&DB/&FS/sysaudit_d_01.dbf' SIZE 200m AUTOEXTEND OFF  
  6. LOGGING ONLINE PERMANENT  
  7. EXTENT MANAGEMENT LOCAL UNIFORM SIZE 1M;  
  8.   
  9. create table audx tablespace SYSAUDIT_D as select * from aud$ where 1 = 2;  
  10. rename AUD$ to AUD$$;  
  11. rename audx to aud$;  
  12. drop index i_aud1;  
  13.   
  14. create index i_aud1 on aud$(sessionid, ses$tid) tablespace SYSAUDIT_D;  
  15.   
  16. set echo off

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/230160/viewspace-621213/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/230160/viewspace-621213/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值