Force removal of the Oracle user being connected to remove the SDE user as an example

Source: Internet
Author: User

Sometimes you want to force the deletion of an already connected Oracle user, cannot be deleted directly, can use kill session information.

For example, to delete a connected SDE user today, you can delete a "connecting" user in the following ways.

1. View the session information for all users.

Select Sid,serial#,username from V$session;

2. View the session information for a specified user.

For example, if we want to delete the SDE user, you can use the following command to view the SDE user's session information.

Select sid,serial# from v$session where username= ' SDE ';

We get the SDE user's _sid and _serial# from the above command, preparing for the following kill command.

As in, we get the user SDE's session information in the SID of 12,serial# to 235.

3. Execute the KILL command

Alter system kill session '_sid, _serial# ';

Where the _sid and _serial# specific values are the values that are queried in step 2nd.

Alter system kill session ' 12,235 ';

4. Delete the user SDE.

The command is: Drop user SDE cascade.

Force removal of the Oracle user being connected to remove the SDE user as an example

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.