DBAsupport.com Forums - Powered by vBulletin
Results 1 to 6 of 6

Thread: Row Locking

  1. #1
    Join Date
    Nov 2002
    Location
    hydreabad
    Posts
    34

    Row Locking

    Hi Expertees,
    I executed the query like below
    SELECT ATTRIBUTEIDHINT FROM GLOBALPROPERTIES FOR UPDATE
    and

    UPDATE GLOBALPROPERTIES SET ATTRIBUTEIDHINT=100;

    i did not commited or rollbacked and unfortunatly the application is closed .

    Next time when i come to the same statement
    SELECT ATTRIBUTEIDHINT FROM GLOBALPROPERTIES FOR UPDATE
    and

    UPDATE GLOBALPROPERTIES SET ATTRIBUTEIDHINT=100;

    System is hanging it is not proceding further....

    how to solve this one???

    Thanks &Regards
    Venkata Vara Prasad Kosaraju
    Venkata vara Prasad Kosaraju

  2. #2
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,334
    find the session that is holding the lock and kill it

  3. #3
    Join Date
    Nov 2002
    Location
    hydreabad
    Posts
    34
    in the application how can find the session and how wil i kill that session.........
    Venkata vara Prasad Kosaraju

  4. #4
    Join Date
    Jul 2002
    Location
    Northampton, England
    Posts
    612
    You'll have to get your DBA to do it from the database...

    find sid and serial# from v$session and alter system kill session.
    Assistance is Futile...

  5. #5
    Join Date
    Apr 2002
    Location
    Shenzhen, China
    Posts
    327
    dynamic views of v$lock and v$access can help you to identify the sessions.
    Oracle Certified Master - September, 2003, the Second OCM in China
    *** LOOKING for PART TIME JOB***
    Data Warehouse & Business Intelligence Expert
    MCSE, CCNA, SCJP, SCSA from 1998

  6. #6
    Join Date
    Feb 2003
    Location
    INDIA
    Posts
    96
    Hi,

    This is the query

    column ORACLE_USER format A25
    SELECT SUBSTR(P.SPID||' - '||S.SID||' - '||S.SERIAL#,1,20) "SPID-SID-SERIAL#",
    SUBSTR(S.OSUSER,1,10) "OS USER",
    SUBSTR(S.USERNAME,1,15) ORACLE_USER,
    SUBSTR(O.OBJECT_NAME,1,35) " TABLE LOCKED",
    DECODE(L.LOCKED_MODE,1,'SHARED',2,'ROW EXCL',3,'EXCLUSIVE') "LOCK_MODE",
    S.STATUS
    FROM V$LOCKED_OBJECT L, DBA_OBJECTS O, V$SESSION S, V$PROCESS P
    WHERE S.PADDR=P.ADDR AND S.PROCESS = L.PROCESS AND L.OBJECT_ID=O.OBJECT_ID ORDER BY O.OBJECT_NAME, S.OSUSER
    /

    kill your session with

    ALTER SYSTEM KILL SESSION ',';

    Dilip.

Posting Permissions

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


Click Here to Expand Forum to Full Width