Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

while droping user getting error cannot drop user that is currently connected

mradul goyalMar 26 2015 — edited Mar 26 2015

Hi,

I am trying to drop a user using

DROP USER NETSERVICOS1CM CASCADE;

and got error

ORA-01940: cannot drop a user that is currently connected

then i run this SQL to get SID of the userĀ 


select sid, SERIAL# from v$session where username = 'NETSERVICOS1CM';

and i got almost 48 rows for the user

and after that i run the alter command to kill the particular session


alter system kill session '76,9539'

but when i kill one session with sid and session and again fire the SQL(select statement) then again i got that row with the same SID and session so i am confused here whether my session is killed or not

and one more question that do i need to kill all the SID for the user in order to DROP the USER

My DB Version is :

Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production

PL/SQL Release 11.2.0.3.0 - Production

CORE 11.2.0.3.0 Production

TNS for Linux: Version 11.2.0.3.0 - Production

NLSRTL Version 11.2.0.3.0 - Production

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 23 2015
Added on Mar 26 2015
7 comments
5,913 views