Which Oracle tracking events include?

Source: Internet
Author: User

The following articles mainly describe Oracle tracking events, including the specific content of an Oracle tracking event, and Oracle tracking event 2: Detailed description of Oracle tracking events. The following describes the specific content of the article.

1. Oracle tracking file, one of Oracle tracking events

There are three types of Oracle trace 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 generate this type of file by executing an oracle tracking event. 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 event 2 Oracle tracking event

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:

 
 
  1. 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 process, which only affects the current session. The format is as follows:

 
 
  1. 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 event that is tracked when an Oracle error number has an error) or an internal event number of oralce, 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 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.

The above content is the description of Oracle tracking events, hoping to help you in this regard.

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.