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!