ORA-01940: cannot drop a user that is currently connected
来源:互联网 发布:vscode能在xp上安装么 编辑:程序博客网 时间:2024/06/04 18:52
用删除某个用户,但是删除时有用户连接
SQL> conn /as sysdba
Connected.
SQL> drop user test cascade;
drop user test cascade
*
ERROR at line 1:
ORA-01940: cannot drop a user that is currently connected
通过查看用户的进行,并kill用户进程,然后删除用户
SQL> select sid,serial# from v$session where username='test';
no rows selected
SQL> select sid,serial# from v$session where username='TEST';
SID SERIAL#
---------- ----------
150 9019
SQL> alter system kill session '150,9019';
System altered.
注:这里有点怪,我明明通过kill杀掉了TEST的连接会话,但是我还可以通过test用户行sql的查询,所以造成了我继续查询出现了两条信息。
SQL> select sid,serial# from v$session where username='TEST';
SID SERIAL#
---------- ----------
138 2947
150 9019
这里我很纳闷,为什么ORACLE的kill命令并不能真正杀掉进程吗?
SQL> alter system kill session '150,9019';
System altered.
SQL> alter system kill session '138,2947';
System altered.
但是我在kill掉进程后,马上删除用户,用户就直接被删除了。难道ORACLE的kill命令并不真正的杀掉用户进程,而只是表面上的一直现象,后面的操作才是真正的起作用?
SQL> drop user test cascade;
User dropped.
- ORA-01940: cannot drop a user that is currently connected
- ORA-01940: cannot drop a user that is currently connected
- ORA-01940: cannot drop a user that is currently connected
- ORA-01940:cannot drop a user that is currently connected
- ORA-01940: cannot drop a user that is currently connected
- ORA-01940:cannot drop a user that is currently connected
- ORA-01940: cannot drop a user that is currently connected
- ORA-01940: cannot drop a user that is currently connected
- ORA-01940: cannot drop a user that is currently connected
- ora-019401 cannot drop a user that is currently connected
- ERROR:ORA-01940: cannot drop a user that is currently connected
- ORA-01940: cannot drop a user that is currently connected 问题解析
- Linux中删除Oracle用户 提示 ORA-01940: cannot drop a user that is currently connected
- ORA-01940: cannot drop a user that is currently connected 的解决办法
- 遇到ORA-01940: cannot drop a user that is currently
- Cannot drop database "databasename" because it is currently in use.
- drop user a cascade:ORA-00604 ORA-00942 ORA-06512
- This device is not currently connected
- MFC 窗口重绘
- java public protect default private 的作用域
- ireport 中文显示问题
- 浅谈内存读写
- PHP输出缓存控制详解 ob_start,flush,ob_flush
- ORA-01940: cannot drop a user that is currently connected
- Lmbda表达式的简单用例
- PHP浏览器关后还能执行的程序
- 手机音频口反向列表 类Square手机刷卡器注意事项
- 两种获取HDC的方法和TextOut输出
- Android ApiDemos示例解析(94):Text->Marquee
- 匈牙利命名法
- 博客推荐
- 用windows命令行关闭进程