官术网_书友最值得收藏!

  • Oracle APEX Best Practices
  • Learco Brizzi Iloon Ellen Wollf Alex Nuijten
  • 645字
  • 2021-08-05 18:45:22

Creating a second administrator

When installing APEX, by default the workspace Internal with the administrator user Admin is created. Some users know more than the average end user. Also, developers have more knowledge than the average user. Imagine that such users try to log in to either the APEX Administration Services or the normal login page with the workspace Internal and administrator Admin, and consequently use the wrong password. As a consequence, the Admin account would be locked after a number of login attempts. This is a very annoying situation, especially when it happens often. Big companies and APEX Hosting companies with many workspaces and a lot of anonymous users or developers may suffer from this. Fortunately there is an easy solution, creating a second administrator account.

Creating a second administrator

Login attempt in workspace Internal as Admin

If the account is already locked, we have to unlock it first. This can be easily done by running the apxchpwd.sql script, which can be found in the main Apex directory of the unzipped installation file of APEX:

  1. Start SQL*Plus and connect as sys with the sysdba role.
  2. Run the script by entering @apxchpwd.sql.
  3. Follow the instructions and enter a new password.

Now we are ready to create a second administrator account. This can be done in two ways, using the web interface or the command line.

APEX web interface

Follow these steps to create a new administrator, using the browser.

First, we need to log in to the APEX Administrator Services at http://server:port/apex/. Log in to the workspace Internal, with the administrator credentials.

After logging in, perform the following steps:

  1. Go to Manage Workspaces.
  2. Select Existing Workspaces.
  3. You can also select the edit icon of the workspace Internal to inspect the settings. You cannot change them. Select Cancel to return to the previous screen.
  4. Select the workspace Internal by clicking on the name.
  5. Select Manage Users. Here you can see the user Admin.
  6. You can also select the user Admin to change the password. Other settings cannot be changed. Select Cancel or Apply Changes to return to the previous screen.
  7. Select Create User. Make sure that Internal is selected in the Workspace field and APEX_xxxxxx is selected in Default Schema, and that the new user is an administrator. xxxxxx has to match your APEX scheme version in the database, for instance, APEX_040100.
  8. Click on Create to finish.
    APEX web interface

    Settings for the new administrator

Command line

When we still have access, we can use the web interface of APEX. If not we can use the command line:

  1. Start SQL*Plus and connect as SYS with the SYSDBA role.
  2. Unlock the APEX_xxxxxx account by issuing the following command:
    alter user APEX_xxxxxx account unlock;
    
  3. Connect to the APEX_xxxxxx account. If you don't remember your password, you can just reset it, without impacting the APEX instance.
  4. Execute the following (use your own username, e-mail, and password):
    BEGIN
      wwv_flow_api.set_security_group_id(p_security_group_id=>10); 
      wwv_flow_fnd_user_api.create_fnd_user( 
        p_user_name     => 'second_admin', 
        p_email_address => 'email@company.com',
        p_web_password  => 'second_admin_password') ; 
    END;
    /
    COMMIT
    /
  5. The new administrator is created. Connect again as SYS with the SYSDBA role and lock the account again with the following command:
    alter user APEX_xxxxxx account lock;
    
  6. Now you can log in to the Internal workspace with your newly created account and you'll be asked to change your password.

Other accounts

When an administrator of a developer workspace loses his/her password or has a locked account, you can bring that account back to life by following these steps:

  1. Log in to the APEX Administrator Services.
  2. Go to Manage Workspace.
  3. Select Existing Workspaces.
  4. Select the workspace.
  5. Select Manage Users.
  6. Select the user, change the password, and unlock the user.

A developer or an APEX end user account can be managed by the administrator of the workspace from the workspace itself. Follow these steps to do so:

  1. Log in to the workspace.
  2. Go to Administration.
  3. Select the user, change the password, and unlock the user.
主站蜘蛛池模板: 永嘉县| 峨山| 察雅县| 新绛县| 呈贡县| 乌兰察布市| 玉溪市| 鸡泽县| 方城县| 黔江区| 庆阳市| 彰化市| 西乡县| 甘谷县| 涞源县| 昌黎县| 西盟| 麻栗坡县| 定日县| 奉节县| 高要市| 哈尔滨市| 宁波市| 长治县| 平安县| 永州市| 武邑县| 米泉市| 河池市| 固镇县| 静乐县| 仁怀市| 通山县| 霍林郭勒市| 霍城县| 古田县| 汾阳市| 上犹县| 新田县| 海晏县| 长春市|