Solved

kill session

Posted on 2013-01-06
4
726 Views
Last Modified: 2013-01-10
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
Comment
Question by:walkerdba
4 Comments
 
LVL 16

Accepted Solution

by:
Wasim Akram Shaik earned 500 total points
ID: 38748326
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
 
LVL 23

Expert Comment

by:David
ID: 38748730
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
 
LVL 28

Expert Comment

by:Naveen Kumar
ID: 38749973
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
 

Author Closing Comment

by:walkerdba
ID: 38765198
solution
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article started out as an Experts-Exchange question, which then grew into a quick tip to go along with an IOUG presentation for the Collaborate confernce and then later grew again into a full blown article with expanded functionality and legacy…
Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now