[Oracle] How to set up event in Oracle

Source: Internet
Author: User

To investigate the failure of Oracle, you can set up an event to learn more about the situation. Here's how:

If you use SPFILE,

=============
To enable it:

1. Check The current event setting status:

Sql> show parameter event;

2. Add an event and set it up:

If there is the no existing event, it is set as follows:
Sql> alter system set event = ' 235 errorstack (3) systemstate (Ten) ' scope = SPFile;

If There is an existing event, add it and set it as follows:
For example, if there was already an event of "902 Errorstack (3) systemstate" As a result of the above "1"
Sql> alter system set event = ' 902 Errorstack (3) SystemState: 235 errorstack (3) systemstate (Ten) ' scope = SPFile ;

3. Just to be sure, I'll get a backup of SPFILE:

Example of execution:
sql> Create pfile = '/Home/oracle/pfile.ora ' from SPFile;

4. Restart the database.


=============
To disable it:

1. Delete Event 235:

If there is the no existing event, it is set as follows:
Sql> alter system set event = ' scope = SPFile;

If There is an existing event, restore the original value:
For example, if there was already an event "902 Errorstack (3) systemstate ()" Before this event setting,
Sql> alter system set event = ' 902 Errorstack (3) systemstate (Ten) ' scope = SPFile;

2. Restart the database.



If you use PFILE,

=============
To enable it:

1. Check the line related to "*. Event "with the cat command in the contents of PFILE.

2. Add and configure Event 235:

If there is the no existing event, please modify it as follows:
*. Event = ' 235 errorstack (3) systemstate (10) '

The existing event would be appended and set as follows:
For example, if the event of *. Event = ' 902 errorstack (3) systemstate (Ten) ' already exists as a result of the above "1"
In some cases,
*. Event = ' 902 errorstack (3) systemstate (Ten): 235 errorstack (3) systemstate (10) '

3. Restart the database.

=============
To disable it:

1. Correct the line related to "*. Event "to the contents of PFILE.

If there is the no existing event, it is set as follows:

*. Event = ' '

If There is an existing event, restore the original value:
For example,
If there is already an event of *. event = ' 902 Errorstack (3) systemstate (Ten) ' Before this event setting,
Leave it as following:

*. Event = ' 902 errorstack (3) systemstate (10) '

2. Restart the database.

As for whether the database is using Pfile or spfile, you can see it by looking at the following SQL text:

SELECT * from V$spparameter where value is not null;

If 0 rows are returned, the SPFile boot is used.

[Oracle] How to set up event in Oracle

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.