ORA-01940: cannot drop a user that is currently connected :
SQL> drop user ANDY cascade ;
drop user ANDY cascade
*
ERROR at line 1:
ORA-01940: cannot drop a user that is currently connected
SQL> select sid,serial# ,username from v$session where username like '%AND%';
SID SERIAL# USERNAME
---------- ---------- ------------------------------
745 821 ANDY
SQL> alter system kill session '745,821' immediate ;
System altered.
SQL> drop user ANDY ;
drop user ANDY
*
ERROR at line 1:
ORA-01940: cannot drop a user that is currently connected
Solution is :
SQL> startup force restrict;
ORACLE instance started.
Total System Global Area 7686086656 bytes
Fixed Size 2228032 bytes
Variable Size 1811939520 bytes
Database Buffers 5729419264 bytes
Redo Buffers 142499840 bytes
Database mounted.
Database opened.
SQL> drop user ANDY cascade ;
User dropped.
SQL> drop user ANDY cascade ;
drop user ANDY cascade
*
ERROR at line 1:
ORA-01940: cannot drop a user that is currently connected
SQL> select sid,serial# ,username from v$session where username like '%AND%';
SID SERIAL# USERNAME
---------- ---------- ------------------------------
745 821 ANDY
SQL> alter system kill session '745,821' immediate ;
System altered.
SQL> drop user ANDY ;
drop user ANDY
*
ERROR at line 1:
ORA-01940: cannot drop a user that is currently connected
Solution is :
SQL> startup force restrict;
ORACLE instance started.
Total System Global Area 7686086656 bytes
Fixed Size 2228032 bytes
Variable Size 1811939520 bytes
Database Buffers 5729419264 bytes
Redo Buffers 142499840 bytes
Database mounted.
Database opened.
SQL> drop user ANDY cascade ;
User dropped.
No comments:
Post a Comment