Many times your APEX Work-space accounts gets locked on few wrong attempts or any other reasons – This normally requires you to contact administrator and unlock your locked user. This is sometimes very time consuming process and needs to wait for someone for such a small stuff.
So, even if your APEX accounts gets locked and if you still have a database access using SQL Developer or Toad or any other tool, you can unlock your account on your own.
Following is a simple pl/sql block where if you supply correct details of work-space name and your username, then it should unlock your APEX account.
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 => ‘<your username>’);
commit;
end;
Hope this helps!
Regards,
Jaydip Bosamiya
jbosamiya@gmail.com
1 Comment
You did not mentioned the process to use the pl/sql code