Solved

kill session

Posted on 2013-01-06
4
731 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: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone 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

Suggested Solutions

Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
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 shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

730 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