Search notes:

Oracle: DBMS_SUPPORT

dbms_support needs to be installed manually with dbmssupp.sql (which is found in the $ORACLE_HOME/rdbms/admin directory):
SQL> @?/rdbms/admin/dbmssupp
After installing dbms_support, only sys has access to it. In order for other users to be able to use it, they need to be granted access:
grant execute on dbms_support to rene;

Functions and procedures

mysid Returns the session id that identifies the own's session.
package_version
start_trace Starts tracing in the current session (output is written to the user trace file).
start_trace_in_session Starts tracing in the session indicated by the sid parameter. Compare with dbms_system.set_ev.
stop_trace
stop_trace_in_session

Starting a diagnostic trace

Event 10046, level 12
exec dbms_support.start_trace( binds=>true , waits=>true);
Event 10046, level 1, in another session
exec dbms_support.start_trace_in_session (sid => 1802, serial=>54321)
Stop trace:
exec dbms_support.stop_trace
exec dbms_support.stop_trace_in_session(1802, 54321)
Tracing (also for events different than 10046) also be set with dbms_system.set_ev or alter session set events ….

mysid

dbms_support.mysid returns the session id of the session executing this function. Thus, it allows to find the record in v$session that reveals the information about the current session:
select * from v$session where sid=sys.dbms_support.mysid;
See also Identifying the «own» session.

See also

Oracle DBMS PL/SQL Packages
MOS Notes 39817.1, 62160.1 and 62294.1

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1743212475, '3.144.157.244', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/databases/Oracle/installed/packages/dbms/support(84): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78