SQL Query to find Session In Oracle Database Not Active from 30 mins
Query
SELECT s.sid,s.serial#,s.username,s.machine,s.program,s.status,s.osuser,s.logon_time,s.last_call_et AS "Elapsed Time (sec)",t.sql_textFROM v$session sJOIN v$sqltext t ON s.sql_address = t.addressWHERE s.type != 'BACKGROUND'AND s.status = 'INACTIVE'AND s.last_call_et > 1800; -- 30 minutes in seconds
Post a Comment
Post a Comment