How to turn trace and set events using dbms_system?

To turn on trace for a specific event. exec dbms_system.set_ev(<SID>, <serial#>, <event>, 8, ''); Example: Enable trace at level 8 for session id 10046 exec dbms_system.set_ev(12345, 543211, 10046, 8, ''); — To turn off the tracing: exec dbms_system.set_ev(<SID>, <serial#>, <event>, 0, ''); Example: exec dbms_system.set_ev( 1234, 56789, 10046, 0, ''); Advertisements

How to set max_dump_file_size on a running session?

Using dbms_system.set_int_param_in_session, one can set max_dump_file_size of a running session. In the example it sets trace file to 100MB exec sys.dbms_system.set_int_param_in_session(sid => <sid>, serial# => <serial#>, parnam => 'MAX_DUMP_FILE_SIZE', intval => 100*1024*1024);