How to kill a session when an Oracle update table is locked

Source: Internet
Author: User

How to kill session 1 when an Oracle table update is locked. view the locked table SELECT p. spid,. serial #, c. object_name, B. session_id, B. oracle_username, B. OS _user_name FROM v $ process p, v $ session a, v $ locked_object B, all_objects c WHERE p. addr =. paddr AND. process = B. process AND c. object_id = B. object_id; 2. view the SELECT sid, serial #, username, osuser FROM v $ session where osuser = 'admin' --- OS _USER_NAME AND username = 'kaifa '; ---> ORACLE_USERNAME 3 of the Process lock. kill the process al alter system kill session '123'; ---> the two values in the process are sid and serial #

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.