This note describes how to set events when the Oracle database was started with SPFILE.
event, events, init.ora, init<SID>.ora, SPFILE, parameter, Oracle 9i, server parameter fileReason and Prerequisites
You are using Oracle 9i or higher and you are using the SPFILE
(= binary server side parameter file) as parameter file.
(For further information on SPFILEs, see SAP Note 601157.)
This note gives an overview on how to set events in the database (especially multiple events) when using the SPFILE.
You can use the following command to check whether the instance uses the SPFILE:
show parameter spfile.
If the check returns a value under VALUE, the instance was started with SPFILE, if not, it was started with init<SID>.ora.
You can already issue the command in the NOMOUNT status.
Previously, events were entered as follows in init<SID>.ora (example):
event="10181 trace name context forever, level 10"
event="10183 trace name context forever, level 1"
If there are other parameters in between, only the last event is executed.
The best way to set events in the SPFILE is to use SQL statements:
SQL> ALTER SYSTEM SET
EVENT='10181 trace name context forever, level 10',
'10183 trace name context forever, level 1'
COMMENT='my comment, user, date'
To activate the events, you must restart the instance.
The following are possible error messages:
ORA-32001: write to SPFILE requested but no SPFILE specified at startup
--> The Instance was not started with SPFILE (see above)
ORA-0295: specified initialization parameter cannot be modified
--> SPFILE was not specified as SCOPE for this/these event/s.
1) You can already issue the command in the NOMOUNT status.
2) Events that have already been set are deleted if they are not specified again.
You can display the events that have already been set with:
show parameter event
3) A sequence of events is separated with ",".
4) To delete all events, use:
SQL> ALTER SYSTEM RESET EVENT SCOPE=SPFILE SID='*';
For RAC, you must specify the instance name instead of "*".
5) Another option to specify several events is to use
'event1:event2:...'. However, we no longer recommend this.
(For further information, see Note 601157.)
For events that are executed immediately, for example, dumps or tracing, the syntax is still as follows:
SQL> ALTER SESSION SET EVENTS='10053 trace name context forever';
'Database' 카테고리의 다른 글
|Oracle 11g Upgrade (1)||2016.11.23|
|오라클 테이블스페이스 사용량 조회 (0)||2014.04.22|
|[ORACLE] opatch적용시 checkactivefilesandexecutables 발생 (0)||2013.09.11|
|Note 1431798 - Oracle 11.2.0: Database Parameter Settings (0)||2011.11.01|
|SAP Notes 596423 Events and SPFILE (0)||2011.11.01|
|[ORACLE] ORA-02097, ORA-00439 (0)||2011.06.09|