Oracle审计相关对象的迁移

前端之家收集整理的这篇文章主要介绍了Oracle审计相关对象的迁移前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

目录

在日常的数据库维护中,经常出现因为数据库登录审计的功能启动,导致system表空间被用满.从而出现异常,一般建议把aud$相关对象迁移到其他表空间,从而避免system被用完的风险.
步骤如下:

创建审计用的表空间

[email protected]> create tablespace audit_data logging datafile ‘/oracle/oradata/kyeupdbfs/audit_data.dbf‘
  2  size 20m autoextend off extent management local segment space management auto;

Tablespace created.

在线迁移

[email protected]> alter table aud$ move tablespace audit_data;

Table altered.

[email protected]> alter table audit$ move tablespace audit_data;

Table altered.

[email protected]> alter table audit_actions move tablespace audit_data;

Table altered.

[email protected]> alter index i_audit rebuild online tablespace audit_data;

Index altered.

[email protected]> alter index i_audit_actions rebuild online tablespace audit_data;

Index altered.

查询结果

``` select table_name,tablespace_name from dba_tables where table_name like ‘%AUD%‘; select index_name,tablespace_name from dba_indexes where table_name like ‘%AUD%‘; select table_name,tablespace_name from dba_tables where tablespace_name=‘AUDIT_DATA‘; select index_name,tablespace_name from dba_indexes where tablespace_name=‘AUDIT_DATA‘;

猜你在找的Oracle相关文章