Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

[ADRCI] use the ADRCI (ADR Command Interpreter) tool to view Oracle alert warning logs

2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

In the 11g version of Oracle, the location of the alert file has changed, while Oracle provides a command-line tool, ADRCI, which makes it easy to view exceptions in the database. Through this article, I will show you how to use ADRCI (ADR Command Interface) to view Oracle's warning log in 11g.

1. Enter adrci command line mode

Ora11g@RHEL53 / home/oracle$ which adrci

/ oracle/u01/app/oracle/product/1101/db/bin/adrci

Ora11g@RHEL53 / home/oracle$ adrci-help

Syntax:

Adrci [- help] [script=script_filename]

[exec = "one_command [; one_command;...]"]

Options Description (Default)

Script script. File name (None)

Help help on the command options (None)

Exec exec a set of commands (None)

Ora11g@RHEL53 / home/oracle$ adrci

ADRCI: Release 11.1.0.6.0-Beta on Fri Feb 27 15:23:52 2009

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

ADR base = "/ oracle/u01/app/oracle"

Adrci >

two。 Use the help show alert command to view help documentation

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

Adrci > help show alert

Usage: SHOW ALERT [- p] [- term]

[[- tail [num] [- f]] | [- file]]

Purpose: Show alert messages.

Options:

[- p]: 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 (161l)

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]: Allow users to specify an alert file which

May not be in ADR. 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 >

3. Use show alert to list the log directories under each directory, enter the number 4, and the system will automatically call the vi editor to view the alert logs of the database.

Adrci > show alert

Choose the alert log from the following homes to view:

1: diag/tnslsnr/RHEL53/listener

2: diag/clients/user_unknown/host_411310321_11

3: diag/clients/user_oracle/host_2175824367_11

4: diag/rdbms/ora11g/ora11g

Q: to quit

Please select option:4

4. Another way to view it is to specify a specific homepath and then use "show alert-tail 15" to view the last 15 lines of the corresponding log file

Adrci > show homepath

ADR Homes:

Diag/tnslsnr/RHEL53/listener

Diag/clients/user_unknown/host_411310321_11

Diag/clients/user_oracle/host_2175824367_11

Diag/rdbms/ora11g/ora11g

Adrci > set homepath diag/rdbms/ora11g/ora11g

Adrci > show alert-tail 15

2009-02-27 14 2515 05.036000 + 08:00

Starting background process SMCO

SMCO started with pid=21, OS id=3855

Starting background process FBDA

FBDA started with pid=22, OS id=3857

Replication_dependency_tracking turned off (no async multimaster replication found)

2009-02-27 14 purl 25 purl 07.246000 + 08:00

Starting background process QMNC

QMNC started with pid=23, OS id=3859

2009-02-27 14 purl 25 purl 17.325000 + 08:00

Db_recovery_file_dest_size of 4096 MB is 0.005% used. This is a

User-specified limit on the amount of space that will be used by this

Database for recovery-related files, and does not reflect the amount of

Space available in the underlying filesystem or ASM diskgroup.

2009-02-27 14 25 33.727000 + 08:00

Completed: ALTER DATABASE OPEN

2009-02-27 14 2915. 158000 + 08:00

Starting background process CJQ0

CJQ0 started with pid=25, OS id=3892

Adrci >

5. Summary

Use the ADRCI command to centrally view the log files in each directory, which can effectively improve the work efficiency. Like one, this tool can effectively improve the efficiency of problem diagnosis in the highly tense problem processing environment.

Good luck.

Secooler

12.04.01

-- The End--

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report