ITPub博客

首页 > Linux操作系统 > Linux操作系统 > ORA-01940: cannot drop a user that is currently connected

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

原创 Linux操作系统 作者:mzc_uk 时间:2011-10-04 13:34:20 0 删除 编辑

select s.sid, s.serial#, s.status, p.spid from v$session s, v$process p

where s.username = '' and p.addr (+) = s.paddr

/

select job from dba_jobs where log_user='';

select queue_table,qid from dba_queues where wner='myuser';

select apply_name from dba_apply where queue_owner='myuser';

select capture_name, queue_name, from dba_capture where queue_owner='myuser';

select propagation_name from dba_propagation where

source_queue_owner='myuser'

or destination_queue_owner='myuser';

 

Kill the session that has not been already kill with:

alter system kill session ',';

 

If all the session are noted 'KILLED' then kill the Unix process (column

spid) with "kill -9".

Then after a while the session will be removed from v$session and you will

be able to drop the user.

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/20500445/viewspace-708605/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: How to get the TOP SQL
请登录后发表评论 登录
全部评论

注册时间:2011-10-03

  • 博文量
    14
  • 访问量
    10151