最近Oracle把哦整爽老。哇哈哈。。
select username,sid,serial# from v$session
------------------------------------------
如下结果:
username
----------------------------------------
NETBNEW
NETBNEW
NETBNEW
NETBNEW
WUZHQ
(2)找到要删除用户的sid,和serial,并删除
-------------------------------------------
如:你要删除用户'WUZHQ',可以这样做:
alter system kill session'532,4562'
(3)删除用户
--------------------------------------------
drop user username cascade
(**)如果在drop 后还提示ORA-01940:无法删除当前已链接的用户,说明还有连接的session,可以通过查看session的状态来确定该session是否被kill 了,用如下语句查看:
-------------------------------------
select saddr,sid,serial#,paddr,username,status from v$session where username is not null
结果如下(以我的库为例):
--------------------------------------------------------------------------------------------------------
564A1E28
564A30DC
564A5644
564B6ED0
564B8184