Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unlock apex admin account

I run @apxchpwd.sql and unluck the account with this script

alter session set current_schema = APEX_050100;
declare
  l_workspace_id number := apex_util.find_security_group_id (p_workspace => 'INTERNAL');
begin
wwv_flow_security.g_security_group_id := 10;

   apex_util.set_security_group_id (p_security_group_id => l_workspace_id);
wwv_flow_fnd_user_api.UNLOCK_ACCOUNT('ADMIN');
commit;
end;

But it doest work. Thanks for any help

enter image description here

like image 366
Phanny Avatar asked Oct 26 '25 15:10

Phanny


2 Answers

The apxchpwd.sql script is used to change the password, but it also unlocks the ADMIN account (, so - you shouldn't even need any additional code. Just make sure to run the one that belongs to Apex version you use.

SQLPLUS /NOLOG
SQL> CONNECT SYS AS SYSDBA
SQL> @APXCHPWD

Alternatively, also connected as SYS, use the following code:

BEGIN
   apex_util.set_security_group_id(p_security_group_id => 10);
   apex_util.unlock_account(p_user_name => 'ADMIN');
END;
/
COMMIT;
like image 172
Littlefoot Avatar answered Oct 28 '25 05:10

Littlefoot


Here is another solution that worked for me if the above didn't work for you : credit to : https://ora01948.wordpress.com/2017/12/19/unlock-apex-admin-account/

run the below script noting that Oracle APEX schema name can be different in my case it's Apex_050000 so check your schema name first and change it accordingly .

   `UPDATE Apex_050000.Wwv_Flow_Fnd_User
    SET Web_Password = 'set_new_password'
    WHERE User_Name = 'ADMIN'
    AND Security_Group_Id = 10;
    COMMIT;`

now change the session

ALTER SESSION SET CURRENT_SCHEMA = Apex_050000;

and run the below script to unlock the account . BEGIN Wwv_Flow_Security.G_Security_Group_Id := 10; Wwv_Flow_Fnd_User_Api.Unlock_Account ('ADMIN'); COMMIT; END;

like image 21
Osama Al-Banna Avatar answered Oct 28 '25 06:10

Osama Al-Banna



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!