Dropping connected users in Oracle database

后端 未结 12 1773
执念已碎
执念已碎 2020-12-12 21:49

I want to drop some users in Oracle DB using sqlplus but I am getting error:

SQL> DROP USER test CASCADE;
DROP USER test CASCADE
*
ERROR at line 1:
ORA-01         


        
12条回答
  •  情话喂你
    2020-12-12 22:48

    Users are all capitals in v$session (and data dictionary views). If you match with capitals you should find your session to kill.

    SELECT s.sid, s.serial#, s.status, p.spid 
      FROM v$session s, v$process p 
     WHERE s.username = 'TEST' --<<<--
      AND p.addr(+) = s.paddr
     /
    

    Pass actual SID and SERIAL# values for user TEST then drop user...:

    ALTER SYSTEM KILL SESSION ', '
    /
    

提交回复
热议问题