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

Home -> Community -> Usenet -> c.d.o.server -> ORA 4021 timeout trying to execute a stored procedure

ORA 4021 timeout trying to execute a stored procedure

From: Peter Laursen <ptl_at_edbgruppen.dk>
Date: 23 Apr 1999 09:42:10 GMT
Message-ID: <01be8d76$0315a4c0$2c289a0a@apollo>


Help!

Im getting a timeout, and I have no idea why:

the err msg is:
ORA 4021 time-out occurred while waiting to lock object iladm.DropUser

the error only happens second time the script is run, looking in toad I see about 11 row exclusive locks on sys objects when the error is happening.

Any help or hints will be appreciated

Peter

here is part of the sql plus script where the error occurs:

CREATE OR REPLACE PROCEDURE DropUser(USER_NAME IN varchar2) AS -- Dropper USERNAME med cascade.
  cursor_name INTEGER;
  ddl varchar2(2000);
  PREFIX_USERNAME varchar(30);
BEGIN
  PREFIX_USERNAME := UPPER('OPS$'||USER_NAME);   cursor_name := DBMS_SQL.OPEN_CURSOR;

  delete from HBMSUsers u where UPPER(u.UserName) = UPPER(USER_NAME);   

  ddl := 'drop user '||PREFIX_USERNAME||' cascade';   DBMS_SQL.PARSE(cursor_name, ddl, DBMS_SQL.Native);   

  DBMS_SQL.CLOSE_CURSOR(cursor_name);
  Commit;

  --EXCEPTION
  --WHEN OTHERS then
  --  DBMS_SQL.CLOSE_CURSOR(cursor_name);
END;
/
Received on Fri Apr 23 1999 - 04:42:10 CDT

Original text of this message

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