Get the App
SLTechnology News&Howtos  ›  Database  › 

View alert.log

Shulou Source: shulou.com Published: 2022-06-01 18:34:53 10月04日 Update

First, check it through OEM.

Second, use a text editor to view.

1. Log in to the database using a query tool, such as sql*plus.

2. Query the v$diag_info view to locate the location of alert log.

SQL > select name,value from V$diag_info

2 where name in ('Diag Trace','Diag Alert')

NAME

VALUE

Diag Trace

/ opt/oracle11g/diag/rdbms/oracl/oracl/trace

Diag Alert

/ opt/oracle11g/diag/rdbms/oracl/oracl/alert

3. If you are viewing alert log in text format, enter the Diag Trace directory first. Open alert_SID.log with a text editor.

4. If you are viewing the alert log in XML format, enter the Diag Alert directory. Use a text editor to open log.xml.

Use the ADRCI command line to view the alert log in XML format, but the XML tag will not be displayed.

1. Enter ADRCI interaction mode.

[oracle@zeng ~] $adrci

ADRCI: Release 11.2.0.1.0-Production on Tue Mar 6 12:04:38 2012

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

ADR base = "/ opt/oracle11g"

Adrci >

2. Check the current ADR home and determine the ADR home that contains the instance you want to view alert log

Adrci > show homes

ADR Homes:

Diag/tnslsnr/zeng/listener

Diag/rdbms/oracl/oracl

If the required ADR home has not been set up. Set up as follows

Adrci > set homepath diag/rdbms/oracl/oracl

Adrci > show homes

ADR Homes:

Diag/rdbms/oracl/oracl

3. Check alert log.

The show alert starts at the beginning of the alert log. Exit with: quit.

Show alert-tail looks at the last 10 lines of alert log.

Show alert-tail n look at the last n lines of alert log.

The appearance of the entry. Exit using CTRL+C

Tags: Text formatting editor catalog query location command instance tool beginning data database method entry tag pattern view face location login Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MySQL Microsoft Redmi Shulou Technology macOS