SOLVED

ORA-00027: Cannot Kill Current Session

Asked by OracleDba13 viewsoracle

#oracle#error

Solutions(1)

Accepted Solution
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
Generally , This error occurs , when you are trying to kill your current session, which is not allowed.

EXAMPLE:

Get the sid and serial# for the current session.

SQL> select username,inst_id, sid, serial# FROM gV$SESSION WHERE audsid = userenv(‘sessionid’);

USERNAME INST_ID SID SERIAL#

—————————— ———- ———- ———-

SYSTEM 1 242 14

Try to kill the session from current session:

SQL> alter system kill session ‘242,14’ immediate;

alter system kill session ‘242,14’ immediate

*

ERROR at line 1:

ORA-00027: cannot kill current session

Now  open another terminal and run the ALTER SYSTEM KILL statement, it will execute successfully.

SQL> alter system kill session ‘242,14’ immediate; 

Session Killed

Hope it Helps!
OracleDba

Post Your Solution