清理监听日志

2020-05-19  本文已影响0人  ArthurIsUsed

排查

SQL> archive log list;
数据库日志模式                      非存档模式
自动存档                                禁用
存档终点           USE_DB_RECOVERY_FILE_DEST
最早的联机日志序列                       8909
当前日志序列                            8911
SQL> select member from v$logfile;
MEMBER
-------------------------------------
D:\ORACLE\ORCL\REDO03.LOG
D:\ORACLE\ORCL\REDO02.LOG
D:\ORACLE\ORCL\REDO01.LOG
SQL> show linesize;
linesize 80
SQL> set linesize 200;
SQL> show parameter dump;
NAME                  TYPE     VALUE
--------------------  -------  ------------------------------------
background_core_dump  string   partial
background_dump_dest  string   c:\oracle\diag\rdbms\orcl\orcl\trace
core_dump_dest        string   c:\oracle\diag\rdbms\orcl\orcl\cdump
max_dump_file_size    string   unlimited
shadow_core_dump      string   none
user_dump_dest        string   c:\oracle\diag\rdbms\orcl\orcl\trace

清理listener.log

清理alert日志

[root@kmb2b-db01 ~]# su - oracle
[oracle@kmb2b-db01 ~]$ adrci
ADRCI: Release 11.2.0.4.0 - Production on 星期二 5月 19 09:59:42 2020
Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
ADR base = "/u01/app/oracle/rdbms"
adrci> show alert

Choose the alert log from the following homes to view:

1: diag/tnslsnr/kmb2b-db01/kmb2b
2: diag/tnslsnr/kmb2b-db01/listener
3: diag/clients/user_oracle/host_777249608_80
4: diag/rdbms/kmb2b/kmb2b
Q: to quit

Please select option: q
adrci> show tracefile;
     ........................
     diag/rdbms/kmb2b/kmb2b/trace/kmb2b_j003_4574.trc
     diag/rdbms/kmb2b/kmb2b/trace/kmb2b_j000_30332.trc
adrci> 
adrci> show home
ADR Homes: 
diag/tnslsnr/kmb2b-db01/kmb2b
diag/tnslsnr/kmb2b-db01/listener
diag/clients/user_oracle/host_777249608_80
diag/rdbms/kmb2b/kmb2b
adrci> set homepath diag/tnslsnr/kmb2b-db01/listener


[oracle@kmb2b-db01 listener]$ du -sh *
657M alert
4.0K cdump
4.0K incident
4.0K incpkg

adrci> show home
ADR Homes:
diag/tnslsnr/kmb2b-db01/listener
adrci> purge -age 43200 -type alert;   # 清理72小时钱的alert日志


[oracle@KMVS-CENTOS listener]$ du -sh *
87M alert
4.0K cdump
4.0K incident
4.0K incpkg
[root@kmb2b-db01 alert]# su - oracle
[oracle@kmb2b-db01 ~]$ export | grep ORACLE_HOME
declare -x ORACLE_HOME="/u01/app/oracle/rdbms/product/11.2.0"
[root@kmb2b-db01 ~]# cd /home/oracle/app/diag/tnslsnr/KMVS-CENTOS/listener/
[root@kmb2b-db01 ~]# find ./alert -mtime +3 -name “log_*.xml” | xargs rm -f
上一篇下一篇

猜你喜欢

热点阅读