Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

kill session

Posted on 2013-01-06
4
729 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

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.

Question has a verified solution.

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

Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

860 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