Home > Database > Oracle > body text

How to force delete oracle user

WBOY
Release: 2022-05-13 14:59:30
Original
4014 people have browsed it

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‘;
Copy after login

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#‘;
Copy after login

The specific values ​​of _sid and _serial# are the values ​​queried in step 2.

alter system kill session ‘12,235‘;
Copy after login

How to force delete oracle user

#2. Delete the user.

The command is:

drop user SDE cascade。
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!