Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> re: Locked sys object are:
SYS.AUDIT$ SYS.JOB$ SYS.MLOG$ SYS.MLOG_REFCOL$ SYS.REG_SNAP$ SYS.RGCHILD$ SYS.RGROUP$ SYS.SLOG$ SYS.SNAP$ SYS.SNAP_REFOP$ SYS.SNAP_REFTIME$ SYS.SYSAUTH$
Peter Laursen < ptl_at_edbgruppen.dk> skrev i artiklen
<01be8d76$0315a4c0$2c289a0a_at_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;
> /
>
> -- opret HBMSuser role:
> @HBMsUserRole;
> **** creates role and does grants dml and selects to that role, nothing
> else *****
>
> -- opret HBMSadmin:
> begin
> DropUser('HBMSadmin');
> ***** ORA 4021 time-out occurred while waiting to lock object
> iladm.DropUser ****
> ***** this script is run as iladm ****
> end;
> /
> variable dummy varchar2(200);
> begin
> CreateUser('HBMSadmin', :dummy);
> end;
> /
>
>
Received on Fri Apr 23 1999 - 05:03:54 CDT