• Trace files contain:
Error information (contact Oracle Support Services if internal error occurs)
Information that can provide guidance for tuning applications or an instance
• Each server and background process can write to an associated trace file.
• Trace file names for background processes are named after their processes.
Exception: Trace files generated by job queue processes
• Oracle Database includes an advanced fault diagnosability infrastructure for preventing, detecting, diagnosing, and resolving problems.
• When a critical error occurs:
An incident number is assigned to the error.
Diagnostic data for the error (such as trace files) is immediately captured and tagged with the incident number.
Data is stored in the ADR
• ADR files can be automatically purged with retention policy parameters.
set up homepath
[oracle@test orcl]$ pwd
/u01/app/oracle/diag/rdbms/orcl/orcl
[oracle@test orcl]$ adrci
ADRCI: Release 19.0.0.0.0 - Production on Thu Nov 23 22:42:48 2023
Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved.
ADR base = "/u01/app/oracle"
adrci>
adrci> set HOMEPATH diag/rdbms/orcl/orcl
adrci>
adrci> select sizep_policy from adr_control_aux
ADR Home = /u01/app/oracle/diag/rdbms/orcl/orcl:
*************************************************************************
SIZEP_POLICY
--------------------
18446744073709551615
1 row fetched
adrci>
adrci> select shortp_policy, longp_policy from adr_control;
ADR Home = /u01/app/oracle/diag/rdbms/orcl/orcl:
*************************************************************************
SHORTP_POLICY LONGP_POLICY
-------------------- --------------------
720 8760
1 row fetched
>>> unit is hour
adrci>
# 200메가로 사이즈 제한
adrci> estimate ( sizep_policy =200000000) ;
Estimate
Short Policy Hours: Unknown due to lack of information
Long Policy Hours: Unknown due to lack of information
Size Policy Bytes: 200000000
adrci>
adrci> estimate ( sizep_policy =200000000) ;
Estimate
Short Policy Hours: Unknown due to lack of information
Long Policy Hours: Unknown due to lack of information
Size Policy Bytes: 200000000
adrci>
adrci> estimate ( shortp_policy =192, longp_policy=192 ) ;
Estimate
Short Policy Hours: 192
Long Policy Hours: 192
Size Policy Bytes: 0
adrci>
adrci> set control (SHORTP_POLICY = 192)
adrci>
adrci> set control (LONGP_POLICY = 192)
adrci>
adrci> set control (SIZEP_POLICY = 8559020)
adrci>
adrci> select shortp_policy, longp_policy from adr_control;
ADR Home = /u01/app/oracle/diag/rdbms/orcl/orcl:
*************************************************************************
SHORTP_POLICY LONGP_POLICY
-------------------- --------------------
192 192
1 row fetched
adrci> exit
[oracle@test orcl]$ pwd
/u01/app/oracle/diag/rdbms/orcl/orcl
[oracle@test orcl]$
[oracle@test orcl]$ du -hs
20M .
[oracle@test orcl]$
[oracle@test orcl]$ adrci
ADRCI: Release 19.0.0.0.0 - Production on Thu Nov 23 22:59:41 2023
Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved.
ADR base = "/u01/app/oracle"
adrci> help purge
Usage: PURGE [-i {<id1> | <id1> <id2>} ] |
[-problem {<id1> | <id1> <id2>} ] |
[[-age <mins>] |
[-size <bytes>] |
[-type {ALERT|INCIDENT|TRACE|CDUMP|HM|UTSCDMP|LOG} ]]
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]: Purge a single specified incident, or a range
of incidents.
[-problem id1 | id1 id2]: Purge a single specified problem, or a range
of problems.
[-age <mins>]: Purge diagnostic data older than <mins> from the
ADR home, if the data is purgable.
[-size <bytes>]: Purge diagnostic data from the ADR home until the size
of the home reaches <bytes> bytes.
[-type ALERT|INCIDENT|TRACE|CDUMP|HM|UTSCDMP|LOG]: Purge a specific
type of data.
Notes:
When purging by size, only INCIDENT, TRACE, CDUMP and UTSCDMP data
is considered.
Some data can not be purged (such as incidents in the 'tracked' state),
which means that the specified target size may not be reached in all cases.
Examples:
purge
purge -i 123 456
purge -age 60 -type incident
purge -size 10000000
adrci>
purge 이전에는 폴더 사이즈가 20M 정도 였으나 지금은 8.1M 으로 변경된다.
[oracle@test orcl]$ du -hs
20M .
[oracle@test orcl]$
adrci> purge -size 5000000
adrci>
adrci> exit
[oracle@test orcl]$ du -hs
8.1M .
[oracle@test orcl]$
'Database > Oracle' 카테고리의 다른 글
44 - [Oracle 19C] V$SPPARAMETER (0) | 2023.11.24 |
---|---|
43 - [Oracle 19C] Enable DDL logging (0) | 2023.11.24 |
41 - [Oracle 19C] View alert log using ADRCI (2) | 2023.11.24 |
40 - [Oracle 19C] Automatic Diagnostic Repository (ADR) (1) | 2023.11.24 |
39 - [Oracle 19C] CONTAINER clause in alter system (0) | 2023.11.23 |