Method: 1. Get the user's "_sid" and "_serial#", and use "alter system kill session '_sid, _serial#'" to execute the kill command; 2. Use "drop user username cascade" Just forcefully delete the user.
The operating environment of this tutorial: Windows 10 system, Oracle 11g version, Dell G3 computer.
For example, if we want to delete the SDE user, we can use the following command to view the session information of the SDE user.
select sid,serial# from v$session where username=‘SDE‘;
1. We get the _sid and _serial# of the SDE user through the above command to prepare for the following kill command.
As shown in the picture above, the sid of the user SDE session information we obtained is 12, and the serial# is 235.
Execute the Kill command
alter system kill session ‘_sid, _serial#‘;
The specific values of _sid and _serial# are the values queried in step 2.
alter system kill session ‘12,235‘;
#2. Delete the user.
The command is:
drop user SDE cascade。
Recommended tutorial: "Oracle Video Tutorial"
The above is the detailed content of How to force delete oracle user. For more information, please follow other related articles on the PHP Chinese website!