Oracle tracking file and file dump

Source: Internet
Author: User
Oracle provides a class of commands to dump information contained in Oracle's various internal structures to the trace file, so that users can solve various faults according to the file content.

Oracle provides a class of commands to dump information contained in Oracle's various internal structures to the trace file, so that users can solve various faults according to the file content.

1. Oracle tracking File

There are three types of Oracle tracking files:

One is the background alarm log file, which records the activity of background processes during database startup, shutdown, and running, such as creating tablespaces, creating rollback segments, some alter commands, log switching, and error messages. When the database fails, you should first check the file, but the information in the file is not necessarily related to any error status. The background alarm LOG file is saved in the directory specified by the BACKGROUND_DUMP_DEST parameter. The file format is SIDALRT. LOG.

Another type is the background trace files created by background processes such as DBWR, LGWR, and SMON. The background trace file is generated based on the running status of the background process. The background trace file is also saved in the directory specified by the BACKGROUND_DUMP_DEST parameter. The file format is siddbwr. trc and sidsmon. trc.

Another type is the user trace file generated by the user process connected to Oracle. These files are generated only when errors occur during user sessions. In addition, you can execute an oracle tracking event (see the following section) to generate this type of file. The User tracking file is saved in the directory specified by the USER_DUMP_DEST parameter. The file format is oraxxxxx. trc, xxxxx is the process number (or thread number) of the file to be created ).

Ii. Oracle tracking events

Oracle provides a class of commands to dump information contained in various Oracle internal structures to a trace file, so that users can solve various faults according to the file content. There are two ways to set the tracking event. One is to set the event in the init. ora file, so that after the database is opened, all sessions will be affected. The format is as follows:

EVENT = "eventnumber trace name eventname [forever,] [level levelnumber]:..."

You can use the symbol to set multiple events in a row or multiple events in a row.

Another method is to use the alter session set events command during the session, which only affects the current session. The format is as follows:

Alter session set events '[eventnumber | immediate] trace name eventname [forever] [, level levelnumber]: ......'

Through the symbol, you can set multiple events consecutively, or you can use alter session set events consecutively to set multiple events.

Format description: eventnumber refers to the event number that triggers dump. The event number can be an Oracle error number (the specified event is tracked when an error occurs) or an internal oralce event number, the internal event number is between 10000 and 10999, and cannot be used with the immediate keyword.

The immediate keyword indicates that the specified structure is immediately dumped to the trace file after the command is issued. This keyword is only used in the alter session Statement and cannot be used with the eventnumber or forever keyword.

Trace name is a keyword.

Eventname refers to the event name (see the following section), that is, the actual structure name for dump. If eventname is context, internal event numbers are used for tracking.

The forever keyword indicates that the event remains valid during the instance or session period and cannot be used with immediate.

Level is the event-level keyword. But the error stack (errorstack) does not have a level.

Levelnumber indicates the event level number. Generally, from 1 to 10, 1 indicates only the dump structure header information, and 10 indicates all the information of the dump structure.

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.