Pages

Wednesday, January 12, 2011

11g alert log

The alert log location is obviously changed in 11g. The parameter that defines the top location ( Can be called ADR Base ) is "diagnostic_dest"


SQL> show parameter diag


NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
diagnostic_dest                      string      F:\APP\TARUN

The alert log location will be

<diagnostic_dest>\diag\rdbms\<SID>\<SID>\alert\log.xml

And here you will see the alert log as an xml file.

Again understanding the file will be a real big trouble with those xml tags.

The file is easily readable either through OEM or by utility adrci. See below


adrci> help show alert

  Usage: SHOW ALERT [-p <predicate_string>]  [-term]
                    [ [-tail [num] [-f]] | [-file <alert_file_name>] ]
  Purpose: Show alert messages.

  Options:
    [-p <predicate_string>]: The predicate string must be double quoted.
    The fields in the predicate are the fields:
        ORIGINATING_TIMESTAMP         timestamp
        NORMALIZED_TIMESTAMP          timestamp
        ORGANIZATION_ID               text(65)
        COMPONENT_ID                  text(65)
        HOST_ID                       text(65)
        HOST_ADDRESS                  text(17)
        MESSAGE_TYPE                  number
        MESSAGE_LEVEL                 number
        MESSAGE_ID                    text(65)
        MESSAGE_GROUP                 text(65)
        CLIENT_ID                     text(65)
        MODULE_ID                     text(65)
        PROCESS_ID                    text(33)
        THREAD_ID                     text(65)
        USER_ID                       text(65)
        INSTANCE_ID                   text(65)
        DETAILED_LOCATION             text(161)
        UPSTREAM_COMP_ID              text(101)
        DOWNSTREAM_COMP_ID            text(101)
        EXECUTION_CONTEXT_ID          text(101)
        EXECUTION_CONTEXT_SEQUENCE    number
        ERROR_INSTANCE_ID             number
        ERROR_INSTANCE_SEQUENCE       number
        MESSAGE_TEXT                  text(2049)
        MESSAGE_ARGUMENTS             text(129)
        SUPPLEMENTAL_ATTRIBUTES       text(129)
        SUPPLEMENTAL_DETAILS          text(129)
        PROBLEM_KEY                   text(65)

    [-tail [num] [-f]]: Output last part of the alert messages and
    output latest messages as the alert log grows. If num is not specified,
    the last 10 messages are displayed. If "-f" is specified, new data
    will append at the end as new alert messages are generated.

    [-term]: Direct results to terminal. If this option is not specified,
    the results will be open in an editor.
    By default, it will open in emacs, but "set editor" can be used
    to set other editors.

    [-file <alert_file_name>]: Allow users to specify an alert file which
    may not be in ADR. <alert_file_name> must be specified with full path.
    Note that this option cannot be used with the -tail option

  Examples:
    show alert
    show alert -p "message_text like '%incident%'"
    show alert -tail 20

adrci>

adrci> show alert

Choose the alert log from the following homes to view:

1: diag\clients\user_system\
2: diag\clients\user_tarun\
3: diag\rdbms\orcl\orcl
4: diag\tnslsnr\tarun-pc\listener
Q: to quit

Please select option: 3
Output the results to file: c:\users\tarun\appdata\local\temp\alert_6296_1596_orcl_1.ado

Please select option: Q

adrci>

Thus the alert can be opened in an editor (with a GUI environment), and as written in help:
This can be directed to terminal with -term option
Can also be tailed like unix tail command (Follow help as above)

So in that case other option is :-

F:\>adrci

ADRCI: Release 11.2.0.1.0 - Production on Fri Jan 7 11:06:09 2011

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

ADR base = "f:\app\tarun"
adrci> show alert

Choose the alert log from the following homes to view:

1: diag\clients\user_system\host_737226466_76
2: diag\clients\user_tarun\host_737226466_76
3: diag\rdbms\orcl\orcl
4: diag\tnslsnr\tarun-pc\listener
Q: to quit

Please select option: q
adrci> set homepath diag\rdbms\orcl\orcl

adrci> show alert -tail 10
2011-01-07 10:24:34.593000 +05:30
Verifying 11g file header compatibility for tablespace encryption completed
SMON: enabling tx recovery
Database Characterset is WE8MSWIN1252
No Resource Manager plan active
2011-01-07 10:24:36.111000 +05:30
replication_dependency_tracking turned off (no async multimaster replication found)
2011-01-07 10:24:37.592000 +05:30
Starting background process QMNC
QMNC started with pid=27, OS id=3952
2011-01-07 10:24:40.294000 +05:30

adrci> exit


Beside this the trace location in 11g will be

<diagnostic_dest>\diag\rdbms\<SID>\<SID>\trace

And even other directories at the same location i.e. at <diagnostic_dest>\diag\rdbms\<SID>\<SID> are cdump, incident, metadata, sweep etc for different purposes as their name itself specifies.

No comments:

Post a Comment