What if we forget the apex admin password? Is there any mechanism to reset the password? The answer is "Yes". This can be achieved easily by following the steps mentioned below.
1. Identify the User Id/Username from the the table "wwv_flow_fnd_user"; This is usually available in the Schema "APEX_050100" (if you are using Apex 5.1).
1. Identify the User Id/Username from the the table "wwv_flow_fnd_user"; This is usually available in the Schema "APEX_050100" (if you are using Apex 5.1).
- select * from APEX_050100.wwv_flow_fnd_user;
2. Execute the following script and pass the argument such as userId, username, email and the new password.
- declare
- c_user_id constant number := to_number( '19380353220414198' );
- c_username constant varchar2(4000) := upper( 'ADMIN' );
- c_email constant varchar2(4000) := 'admin@yourdomain.com';
- c_password constant varchar2(4000) := 'Abc#123';
- c_old_sgid constant number := wwv_flow_security.g_security_group_id;
- c_old_user constant varchar2(255) := wwv_flow_security.g_user;
- procedure cleanup
- is
- begin
- wwv_flow_security.g_security_group_id := c_old_sgid;
- wwv_flow_security.g_user := c_old_user;
- end cleanup;
- begin
- wwv_flow_security.g_security_group_id := 10;
- wwv_flow_security.g_user := c_username;
- wwv_flow_fnd_user_int.create_or_update_user( p_user_id => c_user_id,
- p_username => c_username,
- p_email => c_email,
- p_password => c_password );
- commit;
- cleanup();
- exception
- when others then
- cleanup();
- raise;
- end;
- /
Once the PL/SQL block is executed successfully, Password will be updated in the table APEX_050100.wwv_flow_fnd_user
This PL/SQL was taken from a script that you can optionally, just find and run from the apex home.
ReplyDeleteapxchpwd.sql
ERROR at line 20:
ReplyDeleteORA-06550: line 20, column 8:
PLS-00201: identifier 'WWV_FLOW_FND_USER_INT.CREATE_OR_UPDATE_USER' must be
declared
ORA-06550: line 20, column 8:
PL/SQL: Statement ignored