Oracle users cannot be deleted, and the system prompts "unable to delete connected users" 1. alter user XXX account lock; SELECT * from v $ session where username = 'lgdb'; alter system kill session 'xx, xx' drop user xx cascade 2. or shut down the database and restart www.2cto.com as follows: (1) view the user's connection status select username, sid, serial # from v $ session ------------------------------------------ the following result: username sid serial # ---------------------------------------- NETBNEW 513 22974 NETBNEW 514 18183 NETBNEW 516 21573 NETBNEW 531 9 WUZHQ 532 4562 (2) locate the sid and serial of the user to be deleted, and delete -------------------------------------. For example: You want to delete the user 'wuzhq: alter system kill session '2010 2' (3) delete user ---------------------------------------------- drop user username cascade (**) If you still prompt ORA-01940 after drop: Unable to delete user that is currently linked, it indicates that there is a connected session. You can check the session status to check whether the session has been killed. Run the following statement :------------------------------------ -Select saddr, sid, serial #, paddr, username, status from v $ session where username is not null (take my database as an example ): saddr sid serial # paddr username status running 564A1E28 513 22974 569638F4 netbnew active 564A30DC 514 18183 516 running 688cc netbnew inactive 564A5644 21573 56963340 netbnew inactive 564B6ED0 531 9 56 962D8C netbnew inactive 564B8184 532 4562 56A1075C wuzhq killed 1. you can use alter user ID account unlock to unlock the user first. this mechanism is set in the user's profile. profile is mainly used to manage system resources and user authorization orders. You can open it and check that there is a FAILED_LOGIN_ATTEMPTS parameter in it, you can also use it with other parameters to manage resources and dispatch orders. The system has a default profile named default for example: 1. create profile luck_prof limit sessions_per_user 8 cpu_per_session 16800 logical_reads_per_session 23688 connect_time 268 idle_time 38; 2. modify the default alter profile default limit password_life_time 60 password_grace_time 10 password_reuse_time 1800 failed_login_attempts 3 password_lock_time 1/1440. Specify a profile when creating or modifying a user, for example: create user wuser identified by wuser ....... profile luck_prof;