Results 1 to 3 of 3
  1. #1
    Join Date
    May 2012
    Posts
    1

    Unhappy Unanswered: Record is Locked

    I am using Oracle Database 11g-R1 on Microsoft Windows Server 2003, 32-Bit.

    Finance department is using "Budgeting System" Application and suddenly today their one row (entry) is being locked and I am unable to unlock that entry because I don't know how to do that?

    Please help

  2. #2
    Join Date
    May 2006
    Posts
    17
    Hi,

    A lock occurr because two or more session update/delete the same row, your application should finish the lock submiting a commit or rollback.

    If your application not is finish the lock your can kill session.

    identify the lock:

    select sid, username, blocking_session,serial#
    from v$session where blocking_session is not null
    UNION ALL
    select A.sid, A.username, A.blocking_session,a.serial#
    from v$session A, v$session B
    where A.sid = B.blocking_session;

    kill session:

    alter system kill session '<sid>,<serial#>';

    @mbrozio

  3. #3
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    Code:
    SELECT Decode(request, 0, 'Holder: ', 
                           'Waiter: ') 
           ||sid sess, 
           id1, 
           id2, 
           lmode, 
           request, 
           TYPE 
    FROM   V$LOCK 
    WHERE  ( id1, id2, TYPE ) IN (SELECT id1, 
                                         id2, 
                                         TYPE 
                                  FROM   V$LOCK 
                                  WHERE  request > 0) 
    ORDER  BY id1, 
              request 
    
    /
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •