ORACLE WAIT INTERFACE OWI-v7 script by Srinivas Maddali (NOTE: This script is evolving continuously) DROP TABLE system.session_event_history; create table system.session_event_history(sid,serial#,username,osuser,paddr,process,logon_time,type,event,total_waits,total_timeouts,time_waited,average_wait,max_wait,logoff_timestamp)asselect a.sid,b.serial#,b.username,b.osuser,b.paddr,b.process,b.logon_time,b.type,a.event,a.total_waits,a.total_timeouts,a.time_waited,a.average_wait,a.max_wait,sysdate logoff_timefrom v$session_event a,v$session bwhere a.sid=b.sidand b.username=login_userand b.sid=(select sid from v$mystat where rownum <2> and 1=2/ TRUNCATE TABLE system.session_event_history; DROP table system.session_sql_detail; create table system.session_sql_detailasselect a.*,b.sql_textfrom v$session a,v$sql bwhere a.sql_hash_value=b.hash_valueand a.sid=(select sid from v$mystat where …
ORACLE WAIT INTERFACE Read More »