René Nyffenegger's collection of things on the web
René Nyffenegger on Oracle - Most wanted - Feedback -
 

dbms_support

This package should make it possible to trace sessions with more information than it is possible with sql_trace.
The package is not installed by default. ..../rdbms/admin/dbmssupp.sql will install it.
However, the following note is found in dbmssupp.sql:
This package should only be installed when requested by Oracle Support. It is not documented in the server documentation. It is to be used only as directed by Oracle Support.

mysid

select dbms_support.mysid from dual;
Returns the sid of the current session.
Alternatively, the sid can also be found with:
select sys_context('userenv', 'sid') from dual;

start_trace

start_trace sets diagnostic event 10046 and allows to freely set its level with the associated levels:
dbms_support.start_trace(waits in boolean, binds in boolean)

stop_trace

start_trace_in_session

dbms_support.start_trace_in_session(
 sid     number  in
 serial  number  in
 waits   boolean in default
 binds   boolean in default
);
This method is equivalent to dbms_monitor.session_trace_enable. However, the latter only exists in Oracle 10g onwards. If possible, dbms_monitor should be used.

stop_trace_in_session

Thanks

Thanks to Jan-Hendrik van Heusden for a suggestion on this page.