Oracle deadlock and oracle deadlock

Source: Internet
Author: User

Oracle deadlock and oracle deadlock

Manually modify the record of a table. The following error is displayed:

Then, try to use PL/SQL statements to modify the record. After more than 10 minutes, the record is displayed as being executed;
Conclusion: The deadlock has occurred !!
View locked objects:

SELECT l. session_id sid, s. serial #, l. locked_mode lock mode, l. oracle_username Login User, l. OS _user_name: username of the login machine, s. machine name, s. terminal user name, o. object_name: name of the locked object, s. logon_time log on to the database FROM v $ locked_object l, all_objects o, v $ session sWHERE l. object_id = o. object_id AND l. session_id = s. sidORDER BY sid, s. serial #;



Kill the Lock Object:Template: alter system kill session 'sid, serial # 'immediate; instance: alter system kill session '123' immediate;

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.