Wednesday, October 9, 2013

ORA-01940: cannot DROP a user that is currently logged in

SQL> DROP USER MYUSER CASCADE;

 

ORA-01940: cannot DROP a user that is currently logged in 

 

To Find The Currently Connected Users

 

SQL> SELECT S.SID, S.SERIAL#, S.STATUS, P.SPID 

FROM V$SESSION S, V$PROCESS P 

WHERE S.USERNAME = 'MYUSER' 

AND P.ADDR (+) = S.PADDR;

No comments:

Post a Comment