ORA-01940: cannot drop a user that is currently

Oracle删除某个用户,报错:
12:17:05 SYS@RCBD1(BAPRCDB)> drop user GSDPAY cascade;
drop user GSDPAY cascade
*
ERROR at line 1:
ORA-01940: cannot drop a user that is currently connected

使用删除当前用户会话后,链接一直在变,一直在涨。
12:21:13 SYS@RCBD1(BAPRCDB)> select 'alter system kill session '''||sid||','||serial#||''';' from v$session where username = 'GSDPAY';

'ALTERSYSTEMKILLSESSION'''||SID||','||SERIAL#||''';'

alter system kill session '39,25167';
alter system kill session '144,15001';
alter system kill session '155,31897';
alter system kill session '297,27285';
alter system kill session '478,61659';
alter system kill session '1043,54247';
alter system kill session '1427,47505';
alter system kill session '1565,1707';
alter system kill session '1608,4123';
alter system kill session '1615,9605';
alter system kill session '1728,34805';
alter system kill session '1886,5755';
alter system kill session '2005,36393';
alter system kill session '2023,62813';
alter system kill session '2034,17133';
alter system kill session '2154,36941';
alter system kill session '2297,57457';
alter system kill session '2310,34881';
alter system kill session '2321,4779';
alter system kill session '2427,5759';
alter system kill session '2461,19827';
alter system kill session '2569,56201';
alter system kill session '2721,45675';
alter system kill session '2844,19895';
alter system kill session '2851,63481';
alter system kill session '2984,51063';
alter system kill session '2999,44415';
alter system kill session '3319,40307';
alter system kill session '3450,8641';
alter system kill session '3700,27449';
alter system kill session '3859,35379';
alter system kill session '3884,54613';
alter system kill session '4265,62259';
alter system kill session '4276,38659';
alter system kill session '4428,22593';
alter system kill session '4438,55087';

36 rows selected.

不是这个问题,尝试删除用户表空间
12:24:57 SYS@RCBD1(BAPRCDB)> select default_tablespace from dba_users where username='GSDPAY';

DEFAULT_TABLESPACE

GSDPAY_DATA

12:25:05 SYS@RCBD1(BAPRCDB)> drop tablespace GSDPAY_DATA including contents and datafiles;

Tablespace dropped.

12:29:08 SYS@RCBD1(BAPRCDB)> drop user GSDPAY cascade;
删除成功,好记性不如烂笔头,记录一下

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值