Friday, April 06, 2007

Reset INTERNAL password in APEX 3.0

Well, it can happen... You use so many different passwords that you forget one of them.
If you forget your APEX password of the INTERNAL workspace, here's what you can do:
  1. Connect to your database AS SYS DBA (or a user with high privileges): sqlplus sys as sysdba
  2. SQL> alter user FLOWS_030000 account unlock;
  3. Connect to your database as FLOWS_030000: sqlplus flows_030000/password@your_db
  4. Run following procedure from SQL>
    begin
    www.flow_api.set_security_group_id (p_security_group_id => 10);
    www.flow_fnd_user_api.create_fnd_user(
    p_user_name => 'admin1',
    p_email_address => 'email@ae.com',
    p_web_password => 'admin1');
    end;
    /
    commit;
  5. Connect again AS SYS DBA
  6. SQL> alter user FLOWS_030000 account lock;
That should have fixed your problem. Try again to login into APEX.

8 comments:

  1. One of the APEX 3.0 scripts is apxxepwd.sql which edits the ADMIN user instead of creating a new user ADMIN1. Connect as SYS (as SYSDBA) and execute the script. It will ask for the new password.

    The name of the script (apxXEpwd) suggests it has something to do with XE. The comments inside the script do not refer to XE...

    ReplyDelete
  2. oh nice, thanks for that Jornica

    ReplyDelete
  3. If you've still problems:
    Easiest thing to do next would be to connect as flows_030000 in SQL*Plus and:
    update wwv_flow_fnd_user set account_locked = 'N' where security_group_id=10
    /
    commit
    /
    This will unlock any locked accounts in the internal workspace, leaving their passwords as they are.

    ReplyDelete
  4. Doesn't work :(



    SQL> alter user FLOWS_030000 account unlock;

    User altered.

    Elapsed: 00:00:00.00
    SQL>
    SQL>
    SQL> conn flows_030000/oracle
    Connected.
    SQL>
    SQL> begin
    2 www.flow_api.set_security_group_id (p_security_group_id => 10);
    3 www.flow_fnd_user_api.create_fnd_user(
    4 p_user_name => 'admin1',
    5 p_email_address => 'email@ae.com',
    6 p_web_password => 'admin1');
    7 end;
    8 /
    www.flow_api.set_security_group_id (p_security_group_id => 10);
    *
    ERROR at line 2:
    ORA-06550: line 2, column 1:
    PLS-00201: identifier 'WWW.FLOW_API' must be declared
    ORA-06550: line 2, column 1:
    PL/SQL: Statement ignored
    ORA-06550: line 3, column 1:
    PLS-00201: identifier 'WWW.FLOW_FND_USER_API' must be declared
    ORA-06550: line 3, column 1:
    PL/SQL: Statement ignored

    ReplyDelete
  5. There is a typo in the package names above. The correct script is:

    begin
    wwv_flow_api.set_security_group_id (p_security_group_id => 10);
    wwv_flow_fnd_user_api.create_fnd_user(
    p_user_name => 'admin1',
    p_email_address => 'gellert.stadler@generali.hu',
    p_web_password => 'admin1');
    end;

    ReplyDelete
  6. After I follow the directions to add a new internal workspace admin it asks me to change the password right away. When I put in the current password it tells me invalid password. Any advise?

    ReplyDelete
  7. If you are in APEX 3.2, have a look here: http://download.oracle.com/docs/cd/E14373_01/install.32/e13366/db_install.htm#CIHBHAFJ
    You can use @apxchpwd.sql

    ReplyDelete
  8. In the Adminstration you can set the "Require Change of Password on First Use" to No

    You can find this in Manage Workspaces -> Manage Developers and Users -> Create / Edit Users

    I encountered the same problem first and it is annoying

    ReplyDelete