ITPub博客

首页 > 数据库 > Oracle > [20160516]adrci purge.txt

[20160516]adrci purge.txt

原创 Oracle 作者:lfree 时间:2016-05-16 08:48:51 2 删除 编辑

[20160516]adrci purge.txt

adrci> help purge

  Usage: PURGE [[-i <id1> | <id1> <id2>] |
               [-age <mins> [-type ALERT|INCIDENT|TRACE|CDUMP|HM|UTSCDMP]]]:

  Purpose: Purge the diagnostic data in the current ADR home. If no
           option is specified, the default purging policy will be used.

  Options:
    [-i id1 | id1 id2]: Users can input a single incident ID, or a
    range of incidents to purge.

    [-age <mins>]: Users can specify the purging policy either to all
    the diagnostic data or the specified type. The data older than <mins>
    ago will be purged

    [-type ALERT|INCIDENT|TRACE|CDUMP|HM|UTSCDMP]: Users can specify what type of
    data to be purged.

  Examples:
    purge
    purge -i 123 456
    purge -age 60 -type incident

--测试环境trace目录的文件太多,做一次清理,并做一个记录:

adrci> show homes
ADR Homes:
diag/tnslsnr/gxqyydg4/listener
diag/clients/user_oracle/host_4007105823_80
diag/asmtool/user_oracle/host_4007105823_80
diag/rdbms/book/book

adrci> set home diag/rdbms/book/book

$ cd /u01/app/oracle/diag/rdbms/book/book/trace
$ ls -l |wc
   10875    96994   966821

adrci> purge -age 3600
--注:3600的单位是分钟,也就是保留1天的.

$ ls -l |wc
     30     234    2245

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

请登录后发表评论 登录
全部评论
熟悉oracle相关技术,擅长sql优化,rman备份与恢复,熟悉linux shell编程。

注册时间:2008-01-03

  • 博文量
    4006
  • 访问量
    7969783