Back to Blog
Oracle kill session6/13/2023 ![]() WHERE o.object_id = l.object_id and o. SELECT o.owner, o.object_name, o.object_type, o.last_ddl_time, o.status, l.session_id, l.oracle_username, l.locked_mode How to kill a particular object blocking session:ġ.Find the tables(objects) which are locked: ![]() WHERE s.type != ‘BACKGROUND’ AND S.USERNAME LIKE ‘%ODI%’ ![]() JOIN gv$process p ON p.addr = s.paddr AND p.inst_id = s.inst_id SELECT s.inst_id,s.sid,s.serial#,p.spid, s.username, s.program How to get the list of Users and Processes running ODI sessions: And terminated user session will get message in sqlplus that 'your session has been killed' in Oracle RAC instance. ![]() SQL> alter system kill session 9,171,1 immediate System altered. OR optionally you can use following command to kill session in Oracle RAC. WHERE status =’ACTIVE’ AND USERNAME LIKE ‘%ODI%’ SQL> alter system kill session 9,171,1 System altered. How to kill all ODI sessions in Database: Note:For RAC Database where we have more than 1 instances,we need to follow step 2 on all the Oracle instances. How to kill all active session in Database:įROM v$session WHERE status =’ACTIVE’ and type != ‘BACKGROUND’ SQL> RAC Database where we have more than 1 instances,we need to follow step 2 on all the Oracle instances. SELECT ‘ALTER SYSTEM KILL SESSION ‘||””||sid ||’,’|| serial#||””||’ immediate ’įROM v$session WHERE status =’INACTIVE’ and type != ‘BACKGROUND’ Step 2:How to kill all inactive session in Database We often get task to kill multiple sessions which are active,inactive and the session related with a particular program.When we have one or two sessions we can kill it easily,if we have multiple sessions we can do it as follows:
0 Comments
Read More
Leave a Reply. |