Oracle Kill Session Scripts -4

Hi,

Sometimes application developers or client offers you to kill any session or sessions group like SQL Net Client, or JDBC Client sessions, RMAN sessions or All sessions.

 

You can read other Kill Session Scripts in Oracle.

 

 

You may want to kill some users sessions which are still executing more than 720 seconds and without SYS user and User type ( not background sessions ), then you can use following useful Oracle DBA script.

 

 

SELECT 
'alter system kill session ''' || SID || ',' || s.serial# ||',@'||p.inst_id|| ''';'
FROM gv$session s, gv$process p
WHERE s.paddr = p.addr(+)
and s.TYPE ='USER' and s.username!='SYS' and status='ACTIVE' and last_call_et > 720;

alter system kill session '409,13205,@2';
alter system kill session '776,14616,@2';
alter system kill session '1187,19997,@2';
alter system kill session '2694,61796,@2';
alter system kill session '24,29348,@2';
alter system kill session '822,34620,@2';
alter system kill session '1181,15588,@2';
alter system kill session '2310,62598,@2';
alter system kill session '409,13205,@1';
alter system kill session '776,14616,@1';
alter system kill session '1187,19997,@1';


  System altered.
System altered.
System altered.
System altered.
System altered.
System altered.
System altered.
System altered.
System altered.
System altered.
System altered.



  

Mehmet Salih Deveci

I am Founder of IT Tutorial and Certified Expert about Oracle & SQL Server database, Goldengate, Exadata Machine, Oracle Database Appliance administrator with 10+years experience.I have OCA, OCP, OCE RAC Expert Certificates I have worked 100+ Banking, Insurance, Finance, Telco and etc. clients as a Consultant, Insource or Outsource.I have done 200+ Operations in this clients such as Exadata Installation & PoC & Migration & Upgrade, Oracle & SQL Server Database Upgrade, Oracle RAC Installation, SQL Server AlwaysOn Installation, Database Migration, Disaster Recovery, Backup Restore, Performance Tuning, Periodic Healthchecks.I have done 2000+ Table replication with Goldengate or SQL Server Replication tool for DWH Databases in many clients.If you need Oracle DBA, SQL Server DBA, APPS DBA,  Exadata, Goldengate, EBS Consultancy and Training you can send my email adress mehmetsalih.deveci@outlook.com.-                                                                                                                                                                                                                                                 -Oracle DBA, SQL Server DBA, APPS DBA,  Exadata, Goldengate, EBS ve linux Danışmanlık ve Eğitim için  mehmetsalih.deveci@outlook.com a mail atabilirsiniz.

2 thoughts on “Oracle Kill Session Scripts -4

  • May 8, 2019 at 10:00 am
    Permalink

    Thank you, I’ve recently been searching for information about this topic for ages and yours is the greatest I have discovered till now. But, what about the conclusion? Are you sure about the source?

    Reply
  • May 12, 2019 at 4:06 am
    Permalink

    At this time I am ready to do my breakfast, when having my breakfast coming yet again to read additional news.|

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *