Thursday, May 09, 2013

The account is locked on APEX

I have used APEX 4.2.2. I was unable to logon my APEX with INTERNAL workspace as admin. It showed "The account is locked".
What was I able to do? ... run "apxchpwd.sql" script. I didn't think so. After checking in "apxchpwd.sql" script.
So, I checked in "wwv_flow_fnd_user_api" package, I found wwv_flow_fnd_user_api.UNLOCK_ACCOUNT procedure.
PROCEDURE UNLOCK_ACCOUNT
 Argument Name                  Type                    In/Out Default?
 ------------------------------ ----------------------- ------ --------
 P_USER_NAME                    VARCHAR2                IN
I thought I should test it. First of all, I must to make sure "security_group_id"(It should be number 10).
SQL> SELECT workspace_id FROM apex_workspaces WHERE workspace = 'INTERNAL';

WORKSPACE_ID
------------
          10
Tested to unlock "admin" user on "INTERNAL" workspace.
SQL> alter session set current_schema = APEX_040200;

Session altered.

SQL> begin

    wwv_flow_security.g_security_group_id := 10;
    wwv_flow_fnd_user_api.UNLOCK_ACCOUNT('ADMIN');
    commit;
end;
/

PL/SQL procedure successfully completed.

then I tested login again... It works for me. ^______________^


2 comments:

Mathias Walter said...

Special thanks,
that saved me a lot of trouble and searching.

Best regards

Unknown said...

10x
verymatch