Oracle

How to kill session in Oracle RAC database?

We use v$session for indetifying target session to kill in non-rac database.Here in Oracle RAC instance we should need to check and identify session using gv$session. Because only gv$session contains rac instance identifier column.

SQL>select sid,serial#,inst_id from gv$session where machine=’GPTWORKGROUP’;
SID SERIAL# INST_ID
——— ——— ——-
9 171 1
1 row selected
SQL> alter system kill session ‘9,171,@1’;
System altered.
OR optionally you can use following command to kill session in Oracle RAC…
SQL>alter system kill session ‘9,171,@1’ immediate;
System altered.

In the single database ;

SELECT ‘ALTER SYSTEM KILL SESSION ‘||sid||’,’||serial#||’;’ FROM v$session;

Advertisements
Standard

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s