Forum Stats

  • 3,757,164 Users
  • 2,251,204 Discussions
  • 7,869,747 Comments

Discussions

two different session when select for update on same row at same time

User_NW3SO
User_NW3SO Member Posts: 1 Green Ribbon

hi,expert,i use c# multi-thread processing database business,but find two sessions could lock same row when i use select for update nowait lock row,i print some log picture,could you help analysizing any problem happend?

explain picture and sql field:B0140650031 as ‘V_LOCATION’,red part as ‘V_TIME‘ and oracle session id

 Select LOCATIONNUMBER,

       LOCATIONID,

       FIELD1,

       ZONEID,

       to_char(systimestamp, 'yyyymmdd hh24:mi:ss.ff3')

    INTO V_LOCATION, V_LOCATION_ID, V_EQUIPMENT, V_AREA_ID,

V_TIME

    from LOCATION

    where LOCATIONID = V_LOCATION_ID

     for update nowait;



Answers