无法删除当前已连接的用户

SQL> drop user a cascade;
drop user a cascade
*
ERROR 位于第 1 行:
ORA-01940: 无法删除当前已连接的用户

SQL> select username,sid,serial# from v$session;

USERNAME                              SID    SERIAL#
------------------------------ ---------- ----------
                                        1          1
                                        2          1
                                        3          1
                                        4          1
                                        5          1
                                        6          1
                                        7          1
SYS                                     8          3
A                                       9          4

已选择9行。

SQL> alter system kill session'9,4';

系统已更改。

SQL> drop user a cascade;

用户已丢弃

SQL>

你可能感兴趣的:(sql)