Solution to the Stuck Problem When oracle Plsql executes update or delete

Source: Internet
Author: User

When oracle Plsql executes update or delete, It is stuck when Plsql is stuck or when code executes SQL.

When this problem occurs during development, I copied the SQL statement and executed it in plsql. The SQL spelling is correct, but the plsql statement is stuck,

In the code, run the breakpoint debug command at the place where the SQL statement is executed, and the execution of the SQL statement still does not respond. After checking the information on the Internet, I guess the cause of this situation is:

There may be no commit when PLSQL Developer executes update, and oracle locks this record.
You can solve this problem by querying the SQL code SELECT s. sid, s. serial # FROM v $ locked_object lo, dba_objects ao, v $ session s WHERE ao. object_id = lo. object_id AND lo. session_id = s. sid; then delete the SQL code of the lock record

ALTER system KILL session 'sid, serial #';

Through the preceding SQL, the problem is finally solved!

In conclusion, I hope it will be helpful for everyone's development!

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: 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.