Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Deadlock detected when doing "ALTER USER"
I've written a program that manages user accounts
in my Oracle 9i database. It uses OCI to perform
a number of dynamic sql statements. It works fine for any
account that doesn't have SYSDBA/SYSOPER privilege,
but if I try to use it to modify an account that
has one of these privileges I get an ORA-00060
Deadlock detected error. I only have a single
thread in this program. I do a select from
various DBA tables to check the users current
status before trying to do the alter user, eg:
SELECT * FROM DBA_USERS WHERE USERNAME = :USERNAME
SELECT TABLESPACE_NAME,MAX_BYTES FROM DBA_TS_QUOTAS WHERE USERNAME =
:USERNAME
SELECT PRIVILEGE FROM DBA_SYS_PRIVS WHERE GRANTEE = :USERNAME ORDER BY
PRIVILEGE
SELECT SYSDBA,SYSOPER FROM V$PWFILE_USERS WHERE USERNAME = :USERNAME
SELECT GRANTED_ROLE,DEFAULT_ROLE FROM DBA_ROLE_PRIVS WHERE GRANTEE =
:USERNAME ORDER BY GRANTED_ROLE
but I don't select any of them for update and
I even do a ROLLBACK just before trying to
alter the user, but it doesn't help. The
trace file shows:
Current SQL statement for this session:
alter user SA_DUNNETT identified by ************
Deadlock graph:
---------Blocker(s)-------- ---------Waiter(s)--------- Resource Name process session holds waits process session holds waits PF-00000000-00000000 23 360 X 23 360X
Am I correct in guessing this is a lock on the Password File? If so, any ideas what I may have done that is causing it to be locked or how I can free it before trying the update?
It's not a question of account privileges because I can perform the same operation using the same account through SQL/PLUS with no problem. Received on Tue Dec 05 2006 - 11:34:05 CST