Locks reported , But no locks!!!
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: Locks reported , But no locks!!!

  1. #1
    Join Date
    Jun 2001
    Location
    Sri Lanka
    Posts
    4

    Red face

    Inside a stored package i am using SELECT........FOR UPDATE statement.
    On certain occassions(Not always) it throws out a -54 error,but no other sessions are accessing the same resource(table). Only one form calls this package.
    When i logout and login again this error is not raised again. but within the same session if i retry same error occurs again

    When this error occurs,querying the Data dictionary with the following statement returns no rows

    SELECT XIDUSN,SESSION_ID,OBJECT_NAME,OS_USER_NAME FROM V$LOCKED_OBJECT A,DBA_OBJECTS B
    WHERE A.OBJECT_ID=B.OBJECT_ID;

    Database server version 8.1.5.0.0 (workgroup)
    Operating system Windows NT 4.0 server
    Front end applications Oracle D2K Forms/Reports ver 6.0

    How can i overcome this problem?


  2. #2
    Join Date
    Feb 2001
    Location
    Bombay,India
    Posts
    530
    Hi,
    When u write the SELECT..............FOR UPDATE statement Oracle locks the table for that particular session.After processing the rows in the procedure or function or package release the locks on the rows by either COMMIT/ROLLBACK.
    In case of any help please be free to ask me at rohitsn@altavista.com

    Regards,
    Rohit Nirkhe,Oracle DBA,OCP 8i
    rohitsn@altavista.com

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