Oracle DB View Alert log

Source: Internet
Author: User

Database Home > RELATED LINKS links) area > Alert log content (Alert logs contents)

View Alert logs
Each database has a alert_<sid>.log file. This file is located in the same server as the database
If $oracle_base is set, this file is stored by default in $oracle_base/diag/rdbms/<db_name>/<sid>/trace.
A database alert file is a log file that lists messages in chronological order, such as:
Any non-default initialization parameters used at startup
All internal errors (ORA-600), block corruption errors (ORA-1578), and deadlock errors (ORA-60) that have occurred
Administrative operations, such as SQL statements create, ALTER, DROP DATABASE, and tablespace, and enterprise Manager or Sql*plus statement startup, SHUTDOWN, ARCHIVE Log and recover
Multiple messages and errors related to the functionality of the shared server and dispatcher processes
Errors that occur when the entity view is refreshed automatically
Oracle DB uses an alert log to retain records of these events as an alternative to displaying this information on the Operator console.
(Many systems will display this information in the console at the same time.) If a management operation completes successfully,
The system writes the completed (completed) message and a timestamp to the alert log.

Enterprise Manager can monitor the alert log files and notify you of serious errors. You can also view the log,
To check for non-critical errors and informational messages.
Because the alert file grows to a size that cannot be managed, you can back up the file regularly and delete the current alert file.
When the database tries to write the alert file again, a new alert file is recreated.
Note: There is an XML version of the alert log in the $ORACLE _base/diag/rdbms/<db_name>/<sid>/alert directory.
To determine the location of the alert log through Sql*plus, follow these steps:
Use Sql*plus (or other query tools, such as SQL Developer) to connect to the database.
Query the V$diag_info view.
To view a plain text alert log without XML markup, do the following:
In the V$diag_info query results, note the path that corresponds to the DIAG Trace entry. Change the directory to this path.
Open the Alert_sid.log file using a text editor.
To view the alert log in XML format, do the following:
In the V$diag_info query results, note the path that corresponds to the DIAG alert entry. Change the directory to this path.
Open the Log.xml file using a text editor.

[Email protected]> select * from V$diag_info;
inst_id NAME VALUE
---------- ------------------------- -------------------------------------------------------
1 Diag Enabled TRUE
1 ADR base/u01/app/oracle
1 ADR home/u01/app/oracle/diag/rdbms/test0924/test0924
1 Diag trace/u01/app/oracle/diag/rdbms/test0924/test0924/trace
1 Diag Alert/u01/app/oracle/diag/rdbms/test0924/test0924/alert
1 Diag incident/u01/app/oracle/diag/rdbms/test0924/test0924/incident
1 Diag cdump/u01/app/oracle/diag/rdbms/test0924/test0924/cdump
1 Health Monitor/u01/app/oracle/diag/rdbms/test0924/test0924/hm
1 Default Trace FILE/U01/APP/ORACLE/DIAG/RDBMS/TEST0924/TEST0924/TRACE/TEST0924_ORA_24429.TRC
1 Active problem Count 0
1 Active Incident Count 0
One by one rows selected.


Using Trace files
Each server and background process writes information to the associated trace file.
The error message is written to the appropriate trace file.
Automated Diagnostic Data Archive (ADR).
– A central repository that contains tracking and event logging information for the entire system
– Store database diagnostic data, for example:
-Tracking
-Alert Log
-Health Status Monitor report
Each server and background process writes information to the associated trace file. When the process detects an internal error, the
The information about the error is dumped into the trace file for the process. If an internal error occurs and the information is written in the trace file,
The administrator should contact Oracle Support Services. All file names for the trace files that are associated with the background process contain the name of the process that generated the trace file.
The only exception is the trace file generated by the job queue process (JNNN).
Additional information in the trace file can provide guidance for optimizing an application or an instance. The background process always writes this information to the trace file at the appropriate time.
From Oracle Database One G, an advanced error diagnosis infrastructure was introduced to avoid, detect, diagnose, and resolve problems.
In particular, this feature is targeted at issues that contain critical errors, such as critical errors caused by database code bugs, metadata corruption, and customer data corruption.
When a critical error occurs, it is assigned an unexpected event number, and the system immediately captures the diagnostic data for the error, such as a trace file, and uses that number to mark the data.
This data is then stored in an automated diagnostic data archive (ADR, file-based repository outside the database),
The data can be retrieved and analyzed later by an unexpected event number.
ADR is a central repository that contains tracking and event logging information for the entire system.
Used to provide database diagnostic data (such as tracking, alert logs, Health Monitor reports, and so on).
The ADR root is also known as the ADR base directory, and its location is set by the Diagnostic_dest initialization parameter.
If you omit this argument or leave it blank, the database is set to Diagnostic_dest at startup, as follows:
If the ORACLE_BASE environment variable is set, the Diagnostic_dest is set to the directory specified by Oracle_base.
If the ORACLE_BASE environment variable is not set, the Diagnostic_dest is set to $oracle_home/log.
The location of the ADR home directory is given by the following path, which begins with the ADR base directory:./diag/product_type/db_id/instance_id

Note: The contents of the essay are from the online data collation, for reference only.

Oracle DB View alert log

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.