dbms_system is a system package, which is not supported by Oracle.
It has below procedure:
1. ksdwrt -- write message to alert or trace file
dbms_system.ksdwrt(1,'put message to alert')
option 1- in trace file
option 2- in alert log
option 3- in both
2. set_sql_trace_in_session -- set sql trace to another session
dbms_system.set_sql_trace_in_session(sid, serial#, true)
3. set_ev -- set event trace on session
dbms_system.set_ev(sid,serial#, event, level, name)
dbms_system.Set_Ev(31, 97, 10046, 4, '');
4. read_ev -- read event trace setting on session.
dbms_system.read_ev(event, output)
Privilege to use dbms_system
1. login as sys
grant execute on dbms_system to user;
2. login as user
exec sys.dbms_system.ksdwrt(2,'alert message') ;
preference:
http://www.oracle-base.com/articles/8i/dbms_system.php
http://space.itpub.net/519536/viewspace-616481
No comments:
Post a Comment