Oraclue

Oracle internals, debugging and undocumented features

Hidden Automatic Diagnostic Repository (ADRCI) commands

I like unknow stuff so here is latest addition..

As you know  ADR  tool can be invoked using adrci command:
-sh-3.2$ adrci

ADRCI: Release 11.1.0.6.0 – Beta on Fri Mar 13 12:06:38 2009

Copyright (c) 1982, 2007, Oracle.  All rights reserved.

ADR base = “/oracle/admin”

and with help command with can get available options:

adrci> help

 HELP [topic]
   Available Topics:
        CREATE REPORT
        ECHO
        EXIT
        HELP
        HOST
        IPS
        PURGE
        RUN
        SET BASE
        SET BROWSER
        SET CONTROL
        SET ECHO
        SET EDITOR
        SET HOMES | HOME | HOMEPATH
        SET TERMOUT
        SHOW ALERT
        SHOW BASE
        SHOW CONTROL
        SHOW HM_RUN
        SHOW HOMES | HOME | HOMEPATH
        SHOW INCDIR
        SHOW INCIDENT
        SHOW PROBLEM
        SHOW REPORT
        SHOW TRACEFILE
        SPOOL

 There are other commands intended to be used directly by Oracle, type
 “HELP EXTENDED” to see the list

and some more:

adrci> help extended

 HELP [topic]
   Available Topics:
        BEGIN BACKUP
        CD
        DDE
        DEFINE
        DESCRIBE
        END BACKUP
        LIST DEFINE
        MERGE ALERT
        MERGE FILE
        QUERY
        SET COLUMN
        SHOW CATALOG
        SHOW DUMP
        SHOW SECTION
        SHOW TRACE
        SHOW TRACEMAP
        SWEEP
        UNDEFINE
        VIEW

But there is more than this.Oracle does not have them in this list.That’s why I call them hidden and btw Oracle call some of them hidden too.So if I issue command  help hidden I got few more commands e.g.
adrci> help hidden

 HELP [topic]
   Available Topics:
        CREATE HOME
        CREATE INCIDENT
        REGISTER INCIDENT FILE

and again I will use help ( Oracle is helping me .. Once you get first command ).Commands are self explanatory.
adrci> help create home

  Usage:  CREATE HOME keyname=key_value [keyname=key_value …]

  Purpose: Create an ADR home.

  Arguments:
    <keyname>: Name of parameter for creating home. The current parameters
               are “BASE”, “PRODUCT_TYPE”, “PRODUCT_ID”, and
               “INSTANCE_ID”. All these parameters are mandatory.
    <key_value>: Value of the associated keyname.

  Example:
    create home base=/tmp product_type=rdbms product_id=db1
                instance_id=inst1

adrci> help create incident

  Usage:  CREATE INCIDENT keyname=key_value [keyname=key_value …]

  Purpose: Create an incident with the input argument values.
  Arguments:
    <keyname>: Name of parameter for creating incident. For exmaple,
               “PROBLEM_KEY”. Note that some of the keynames are
               mandatory for the command. The current mandatory keynames
               are “PROBLEM_KEY” “ERROR_FACILITY”, “ERROR_MESSAGE”,
               “ERROR_NUMBER”.
    <key_value>: Value of the associated keyname.

  Example:
    create incident problem_key=”ORA-00600: [Memory corruption]                    ” error_facility=ORA
                    error_number=600

adrci> help register incident file

  Usage: REGISTER INCIDENT FILE keyname=key_value [keyname=key_value …]

  Purpose: Register a dump file as an incident file.

  Arguments:
    <keyname>: Name of parameter for adding incident file. The current
    parameters are “FILENAME”, “INCIDENT_ID”, “PATHNAME”.
               “FILENAME” and “INCIDENT_ID” are mandatory keys.
    <key_value>: Value of the associated keyname.

  Example:
    register incident file filename=foo.trc incident_id=1

Any more commands?  Yes…


adrci> help export

  Usage: EXPORT <relation_name> [-p <predicate_string>]
                [-file <filename>] [-overwrite] [-dir]

  Purpose: Export an ADR relation.

  Arguments:
    <relation_name>: The relation to be exported.

  Options:
    [-file <filename>]: The filename to use for the export data file.

    [-p <predicate_string>]: The predicate string must be double quoted.
    The fields in the predicate string must be valid field names in the
    relation to be exported.

    [-overwrite]: Overwrite file if it already exists

    [-dir]: Set the directory to store the exported file in

  Examples:
    export incident
    export incident -p “incident_id>100”

adrci> help import

  Usage: IMPORT <file_name> [-dir dir_name]

  Purpose: Import an ADR relation.

  Arguments:
    <file_name>: The filename to import from.

  Options:
    [-dir dir_name]: The directory where <file_name> resides. If it is not
    specified, the current working directory of ADRCI will be used.

  Examples:
    import incident.imp

There are some others but this is so far I had chance to see today..

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: