Tuesday, 1 August 2023
how to enable trace for the session in oracle database
EXECUTE dbms_monitor.session_trace_enable (, , waits=>true, binds=>true);
--->Check the trace file that would be created :
SELECT s.sid,p.tracefile
FROM v$session s
JOIN v$process p ON s.paddr = p.addr
WHERE s.sid in ();
---> Let it run for sometime
--->and then disable the trace:
EXECUTE dbms_monitor.session_trace_disable (session_id => , serial_num => );
How to find the RMAN backup run history or status
set linesize 500 pagesize 2000
col Hours format 9999.99
col STATUS format a10
select SESSION_KEY, INPUT_TYPE, STATUS,
to_char(START_TIME,'mm-dd-yyyy hh24:mi:ss') as RMAN_Bkup_start_time,
to_char(END_TIME,'mm-dd-yyyy hh24:mi:ss') as RMAN_Bkup_end_time,
elapsed_seconds/3600 Hours from V$RMAN_BACKUP_JOB_DETAILS
order by session_key;
Subscribe to:
Posts (Atom)