Oracle - Obtener traza 10046 para tuning
A nivel de sesión:
-----------------
alter session set tracefile_identifier='10046';
alter session set timed_statistics = true;
alter session set statistics_level=all;
alter session set max_dump_file_size = unlimited;
alter session set events '10046 trace name context forever,level 12';
-- Execute the queries or operations to be traced here --
select * from dual;
exit;
Si no queremos terminar la sesión pero si la traza:
alter session set events '10046 trace name context off';
La traza se genera en el udump. Habrá que ejecutar tkprof:
tkprof trace_file_name output_file_name sort=fchela,exeela,prsela
-----------------
alter session set tracefile_identifier='10046';
alter session set timed_statistics = true;
alter session set statistics_level=all;
alter session set max_dump_file_size = unlimited;
alter session set events '10046 trace name context forever,level 12';
-- Execute the queries or operations to be traced here --
select * from dual;
exit;
Si no queremos terminar la sesión pero si la traza:
alter session set events '10046 trace name context off';
La traza se genera en el udump. Habrá que ejecutar tkprof:
tkprof trace_file_name output_file_name sort=fchela,exeela,prsela
Comentarios