Get the App
SLTechnology News&Howtos  ›  Database  › 

What if JDBC Oracle executes executeUpdate jam?

Shulou Source: shulou.com Published: 2022-05-31 20:42:46 09月28日 Update

This article mainly shows you the "JDBC Oracle implementation of executeUpdate card how to do", the content is easy to understand, clear, hope to help you solve doubts, the following let the editor lead you to study and learn "JDBC Oracle implementation executeUpdate card how to do" this article.

When using jdbc to perform the delete operation of oracle, the program is stuck.

Problem analysis:

For this kind of problem, it is generally that the database transaction is not committed, resulting in executeUpdate jam.

So the solution:

1. After executing the executeUpdate, remember to commit the transaction to con.commit ()

2. Find the database client and perform the commit operation.

If the above operation does not work. Then it should be that the database locks the sql statements that need to be executed after the data operation fails and the or transaction is not committed.

How to operate Oracle:

First query the locked record:

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 locked record

The above ALTER system KILL session 'SID,serial#'; is all the contents of this article "what to do when JDBC Oracle executes executeUpdate stuck". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Tags: Data how to do transaction content database article question learning help no client client way solution time easy to understand more organization knowledge program Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info Docker OPPO Reno MariaDB Apple