see which objects are locked:
select object_name, machine, s.sid, s.serial-sharp
from v$locked_object l, dba_objects o, v$session s
where l.object_id = o.object_id
and l.session_id = s.sid;
Kill a process:
alter system kill session "sid,serial-sharp";
After , there is no locked object in the query again. At this time, the delete statement of the table is executed unsuccessfully (just in the query time all the time). What is the problem?
< hr >the table is also locked when the business logic function is deleted, and the execution logic code is as follows (if there are any imperfections, please advise):
List<String> delSqls = new ArrayList<>();
for (String id : ids) {
String sql2 = " update table1 set name = "1" where id = ?;
String sql3 = " delete from table2 where id = ?;
String sql3 = " delete from table3 where id = ?;
String sql3 = " delete from table4 where id = ;
delSqls.add(sql2);
delSqls.add(sql3);
delSqls.add(sql4);
delSqls.add(sql5);
}
dao.executeSql(delSqls);