Oracle Listener.log 및 Listener.xml Purge 하기
참조)
adrci Purge --> http://chandu208.blogspot.kr/2014/10/purge-11g-listener-logs-using-adrci.html
aix Usage per Directory --> http://www.dbatodba.com/db2/useful-aix-commands/how-to-list-the-most-biggest-directory-on-aix/
df vs du --> http://me2c.blogspot.kr/2011/02/df-du.html
1. OS 에서 FileSystem Directory 별로 Usage 확인 하기
1
2
3
4
5
6
7
|
/app/oracle/diag> du -sk ./* | sort -rn |head -5
4315724 ./tnslsnr
1128968 ./rdbms
5956 ./asm
0 ./ofm
0 ./netcman
|
cs |
2. Oracel Log Purge 하기 ( OS 및 adrci 를 통해서 )
2.1. listener.log 를 adrci 로 purge 되지 않았음
--> alert 이나 listener log 자체는 adrci purge 되지 않는다.
--> adrci 를 통한 purge 대상은 순환 *.xml 파일 ( Listener Log 및 Alert XML File )
-. cp /dev/null listener.log 혹은 rm listener.log 삭제 ( 삭제 시, 리슨너 통한 신규 접속 시, 자동 재생성됨 )
-. adrci -> set homepath 리슨너홈 -> show control ( 정책 확인 )
-> 1) purge (현재 정책에 맞춰 ) 혹은 2) purge -age 1440 ( 하루 ) 혹은 3) purge -age -type ALERT
2.2. listener 관련 xml 로그는 아래와 같은 방법으로 purge
( Manual Purge 후, LAST_MANUPRG_TIME 업데이트 확인 )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
/app/oracle/diag/tnslsnr/lgbdbt/listener/trace> adrci
ADRCI: Release 11.2.0.1.0 - Production on Sun May 13 21:41:54 2018
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
ADR base = "/app/oracle"
adrci> show home
ADR Homes:
diag/tnslsnr/lgbdbt/listener << 현재 Home 은 Listener Home
adrci>purge -age 10080 -type ALERT
adrci> show control
ADR Home = /app/oracle/diag/tnslsnr/lgbdbt/listener:
*************************************************************************
ADRID SHORTP_POLICY LONGP_POLICY LAST_MOD_TIME LAST_AUTOPRG_TIME LAST_MANUPRG_TIME ADRDIR_VERSION ADRSCHM_VERSION ADRSCHMV_SUMMARY ADRALERT_VERSION CREATE_TIME
-------------------- -------------------- -------------------- ---------------------------------------- ---------------------------------------- ---------------------------------------- -------------------- -------------------- -------------------- -------------------- ----------------------------------------
3946737980 720 8760 2011-01-12 21:17:53.805564 -08:00 1 2 76 1 2011-01-12 21:17:53.805564 -08:00
1 rows fetched
adrci> purge -age 10080 -type ALERT
adrci> show control
ADR Home = /app/oracle/diag/tnslsnr/lgbdbt/listener:
*************************************************************************
ADRID SHORTP_POLICY LONGP_POLICY LAST_MOD_TIME LAST_AUTOPRG_TIME LAST_MANUPRG_TIME ADRDIR_VERSION ADRSCHM_VERSION ADRSCHMV_SUMMARY ADRALERT_VERSION CREATE_TIME
-------------------- -------------------- -------------------- ---------------------------------------- ---------------------------------------- ---------------------------------------- -------------------- -------------------- -------------------- -------------------- ----------------------------------------
3946737980 720 8760 2011-01-12 21:17:53.805564 -08:00 2018-05-13 21:20:51.156868 -07:00 1 2 76 1 2011-01-12 21:17:53.805564 -08:00
1 rows fetched
|
cs |
## 2022/04/06
12c -> 19c Upgrade 이후, show control 결과 없는 경우,
W/A
adrci> select * from adr_control
참고 ) 19c upgrade listener adrci control ADRCI "show Control" Results in 0 Rows Fetched (문서 ID 2717758.1)