Database Reference
In-Depth Information
LEV
----------
0
SQL> CONNECT / AS SYSDBA
Connected.
SQL> EXECUTE sys.dbms_system.read_ev(10231, :lev)
LEV
----------
10
Event 10231 was not enabled in the database session that ran ALTER SYSTEM SET EVENTS .
After starting a new database session, the event is set. At this point the export utility might be
started to salvage the data. As soon as it finishes, the event may be switched off.
SQL> ALTER SYSTEM SET EVENTS '10231 trace name context off';
System altered.
SQL> CONNECT / AS SYSDBA
Connected.
SQL> EXECUTE sys.dbms_system.read_ev(10231, :lev)
LEV
----------
0
ALTER SESSION/SYSTEM SET EVENTS and
Diagnostic Dumps
ALTER SESSION SET EVENTS and ALTER SYSTEM SET EVENTS may also be used to request certain diag-
nostic dumps in the event of an ORA- nnnnn error. The resulting trace files could be sent to
Oracle Support for analysis. Usually, such trace files document the state of an instance at the
time when an error occurred. Thus, they may prove useful in pinpointing the cause of a defect.
The syntax for requesting a dump when an ORA- nnnnn error occurs is as follows:
ALTER {SESSION|SYSTEM} SET EVENTS 'error_code TRACE NAME dump_name LEVEL lvl'
To print a list of available dumps, use the command ORADEBUG DUMPLIST in SQL*Plus. Following
is the syntax for disabling a dump in the event of an ORACLE error:
ALTER {SESSION|SYSTEM} SET EVENTS 'error_code TRACE NAME dump_name OFF'
Let's assume that several sessions have encountered the error ORA-04031, for example
“ORA-04031: unable to allocate 4096 bytes of shared memory ("java pool","unknown object","joxs
heap","Intern")”. To create a heap dump each time any database session receives the ORACLE
error 4031, you would run the following ALTER SYSTEM statement: 4
SQL> ALTER SYSTEM SET EVENTS '4031 trace name heapdump level 536870914';
System altered.
4.
Oracle10 g automatically writes a trace file when an ORA-4031 error is raised.
 
Search WWH ::




Custom Search