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/08 12:49] – created 0.0.0.0adrci [2021/07/29 15:14] (current) – external edit 127.0.0.1
Line 1: Line 1:
-====== Adrci ====== +==== 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>0@@</code>+<code> 
 +adrci 
 +</code>
 To get out, type: To get out, type:
-<code>1@@</code>+<code> 
 +adrci> exit 
 +</code>
 To get help, type: To get help, type:
-<code>2@@</code>+<code> 
 +adrci> help 
 +</code>
 Show registered ORACLE_HOMEs Show registered ORACLE_HOMEs
-<code>3@@</code>+<code> 
 +show home 
 +</code>
 Set one of the homes Set one of the homes
-<code>4@@</code>+<code> 
 +set home diag/rdbms/orcl 
 +</code>
 tail the alert log (adrci reads the XML version of the alert log) tail the alert log (adrci reads the XML version of the alert log)
-<code>5@@</code>+<code> 
 +show alert -tail -f 
 +</code>
 Are there any problems? Are there any problems?
-<code>6@@</code>+<code> 
 +show problem 
 +</code>
 Show the incident(s) of this problem Show the incident(s) of this problem
-<code>7@@</code>+<code> 
 +show incident -all 
 +</code>
 Show more detail about an incident Show more detail about an incident
-<code>8@@</code>+<code> 
 +show incident -mode detail -p "incident_id=<incident number>" 
 +</code>
 Show the incident trace file for this incident Show the incident trace file for this incident
-<code>9@@</code>+<code> 
 +show trace /u01/app/oracle/diag/rdbms/orcl/orcl/incident/incdir_6201/orcl_ora_2299_i6201.trc 
 +</code>
 Package a problem up for Oracle Support Package a problem up for Oracle Support
-<code>10@@</code>+<code> 
 +ips create package problem 1 correlate all 
 +</code>
 Zip a problem package for Oracle Support Zip a problem package for Oracle Support
-<code>11@@</code>+<code> 
 +ips generate package <package number created in previous step> in "/home/oracle" 
 +</code>
 To see current setup, type: To see current setup, type:
-<code>12@@</code> +<code> 
- +adrci> show control 
-=====Purging trace and dump files in 11g with adrci=====+</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 ====
 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:
-<code>13@@</code> +<code> 
-Trace files will now be deleted after 10 days.<br /> +set control (SHORTP_POLICY=240) 
-If space is running low, you can manually delete trace files.<br />+</code> 
 +Trace files will now be deleted after 10 days.\\ 
 +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>14@@</code> +<code> 
-Show the tracefiles in reverse time order +purge -age 3600 -type trace 
-<code>15@@</code> +</code> 
- +Show the tracefiles in reverse time order<code>show tracefile -rt 
-=====Use ADR command line interface from shell===== +</code> 
-<code>16@@</code>+==== Use ADR command line interface from shell ==== 
 +<code> 
 +adrci exec="show homes" 
 +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;" 
 +</code>
 Show ADR homes related to databases Show ADR homes related to databases
-<code>17@@</code> +<code> 
- +$ORACLE_HOME/bin/adrci exec="show homes" | grep "rdbms" 
-=====Shell script to purge ADR data=====+</code> 
 +==== 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]]
-<code>18@@</code> +<code> 
-=====Create a package to send to Oracle Support=====+  -  Purge ADR contents (adr_purge.sh) 
 +purge_log () { 
 +purge_min=$(( 24 * 60 * $2 )) 
 +echo "INFO: purging $1 older than $2 days" 
 +adrci exec="set homepath $file_line; purge -age $purge_min -type $1" 
 +
 +echo "INFO: adrci purge started at `date`" 
 +adrci exec="show homes"|grep -v : | while read file_line 
 +do 
 +    echo "INFO: adrci purging diagnostic destination " $file_line 
 +    echo "------------------" 
 +    purge_log ALERT 365 
 +    purge_log INCIDENT 273 
 +    purge_log TRACE 120 
 +    purge_log CDUMP 75 
 +    purge_log HM 75 
 +    echo "------------------" 
 +done 
 +echo "INFO: adrci purge finished at `date` 
 +</code> 
 +==== 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.
-====Find the problem id==== +=== Show the available adr homes === 
-<code>19@@</code> +<code> 
-====Create a package containing all incidents for this problem==== +show home 
-<code>20@@</code> +</code> 
-====Generate a zipped package file==== +=== Set the appropriate adr home === 
-<code>21@@</code>+<code> 
 +set home diag/rdbms/<db_unique_name>/<instance_name> 
 +</code> 
 +=== Find the problem id === 
 +<code> 
 +show incident -mode detail -p "incident_id=<incident id>" 
 +</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 === 
 +<code> 
 +ips create package problem <problem id> correlate all 
 +</code> 
 +=== Generate a zipped package file === 
 +<code> 
 +ips generate package <package number> in "/tmp" 
 +</code> 
adrci.1544273360.txt.gz · Last modified: 2018/12/08 12:49 by 0.0.0.0

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki