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

转载 2011年01月08日 15:28:00

问题提出:

SQL〉DROP USER USER1 CASCADE

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

由于当前用户正连接到数据库,所以无法删除

解决办法:

1、查询此用户的会话进程,

SQL〉SELECT SID,SERIAL# FROM V$SESSION WHERE USERNAME='USER1';

       SID    SERIAL#
---------- ----------
        24      25341

2、结束此用户的所有会话

SQL>ALTER SYSTEM KILL SESSION '24,25341';

System altered.

3、删除用户

SQL〉DROP USER USER1 CASCADE;

 

相关文章推荐

5.The database instance is currently using SPFILE. View the Exhibit and examine the error that you

5.The database instance is currently using SPFILE. View the Exhibit and examine the error that you

centos userdel删除用户时候提示userdel: user *** is currently used by process 20879

今天在centos7 删除用户时候提示: userdel: user hadoop is currently used by process 20879使用vipw命令 然后使用vipw -s...
  • rgrep
  • rgrep
  • 2016年07月28日 13:28
  • 3678

This Task Is Currently Locked by a Running Workflow and Cannot Be Edited

Problem: In SharePoint Workflow, "This task is currently locked by a running workflow and cannot be ...

用户删除时出现 user aa is currently logged in

当进行用户删除时出现以下提示  :user aa is currently logged in 解决方法:  mv /var/run/utmp /var/run/utmp_tou...

linux删除普通用户报错 userdel: user fancy is currently used by process 1973

【报错信息】userdel: user fancy is currently used by process 1973 我把1973这个进程kill了以后仍然存在,也就是没有真正的kil...

Cannot drop a database link after changing the global_name ORA-02024 [ID 382994.1]

Cannot drop a database link after changing the global_name ORA-02024 [ID 382994.1] Modified 22-NOV-2...

错误案例(QPaintDevice: Cannot destroy paint device that is being painted)

今天,帮一网友改程序,非常郁闷,一个小bug找了很就,于是把程序写下,作下记录: 程序的功能大致是,点击四个按钮,分别显示四个图片在窗口! 先上程序: __author__ = 'Adminis...

Cannot write to snapshot prefix '***'. Make sure that the directory exists and is writeable解决方法

Cannot write to snapshot prefix 'caffe/examples/mnist/lenet'. Make sure that the directory exists a...

Cannot forward a response that is already committed

异常一:java.lang.IllegalStateException:Cannot   forward   a   response ...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:ORA-01940: cannot drop a user that is currently connected
举报原因:
原因补充:

(最多只允许输入30个字)