adrci
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| adrci [2018/12/18 10:03] – [Create a package to send to Oracle Support] stuart | adrci [2021/07/29 15:14] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ==== Reference links ==== | ==== Reference links ==== | ||
| - | * [[http:// | + | * [[http:// |
| * [[http:// | * [[http:// | ||
| * [[https:// | * [[https:// | ||
| - | The new way to package problems and their incidents up for Oracle Support.<br /> | + | The new way to package problems and their incidents up for Oracle Support.\\ |
| - | A useful way to keep the purging of trace files under control.<br /> | + | A useful way to keep the purging of trace files under control.\\ |
| With an Oracle database environment setup, type: | With an Oracle database environment setup, type: | ||
| < | < | ||
| Line 35: | Line 35: | ||
| Show the incident(s) of this problem | Show the incident(s) of this problem | ||
| < | < | ||
| - | show incident | + | show incident |
| </ | </ | ||
| Show more detail about an incident | Show more detail about an incident | ||
| Line 51: | Line 51: | ||
| Zip a problem package for Oracle Support | Zip a problem package for Oracle Support | ||
| < | < | ||
| - | ips generate package | + | ips generate package |
| </ | </ | ||
| To see current setup, type: | To see current setup, type: | ||
| Line 57: | Line 57: | ||
| adrci> show control | adrci> show control | ||
| </ | </ | ||
| + | ==== Is the list of HOMEs incorrect? ==== | ||
| + | Check the ADR Base. This is probably set wrongly. Thanks to [[http:// | ||
| + | < | ||
| + | echo " | ||
| + | STORED_ADR_BASE=$(cat $ORACLE_HOME/ | ||
| + | printf " | ||
| + | </ | ||
| + | Does it show the ORACLE_BASE? | ||
| + | < | ||
| + | printf " | ||
| + | </ | ||
| ==== Purging trace and dump files in 11g with adrci ==== | ==== Purging trace and dump files in 11g with adrci ==== | ||
| SHORTP_POLICY and LONGP_POLICY are number of hours to keep trace files and alert files respectively. These can be changed by typing: | SHORTP_POLICY and LONGP_POLICY are number of hours to keep trace files and alert files respectively. These can be changed by typing: | ||
| Line 63: | Line 73: | ||
| set control (SHORTP_POLICY=240) | set control (SHORTP_POLICY=240) | ||
| </ | </ | ||
| - | Trace files will now be deleted after 10 days.<br /> | + | Trace files will now be deleted after 10 days.\\ |
| - | If space is running low, you can manually delete trace files.<br /> | + | If space is running low, you can manually delete trace files.\\ |
| This deletes all trace files older than 1 day (note the age parameter is minutes, not hours). | This deletes all trace files older than 1 day (note the age parameter is minutes, not hours). | ||
| < | < | ||
| purge -age 3600 -type trace | purge -age 3600 -type trace | ||
| </ | </ | ||
| - | Show the tracefiles in reverse time order | + | Show the tracefiles in reverse time order< |
| - | < | + | |
| - | show tracefile -rt | + | |
| </ | </ | ||
| - | |||
| ==== Use ADR command line interface from shell ==== | ==== Use ADR command line interface from shell ==== | ||
| < | < | ||
| adrci exec=" | adrci exec=" | ||
| - | adrci exec=" | + | adrci exec=" |
| - | adrci exec=" | + | adrci exec=" |
| </ | </ | ||
| Show ADR homes related to databases | Show ADR homes related to databases | ||
| Line 84: | Line 91: | ||
| $ORACLE_HOME/ | $ORACLE_HOME/ | ||
| </ | </ | ||
| - | |||
| ==== Shell script to purge ADR data ==== | ==== Shell script to purge ADR data ==== | ||
| Found [[http:// | Found [[http:// | ||
| Line 91: | Line 97: | ||
| purge_log () { | purge_log () { | ||
| purge_min=$(( 24 * 60 * $2 )) | purge_min=$(( 24 * 60 * $2 )) | ||
| - | echo “INFO: purging $1 older than $2 days” | + | echo "INFO: purging $1 older than $2 days" |
| - | adrci exec=”set homepath $file_line; | + | adrci exec="set homepath $file_line; purge -age $purge_min -type $1" |
| } | } | ||
| - | + | echo "INFO: adrci purge started at `date`" | |
| - | echo “INFO: adrci purge started at `date`” | + | adrci exec="show homes"|grep -v : | while read file_line |
| - | adrci exec=”show homes”|grep -v : | while read file_line | + | |
| do | do | ||
| - | echo “INFO: adrci purging diagnostic destination | + | |
| - | echo “——————————————————————————-” | + | echo "------------------" |
| - | purge_log ALERT 365 | + | purge_log ALERT 365 |
| - | purge_log INCIDENT 273 | + | purge_log INCIDENT 273 |
| - | purge_log TRACE 120 | + | purge_log TRACE 120 |
| - | purge_log CDUMP 75 | + | purge_log CDUMP 75 |
| - | purge_log HM 75 | + | purge_log HM 75 |
| - | echo “——————————————————————————-” | + | echo " |
| done | done | ||
| - | echo | + | echo "INFO: adrci purge finished at `date` |
| - | echo “INFO: adrci purge finished at `date`” | + | |
| </ | </ | ||
| ==== Create a package to send to Oracle Support ==== | ==== Create a package to send to Oracle Support ==== | ||
| A problem may consist of one or more incidents. | A problem may consist of one or more incidents. | ||
| + | === Show the available adr homes === | ||
| + | < | ||
| + | show home | ||
| + | </ | ||
| + | === Set the appropriate adr home === | ||
| + | < | ||
| + | set home diag/ | ||
| + | </ | ||
| === Find the problem id === | === Find the problem id === | ||
| < | < | ||
| show incident -mode detail -p " | show incident -mode detail -p " | ||
| </ | </ | ||
| + | or | ||
| + | < | ||
| + | show problem | ||
| + | </ | ||
| + | === Create a package containing the latest incident for this problem === | ||
| + | < | ||
| + | ips create package problem <problem id> | ||
| + | </ | ||
| + | or | ||
| === Create a package containing all incidents for this problem === | === Create a package containing all incidents for this problem === | ||
| < | < | ||
adrci.1545127436.txt.gz · Last modified: 2018/12/18 10:03 by stuart
