Saturday, October 10, 2020

Find and Clear INACTIVE SESSIONS

select 'alter system kill session '||' '||""||s.sid||','||s.serial# ||"' immediate;' FROM v$session s
WHERE s.type!= 'BACKGROUND'
AND S.TYPE='USER'
AND S.USERNAME='<SCHEMA NAME>'
AND TRUNC(S.LOGON_TIME) < '28-JUN-2018'
AND S.STATUS='INACTIVE'
— and last_call_et > 30 — more than 30 mins inactive 

No comments:

Post a Comment

Featured post

Migrate OCR & vote from external to normal or High redundancy in ASM

How to Move OCR & Vote from external to Normal or high. 1)  Create New diskgroup(CRS) with suitable redundancy for OCR and Voting files....

Popular Posts