Solution to the problem of oracle stuck when executing update

reason:

Since there is no commit when PLSQL Developer executes update, oracle locks the record.
It can be solved by:
Query lock records first
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 lock record
Sql code
ALTER system KILL session 'SID,serial#';  
The SID fills in the SID value found above, and serial# fills in the serial# column value, such as:
ALTER system KILL session '214,23456';

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324791989&siteId=291194637