Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: resource busy and acquire with NOWAIT specified

Re: resource busy and acquire with NOWAIT specified

From: Stephan Born <stephan.born_at_beusen.de>
Date: Wed, 22 Mar 2000 10:28:27 +0100
Message-ID: <38D8923B.442AAFED@beusen.de>


> I updated table and inserted rows and commit. Then, I would like to
> truncate the table, but I got:
>
> SQL> TRUNCATE TABLE DR11_ORDERS_TMP;
> TRUNCATE TABLE DR11_ORDERS_TMP
> *
> ERROR at line 1:
> ORA-00054: resource busy and acquire with NOWAIT specified
>
> ---------------------------
> I wait for a few minutes and even open a new session to try to truncate
> again but I still got same errors.
>
> How can unlock table ?

Are you sure that nobody else has locked the table?

Try that statement:

SELECT
 OWNER||'.'||OBJECT_NAME "Object",
  OS_USER_NAME "Terminal",
  ORACLE_USERNAME "Locker",
  PROGRAM "Program",
  NVL(lockwait,'ACTIVE') "Wait",
  DECODE(LOCKED_MODE,

    2, 'ROW SHARE',
    3, 'ROW EXCLUSIVE',
    4, 'SHARE',
    5, 'SHARE ROW EXCLUSIVE',
    6, 'EXCLUSIVE',  'UNKNOWN') "Lockmode",
  OBJECT_TYPE "Object Type",
  SESSION_ID "Session ID",
  SERIAL# "Serial",
  c.SID
FROM
  SYS.V_$LOCKED_OBJECT A,
  SYS.ALL_OBJECTS B,
  SYS.V_$SESSION c

WHERE
  A.OBJECT_ID = B.OBJECT_ID AND
  C.SID = A.SESSION_ID
ORDER BY 1 ASC, 5 Desc

It will give you a clue who locked the the table..

Let me know if I could help you.

Regards, Stephan

--


Dipl.-Inf. (FH) Stephan Born   | beusen Consulting GmbH
fon: +49 30 549932-0           | Landsberger Allee 392
fax: +49 30 549932-21          | 12681 Berlin
mailto:stephan.born_at_beusen.de  | Germany
---------------------------------------------------------------
       PGP-Key verfügbar       |      PGP-Key available
---------------------------------------------------------------


Received on Wed Mar 22 2000 - 03:28:27 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US