Solved

kill session

Posted on 2013-01-06
4
732 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
[X]
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
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

[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

Question has a verified solution.

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

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…
Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.
Suggested Courses

628 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