Tag Archives: alert

ADRCI tool useful commands in Oracle

ADRCI tool for check the alert log, create incident and problem packages

ADRCI utility was introduced in Oracle 11G to check alert log file errors using a command-based tool.
It is a helpful resource for DBAs to analyze incidents and problems, and it assists in uploading trace files for Oracle support.
This eliminates the need to search for incidents manually in the alert log file.

For login to ADRCI utility

1. Just get the session of the server.

2. Set the oracle_home and oracle_sid parameter for database.

3. Execute the adrci utility command.

#adrci
oracle@localhost/u01/app/oracle# adrci
ADRCI: Release 11.2.0.2.0 - Production on Tue Jul 23 15:25:00 2013
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
ADR base = "/u01/app/oracle"
adrci>

4. Check the present homes on the server with following commands.

#show homes
adrci> show homes
ADR Homes:
diag/rdbms/darvel/11
diag/tnslsnr/darvel/listener_11

5. You need to set the home which you want to check log file. In Oracle 11g, LISTENER and RDBMS home is at different location.

adrci> set homepath diag/tnslsnr/darvel/11

6. Check the alert log file error on the home location.

---For check the last lines of alert log
adrci> show alert –tail
--For checking last 200 line of alert log
adrci> show alert -tail 200
--For check the error message present in the alert log file
adrci> show alert -p "message_text like '%ORA-%' "
--For check the last 30 days error present in alert log file
adrci> show alert -p "message_text like '%ORA-%' and originating_timestamp > systimestamp-30"

7. For Purge diagnostic data that is over 1 day old (1440 minutes).

adrci> PURGE -age 1440 -type ALERT
--For purging incident data older than 1 day
adrci> purge -age 1440 -type incident
adrci> PURGE [[-i id1 | start_id end_id] | [-age mins [-type ALERT|INCIDENT|TRACE|CDUMP|HM|UTSCDMP]

8. Show all the incident happening in database.

adrci> show incident
adrci> show incident -p "incident_id = 40165 or incident_id = 145"
adrci> show incident -mode detail
adrci> show incident -mode detail -p "incident_id=33"
adrci> show incident -p "CREATE_TIME > '2011-09-18 21:35:25.012579 +00:00'"
adrci> show incident -p "problem_key='ORA 600 [ksmnfy2]'"
adrci> show incident -p "problem_key='ORA 700 [kfnReleaseASM1]'" -mode basic -last -all

9. Show the problem happening in database.

adrci> show problem
adrci> show problem -all
adrci> show problem -p "problem_id=44"
adrci> show problem -p "problem_key='ORA 600 [krfw_switch_4]'"