![]() You can modify the script according to your scenario SELECT 'ALTER SYSTEM KILL SESSION '''||sid||','||serial#||''' IMMEDIATE ' FROM v$session WHERE USERNAME LIKE '% TEST%' AND STATUS=' INACTIVE' and LAST_CALL_ET > 10000 SQL script to kill all the sessions which run with user TEST and which are INACTIVE and run for more than 10000 seconds. ![]() SQL script to kill all the sessions which run with user TEST and which are INACTIVE SELECT 'ALTER SYSTEM KILL SESSION '''||sid||','||serial#||''' IMMEDIATE ' FROM v$session WHERE USERNAME LIKE '% TEST%' AND STATUS=' INACTIVE' SQL script to kill all the sessions run with username called TEST SELECT 'ALTER SYSTEM KILL SESSION '''||sid||','||serial#||''' IMMEDIATE ' FROM v$session WHERE USERNAME LIKE '% TEST%' SQL script to kill all the sessions from the database - Note: Use this script with caution as this will kill all the sessions from the database SELECT 'ALTER SYSTEM KILL SESSION '''||sid||','||serial#||''' IMMEDIATE ' FROM v$session You can use the below scripts to quickly act based on your scenario ![]() ![]() You are in situation to quickly kill multiple sessions which consume high resource on database which cause performance issues.
0 Comments
Leave a Reply. |