ORA-06550 trying to unlock workspace account using internal ADMIN user
March 16, 2012 2 Comments
APEX 4.1.1.00.23, Oracle 10g.
Today, I accidentally locked my developer account in one of our workspaces. This is not the first time it happened, so I knew what to do: log in with the ADMIN user of the “internal” workspace, click on “Manage Workspaces”, “Manage Developers and Users”, find the user in the list, and under “Account Privileges”, change the “Account Availability” from Unlocked to Locked. Should be a piece of cake.
However, pressing “Apply Changes”, left me with the following error:
Error updating user.
ORA-06550: line 86, column 7: PLS-00103: Encountered the symbol “IF” when expecting one of the following: ; <an identifier> <a double-quoted delimited-identifier> The symbol “IF” was ignored. ORA-06550: line 90, column 1: PLS-00103: Encountered the symbol “END”
??? This is very strange… I couldn’t remember that I ever had problems with this. Further debugging lead to the conclusion that it had nothing to do with the locked/unlocked status of the user account, but, whatever I tried to change, produced this error… When did this stop working? Did something go wrong during one of our last APEX upgrades?
The next thing I tried to do, was to unlock my user account by using the UNLOCK_ACCOUNT method of the APEX_UTIL PL/SQL package. So, I connected with SYS as SYSDBA, and executed this piece of code:
declare n_security_group apex_workspaces.WORKSPACE_ID%type; begin SELECT workspace_id INTO n_security_group FROM apex_workspaces WHERE workspace = '<workspace name>'; wwv_flow_api.set_security_group_id(n_security_group); APEX_UTIL.UNLOCK_ACCOUNT (p_user_name => 'MATTHIASH'); commit; end;
Well, the “PL/SQL procedure successfully completed”, but my account was still locked… Hmm… this is probably related to the security context in which I was executing this piece of PL/SQL code, but I also couldn’t find a solution for this…
I suddenly had another idea: what if I tried this with another (unlocked) account with admin privileges who is in the same workspace as my own account? This indeed did the trick! I could successfully unlock my account!
So, is this a bug? Or is it not possible anymore to manage workspace user accounts using the “internal” admin user?
UPDATE 27/03: Oracle support has confirmed that this is a bug, but it only occurs when you patch 4.1 to 4.1.1 on Oracle 10g. There’s already a patch available on MOS with patch ID 13878034.