In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces the oracle implementation of update statements stuck how to do, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let Xiaobian with you to understand.
problem
During development, the program stopped when debug reached a sql statement of update, and then I tried it on plsql and found that plsql had been showing that it was being executed and waited for a long time without any results. But the strange thing is that other select statements can be executed.
Causes and solutions
In fact, only update cannot execute other statements because of the record lock. In oracle, commit is required after the update or insert statements are executed. If the connection is forcibly closed without commit, oracle will lock the submitted record. Because of the transaction added to my java program, I forced the project to be terminated halfway through the debug, which led to no transaction commit, so oracle locked the record of the update entry in the code. It can be solved by the following two steps:
1. 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
two。 And then delete it.
ALTER system KILL session 'SID,serial#' thank you for reading this article carefully. I hope the article "what to do when oracle gets stuck when executing update sentence" shared by the editor will be helpful to you. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.