Script to kill session from sql_id

Hello Friend's

In This post I am posting dynamic queries to kill session for particular sql_id .

so let's get started

Script 1 : For Non Rac system .



SELECT 'alter system kill session '
|| ''''
|| SID
|| ','
|| SERIAL#
|| ' immediate ;'
FROM v$session
WHERE sql_id = '&sql_id';

Scripts 2 : For Rac System.



SELECT 'alter system kill session '
|| ''''
|| SID
|| ','
|| SERIAL#
|| ',@'
|| inst_id
|| ''''
|| ' immediate ;'
FROM gv$session
WHERE sql_id = '&sql_id'
Previous
Next Post »

1 comments:

Click here for comments
Harshit
admin
January 17, 2021 at 11:20 PM ×

Good scripts

Congrats bro Harshit you got PERTAMAX...! hehehehe...
Reply
avatar