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
adrci [2019/04/26 08:50] 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 60: Line 60:
 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. 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> <code>
-printf "%s" "/cln/prg/ora_bin2/app/oracle" >$ORACLE_HOME/log/diag/adrci_dir.mif+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 73: 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 88: 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 95: 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 122: 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 145: Line 145:
 ips generate package <package number> in "/tmp" ips generate package <package number> in "/tmp"
 </code> </code>
 +
adrci.1556268639.txt.gz · Last modified: 2019/04/26 08:50 by stuart

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki