ADRCI Commands for Managing Oracle Diagnostics

ADVERTISEMENT

ADRCI (Automatic Diagnostic Repository Command-Line Interface) is a utility for managing and analyzing Oracle diagnostic data, including listener logs, alert logs, incidents, and core dumps. This guide covers essential ADRCI commands.

General Commands

CommandDescriptionExample
adreptLaunches the ADR report viewer.Type adrept in the ADRCI prompt to access diagnostic reports.
adrcatDisplays the contents of the ADR repository.Type adrcat to list all available diagnostic logs and data.
adrciMain command-line interface for managing ADR data.Simply type adrci to enter the ADR command-line interface.

Common Operations

TaskCommand(s)Example
Get current base location (ADR_BASE)adrci> show baseExample: ADR base is "/var/w3buddy/app/oracle"
Set a new ADR_BASEadrci> set base <new_base_path>Example: adrci> set base /var/w3buddy/app/grid
List current ADR homes (ORACLE_HOME)adrci> show homeDisplays available Oracle homes, e.g., /var/w3buddy/app/oracle
Set a new ORACLE_HOMEadrci> set homepath <home_path>Example: adrci> set homepath /var/w3buddy/app/oracle_home1
View alert logadrci> show alert
adrci> show alert -tail <number>
Example: adrci> show alert -tail 50 (views the last 50 lines).
Purge old diagnostic filesadrci> purge -age <minutes> -type <type>Example: adrci> purge -age 1440 -type ALERT (purges alerts older than 24 hours).

Purging Policies

PolicyData TypesDefault RetentionCommandsExample
LONGP_POLICYALERT, INCIDENT, SWEEP, STAGE, HM365 daysadrci> set control (LONGP_POLICY = <hours>)Example: adrci> set control (LONGP_POLICY = 8760) (sets retention to 1 year).
SHORTP_POLICYTRACE, CDUMP, UTSCDMP, IPS30 daysadrci> set control (SHORTP_POLICY = <hours>)Example: adrci> set control (SHORTP_POLICY = 720) (sets retention to 30 days).
View current policyadrci> show controlExample: adrci> show control (displays the current retention settings).

Note:

  • Adjust retention policies based on the storage and operational requirements.
  • Values for retention periods are set in hours (e.g., 720 hours = 30 days).

Incident Package Management

TaskCommand(s)Example
Create incident packageadrci> IPS CREATE PACKAGE INCIDENT
or
adrci> ips pack incident in <output_path>
Example: adrci> ips pack incident in /var/w3buddy/packages
Create an empty packageadrci> IPS CREATE PACKAGECreates a new package for manual additions.
Add incident to a packageadrci> IPS ADD INCIDENT <incident_number> PACKAGE <package_number>Example: adrci> IPS ADD INCIDENT 1001 PACKAGE 3
Add specific files to a packageadrci> IPS ADD FILE <file_path> PACKAGE <package_number>Example: adrci> IPS ADD FILE /var/w3buddy/logs/alert_db.log PACKAGE 3
Generate a package fileadrci> IPS GENERATE PACKAGE <package_number> IN <output_directory>Example: adrci> IPS GENERATE PACKAGE 3 IN /var/w3buddy/generated_packages
Unpack an IPS fileadrci> ips unpack file <file_name> into <directory>Example: adrci> ips unpack file ORA_12345.zip into /var/w3buddy/unpacked_files
Pack incidents in a time frameadrci> ips pack time '<start_time>' to '<end_time>'Example: adrci> ips pack time '2025-01-01 12:00:00.00' to '2025-01-02 12:00:00.00'
View package informationadrci> ips show package
adrci> ips show package <package_number> detail
Example: adrci> ips show package 3 (shows details of package 3).
Delete packageadrci> ips delete package <package_number>Example: adrci> ips delete package 3 (removes the package completely).
Remove incident from packageadrci> ips remove incident <incident_number> package <package_number>Example: adrci> ips remove incident 1002 package 3
Remove problem from packageadrci> ips remove problem <problem_number> package <package_number>Example: adrci> ips remove problem 2001 package 3

ADVERTISEMENT

You might like

Leave a Reply

Your email address will not be published. Required fields are marked *