for drop user username cascade

In some case, we may want to drop user.
so we can use this sql as follow:

drop user username cascade;

but if the user is connected, we can't drop it.
so first , we should find which one is connected

we can use
select username,sid, serial# from v$session
then
alter system kill session 'sid,serial';

here may pay attention, there may be many connections, so nee kill more than one time.

drop user 'yourname' cascade;

posted on 2012-06-29 17:04  子虚乌有  阅读(229)  评论(0)    收藏  举报