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.
https://ittutorial.org/oracle-kill-session-scripts-2/
https://ittutorial.org/oracle-kill-session-scripts-3/
gv$lock view lists the locks currently held by the Oracle Database and outstanding requests for a lock or latch.
You can list the locks running the following command.
SQL> select * from gv$lock;
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.
Do you want to learn Oracle Database for Beginners, then read the following articles.
https://ittutorial.org/oracle-database-19c-tutorials-for-beginners/
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?
At this time I am ready to do my breakfast, when having my breakfast coming yet again to read additional news.|
Hi Mehmetsalih,
I have one question, i found one sql_id and talking multiple plans, i have pinned the new plan also but plan was not picking i able to see multiple sql_id are running for this same sql_id.how we can resolve. This type of issues? I hope can you please explain more…
Regards,
Baba.
Use SQL Plan baselines for solution, read this article.
https://ittutorial.org/oracle-database-performance-tuning-tutorial-15-how-to-create-sql-plan-baselines-using-enterprise-manager-cloud-control/