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;
删除成功,好记性不如烂笔头,记录一下

原文地址:http://blog.51cto.com/yangjunfeng/2352863

时间: 2024-10-28 04:52:31

ORA-01940: cannot drop a user that is currently的相关文章

在oracle database中,一个datafile 可以被drop的条件

参考mos文章: Unable to Drop a Datafile From the Tablespace Using Alter Tablespace Command (文档 ID 1050261.1) 违反下列任何一个条件,该datafile均不能被drop 1)必须为空,否则会报:ORA-03262: the file is non-empty.值得注意的是,non-empty的含义是有extent被分配给了table,而不是该table中有无rows 此时若是使用drop table

Drop dual

有网友删除dual表出现了问题: 删除dual表的时候hang住,然后直接shutdown abort.再重新启动数据库的时候,发现open的时候一直hang住,但是打开另外一个窗口数据库确实已经打开的. 下面进行模拟: [email protected]>drop table dual; 一直hang在这不动 在另外一个窗口: [email protected]>shutdown abort ORACLE instance shut down. 重启数据库: [email protected

偶遇问题之ORA 600 [kkpoxgsoh1

alert.log中报错,查看如下: Fri Jul 18 09:25:50 2014 Errors in file /apps/oracle/diag/rdbms/smsrac/smsrac2/trace/smsrac2_ora_15454.trc  (incident=16321): ORA-00600: 内部错误代码, 参数: [kkpoxgsoh1], [0], [], [], [], [], [], [], [], [], [], [] Incident details in: /ap

ORA-02429: cannot drop index used for enforcement of unique /primary key

相信不少人遇到过ORA-02429: cannot drop index used for enforcement of unique /primary key 这个错误,对应的中文提示"ORA-02429: 无法删除用于强制唯一/主键的索引",其实从错误提示信息已经很明显了.下面还是用一个简单的例子述说一下该错误的来龙去脉. ORA-02429错误的原因是因为用户试图删除一个用于强制唯一/主键的索引,解决方法也很简单,删除对应的约束就会自动删除该索引. [[email protect

Oracle 错误总结及问题解决 ORA

参考地址 ORA-00001: 违反唯一约束条件 (.)错误说明:当在唯一索引所对应的列上键入重复值时,会触发此异常.ORA-00017: 请求会话以设置跟踪事件ORA-00018: 超出最大会话数ORA-00019: 超出最大会话许可数ORA-00020: 超出最大进程数 ()ORA-00021: 会话附属于其它某些进程:无法转换会话ORA-00022: 无效的会话 ID:访问被拒绝ORA-00023: 会话引用进程私用内存:无法分离会话ORA-00024: 单一进程模式下不允许从多个进程注册

Oracle 错误代码详解及解决方式--ORA

ORA-00001: 违反唯一约束条件 (.)错误说明:当在唯一索引所对应的列上键入重复值时,会触发此异常.ORA-00017: 请求会话以设置跟踪事件ORA-00018: 超出最大会话数ORA-00019: 超出最大会话许可数ORA-00020: 超出最大进程数 ()ORA-00021: 会话附属于其它某些进程:无法转换会话ORA-00022: 无效的会话 ID:访问被拒绝ORA-00023: 会话引用进程私用内存:无法分离会话ORA-00024: 单一进程模式下不允许从多个进程注册ORA-0

ora错误解释

ORA-00001: 违反唯一约束条件 (.)错误说明:当在唯一索引所对应的列上键入重复值时,会触发此异常.ORA-00017: 请求会话以设置跟踪事件ORA-00018: 超出最大会话数ORA-00019: 超出最大会话许可数ORA-00020: 超出最大进程数 ()ORA-00021: 会话附属于其它某些进程:无法转换会话ORA-00022: 无效的会话 ID:访问被拒绝ORA-00023: 会话引用进程私用内存:无法分离会话ORA-00024: 单一进程模式下不允许从多个进程注册ORA-0

oracle中delete drop truncate的用法和区别

数据库的运维中,经常会遇到delete drop truncate的操作,那么如何去把握它们的用法和区别呢? 比如当数据库空间爆满,已经增长到存储空间单个存储文件的最大值32G.你需要通过一些办法释放掉表空间或者扩容表空间来解决问题. 一般当系统中大量使用分区表,而针对分区表清除数据,是不会释放表空间的,必须把分区drop掉,才会释放空间. 下面我们具体了解一下这三个命令: 一.delete 1.delete是DML,执行delete操作时,每次从表中删除一行,并且同时将该行的的删除操作记录在r

hive创建表失败,drop表失败

一.hive创建表失败,报错: CREATE TABLE pokes (foo INT, bar STRING);FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. MetaException(message:javax.jdo.JDODataStoreException: An exception was thrown while adding/validating class(

闪回drop恢复表后sql执行计划异常

-----正常执行计划 set autotrace traceonly set linesize 1000 select /*+index(t idx_object_id)*/ * from t where object_id=19; Execution Plan ---------------------------------------------------------- Plan hash value: 2041828949 ------------------------------