Skip to content

Oracle ADRCI Commands

    Oracle ADRCI is the command line interface for Automatic Diagnostic Repository used for viewing diagnostics data like listener log , alert log ,incident and core dump etc and creating incident packages. Below are the the list of useful commands.

    Connect to Oracle ADRCI prompt and check available homes.

    [[email protected] dbs]$ adrci
    ADRCI: Release - Production on Wed Jul 25 06:05:25 2018
    Copyright (c) 1982, 2014, Oracle and/or its affiliates.  All rights reserved.
    ADR base = "/u01/oracle"

    1. Get current  base location:( Also known as ADR_BASE)

    adrci> show base
    ADR base is "/u01/app/oracle/"

    2. Set new ORACLE_BASE(ADR_BASE)

    adrci> set base /u01/app/grid

    3. List current ORACLE_HOME

    adrci> show home

    4. Set new ORACLE_HOME

    adrci> set homepath /u02/app/oracle

    5. View alert log

    adrci> show alert
    adrci>  show alert -tail 100

    6. Purge alerts and trace files

    -- This will purge data older than 600 minutes.
    adrci> purge -age 600 -type ALERT
    adrci> purge -age 600 -type TRACE
    adrci> purge -age 600 -type incident
    adrci> purge -age 10080 -type cdump

    7. Set control policy for auto purge of files

    There are two types of policies,

    LONGP_POLICY is used to purge below data . Default value is 365 days.

    • ALERT
    • SWEEP
    • STAGE
    • HM

    SHORTP_POLICY  is used to purge for below data Default value is 30 days.

    • TRACE
    • CDUMP
    • IPS

    — Get existing control policy

    adrci> show control

    Change default value of control policy details.

    -- Set in hours.
    adrci> set control (SHORTP_POLICY = 240)
    adrci> set control (LONGP_POLICY = 600)

    8 . Create incident package:

    adrci> show incident
    adrci> ips pack incident  in /tmp
    Generated package 9 in file /tmp/, mode complete

    We can create empty package and add required incident or problem or alert log files.

    -- Create empty package
    -- add the necessary incident files. ( package_number will be displayed in the above command)
    adrci>IPS ADD INCIDENT incident_number PACKAGE 2
    adrci > adrci>IPS ADD FILE /u01/app/oracle/alert_db.log PACKAGE 2
    -- Now generate the package file.
    adrci>IPS GENERATE PACKAGE 2 IN /home/dba/housekeeping

    9. Unpack a ips file

    adrci> ips unpack file into /tmp/housekeeping

    10. Pack all incident files within a particular time frame

    --Generates the package with the incidents occurred between the times '2019-05-01 12:00:00.00' and '2019-05-02 23:00:00.00'
    ips pack time '2019-05-01 12:00:00.00' to '2019-05-02 23:00:00.00'

    11. View package information

    adrci> ips show package
    adrci> ips show package 12 detail

    12. Remove/delete package information:

    -- Delete the complete package:
    adrci> ips delete package 2
    -- Remove incidents from the packages
    adrci > ips remove incident 2 package 7
    -- Remove the problem keys from packages
    adrci > ips remove problem 4 package 8

    Also See:

    ADR Command Interpreter