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

Thread: To unlock a table

  1. #1
    Join Date
    May 2000
    Location
    Budapest
    Posts
    9

    Angry

    Hi gurus,
    Please help me out, i can not withdraw a lock on a table ( ORACLE SERVER 8.1.6.3.0).
    If i shutdown then startup it, the lock is still there.

  2. #2
    Join Date
    Jun 2001
    Posts
    316

    hi

    It 1ce happened to me 2...
    I just killed on the ongoing sessions....
    and the lock was free....
    try this out...

  3. #3
    Join Date
    Jul 2000
    Posts
    243
    Hi

    use this sql to check on the user how created the lock, and the sql statment that created that lock:
    select a.object_name, b.oracle_username, b.os_user_name,c.sid, c.serial#,c.terminal, d.sql_text
    from sys.dba_objects a,
    v$locked_object b,
    v$session c,
    v$sqltext d
    where a.object_id = b.object_id
    and c.sid = b.session_id
    and c.sql_hash_value = d.hash_value

    i think that kiling a session befor you know what was the resone s not that good. so check for the couse first. if you need to kill the session, the line goes like this:
    alter system kill session 'c.sid, c.serial#'

    hope this helps

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