The ORA-01940 cannot delete the solution for the currently connected user 1) view the user's connection status select username, sid, serial # from v $ session (2) Find the sid of the user to delete, and serial, and delete ------------------------------------------- if you want to delete the user 'wuzhq', you can do this: alter system kill session '123 ';
(3) delete user drop user username cascade (**) If you still prompt ORA-01940 after drop: Unable to delete the user already linked, there is a connection session, you can check the session status to check whether the session has been killed. Use the following statement to check whether the session has been killed: select saddr, sid, serial #, paddr, username, status from v $ session where username is not null ): saddr sid serial # paddr username status 564A1E28 513 22974 569638F4 netbnew active 564A30DC 514 18183 running 688cc netbnew inactive 564A5644 516 21573 56963340 NETBNEW INACTIVE 564B6ED0 531 9 49262d8c netbnew inactive 564B8184 532 4562 56A1075C www.2cto. the comWUZHQ KILLED status indicates the session status of the user to be deleted. If the status is inactive, the user is not killed. If the status is KILLED, the user is killed. It can be seen that the session of the user WUZHQ has been killed. Users can be safely deleted.
Author: wangliya110