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 [2018/12/18 10:07] – [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]]
-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:
 <code> <code>
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 51: Line 51:
 Zip a problem package for Oracle Support Zip a problem package for Oracle Support
 <code> <code>
-ips generate package in "/home/oracle"+ips generate package <package number created in previous step> in "/home/oracle"
 </code> </code>
 To see current setup, type: To see current setup, type:
Line 57: Line 57:
 adrci> show control adrci> show control
 </code> </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>
 ==== 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)
 </code> </code>
-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).
 <code> <code>
 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 84: 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 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;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 118: 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 124: Line 128:
 show incident -mode detail -p "incident_id=<incident id>" show incident -mode detail -p "incident_id=<incident id>"
 </code> </code>
 +or
 +<code>
 +show problem
 +</code>
 +=== Create a package containing the latest incident for this problem ===
 +<code>
 +ips create package problem <problem id>
 +</code>
 +or
 === Create a package containing all incidents for this problem === === Create a package containing all incidents for this problem ===
 <code> <code>
Line 132: Line 145:
 ips generate package <package number> in "/tmp" ips generate package <package number> in "/tmp"
 </code> </code>
 +
adrci.1545127632.txt.gz · Last modified: 2018/12/18 10:07 by stuart

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki