User Tools

Site Tools


adrci

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
adrci [2019/02/12 23:21] – [Create a package to send to Oracle Support] stuartadrci [2021/07/29 15:14] (current) – external edit 127.0.0.1
Line 1: Line 1:
 ==== Reference links ==== ==== Reference links ====
-  *  [[http://intermediatesql.com/oracle/oracle-11g-xml-alert-logs-surprise-they-are-actually-more-convenient-to-work-with/|Convenient access to adrci log files]]+  * [[http://intermediatesql.com/oracle/oracle-11g-xml-alert-logs-surprise-they-are-actually-more-convenient-to-work-with/|Convenient access to adrci log files]]
   *  [[http://arup.blogspot.co.uk/2013/04/switching-back-to-regular-listener-log.html|Switch back to old-style listener log file - not using adr]]   *  [[http://arup.blogspot.co.uk/2013/04/switching-back-to-regular-listener-log.html|Switch back to old-style listener log file - not using adr]]
   *  [[https://oracle-base.com/articles/11g/automatic-diagnostics-repository-11gr1|adrci at oracle-base.com]]   *  [[https://oracle-base.com/articles/11g/automatic-diagnostics-repository-11gr1|adrci at oracle-base.com]]
Line 35: Line 35:
 Show the incident(s) of this problem Show the incident(s) of this problem
 <code> <code>
-show incident+show incident -all
 </code> </code>
 Show more detail about an incident Show more detail about an incident
Line 56: Line 56:
 <code> <code>
 adrci> show control adrci> show control
 +</code>
 +==== Is the list of HOMEs incorrect? ====
 +Check the ADR Base. This is probably set wrongly. Thanks to [[http://marcel.vandewaters.nl/oracle/database-oracle/adrci-no-adr-base-is-set|this site]], we can set the ADR Base to what it should be.
 +<code>
 +echo "ORACLE_BASE: ${ORACLE_BASE}"
 +STORED_ADR_BASE=$(cat $ORACLE_HOME/log/diag/adrci_dir.mif)
 +printf "Stored ADR_BASE: %s\n" "${STORED_ADR_BASE}"
 +</code>
 +Does it show the ORACLE_BASE? If not populate it correctly with this
 +<code>
 +printf "%s" "${ORACLE_BASE}" >$ORACLE_HOME/log/diag/adrci_dir.mif
 </code> </code>
 ==== Purging trace and dump files in 11g with adrci ==== ==== Purging trace and dump files in 11g with adrci ====
Line 68: Line 79:
 purge -age 3600 -type trace purge -age 3600 -type trace
 </code> </code>
-Show the tracefiles in reverse time order +Show the tracefiles in reverse time order<code>show tracefile -rt
-<code> +
-show tracefile -rt+
 </code> </code>
- 
 ==== Use ADR command line interface from shell ==== ==== Use ADR command line interface from shell ====
 <code> <code>
 adrci exec="show homes" adrci exec="show homes"
-adrci exec="set home diag/tnslsnr/ravjde01/listener_ravjde1;show control" +adrci exec="set home diag/tnslsnr/ravjde01/listener_ravjde1; show control" 
-adrci exec="set home diag/tnslsnr/ravjde01/listener_ravjde1;set control (shortp_policy=360,longp_policy=720);purge;show control;"+adrci exec="set home diag/tnslsnr/ravjde01/listener_ravjde1; set control (shortp_policy=360,longp_policy=720);purge;show control;"
 </code> </code>
 Show ADR homes related to databases Show ADR homes related to databases
Line 83: Line 91:
 $ORACLE_HOME/bin/adrci exec="show homes" | grep "rdbms" $ORACLE_HOME/bin/adrci exec="show homes" | grep "rdbms"
 </code> </code>
- 
 ==== Shell script to purge ADR data ==== ==== Shell script to purge ADR data ====
 Found [[http://www.dadbm.com/oracle-database-housekeeping-methods-adr-files-purge/|here]] Found [[http://www.dadbm.com/oracle-database-housekeeping-methods-adr-files-purge/|here]]
Line 90: 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;purge -age $purge_min -type $1+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 ” $file_line +    echo "INFO: adrci purging diagnostic destination $file_line 
-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`+
 </code> </code>
 ==== Create a package to send to Oracle Support ==== ==== Create a package to send to Oracle Support ====
Line 117: Line 122:
 === Set the appropriate adr home === === Set the appropriate adr home ===
 <code> <code>
-set home diag/rdbms/<database>/<instance>+set home diag/rdbms/<db_unique_name>/<instance_name>
 </code> </code>
 === Find the problem id === === Find the problem id ===
Line 140: Line 145:
 ips generate package <package number> in "/tmp" ips generate package <package number> in "/tmp"
 </code> </code>
 +
adrci.1550013715.txt.gz · Last modified: 2019/02/12 23:21 by stuart

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki