Home  >  Article  >  Database  >  How to force delete oracle user

How to force delete oracle user

WBOY
WBOYOriginal
2022-05-13 14:59:304083browse

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.

How to force delete oracle user

The operating environment of this tutorial: Windows 10 system, Oracle 11g version, Dell G3 computer.

How to forcefully delete the oracle user

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.

How to force delete oracle user

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‘;

How to force delete oracle user

#2. Delete the user.

The command is:

drop user SDE cascade。

How to force delete oracle user

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn