Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 758
  • Last Modified:

kill session

kill session not working...


SQL> conn scott/scott
Connected.
SQL> select sid,serial# from v$session where username='SCOTT';

       SID    SERIAL#
---------- ----------
         1         27

SQL> alter system kill session '1,27' immediate;
alter system kill session '1,27' immediate
*
ERROR at line 1:
ORA-00027: cannot kill current session


SQL>
0
walkerdba
Asked:
walkerdba
1 Solution
 
Wasim Akram ShaikCommented:
why do you want your own session to get killed??

it seems that you are trying to practise on kill session..

identify the correct sid,serial# combination to kill the session..


if you want to kill your own session then easy way wouold be to login from other session and you can execute the same command.. it will get killed..
0
 
DavidSenior Oracle Database AdministratorCommented:
I presume you are trying to kill a different session.  Try:

select * from sys.v$session where USERNAME LIKE ‘SCHEMA_NAME here%’ and status=’ACTIVE’;
0
 
Naveen KumarProduction Manager / Application Support ManagerCommented:
as mentioned already, you cannot kill the current session from the same session. so either kill some other session or when you disconnect/log off, then your session gets closed off automatically.

but the syntax you had used to kill the session is correct but it just needs some other sid & serial#
0
 
walkerdbaAuthor Commented:
solution
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now