Forum Stats

  • 3,733,073 Users
  • 2,246,690 Discussions
  • 7,856,501 Comments

Discussions

Configuring Workspace on runtime environment

ct.rodriguezale
ct.rodriguezale Member Posts: 2
edited April 2019 in APEX Discussions

I need to automate the installation of APEX 5.1 using only the runtime environment to configure the application.

I made some scripts that install and configure the application using the ADMIN user as the INTERNAL administrator, but when I create my Workspace, this is created without a user manager and I can not log in. How can I create the work area with an administrator or create a user and convert it into Administrator from my WS?

This is my code.. It is the same code that indicates the official documentation

ALTER SESSION SET CURRENT_SCHEMA = APEX_050100;BEGIN    APEX_INSTANCE_ADMIN.ADD_WORKSPACE (        p_workspace_id => 100000,        p_workspace => 'MY_WKS',        p_primary_schema => 'WS',        p_additional_schemas => 'HF' );END;/
Tagged:

Answers

  • Mahmoud_Rabie
    Mahmoud_Rabie Cloud Solution Architect, Member Posts: 3,216 Bronze Crown
    edited April 2019

    Hi

    Try don't assign p_workspace_id. This may be left null and a new unique ID is assigned.

    https://docs.oracle.com/cd/E71588_01/AEAPI/ADD_WORKSPACE-Procedure.htm#AEAPI253

    ParameterDescription

    p_workspace_id

    The ID to uniquely identify the workspace in an Application Express instance. This may be left null and a new unique ID is assigned.

    p_workspace

    The name of the workspace to be added.

    p_source_identifier

    A short identifier for the workspace used when synchronizing feedback between different instances.

    p_primary_schema

    The primary database schema to associate with the new workspace.

    p_additional_schemas

    A colon delimited list of additional schemas to associate with this workspace.

    p_rm_consumer_group

    Resource Manager consumer group which is used when executing applications of this workspace.

    Reference

    https://docs.oracle.com/cd/E71588_01/AEAPI/ADD_WORKSPACE-Procedure.htm#AEAPI253

    I hope that helps

    Regards

    Mahmoud

  • ct.rodriguezale
    ct.rodriguezale Member Posts: 2
    edited April 2019

    it did not work by nulling the NULL p_workspace_id.  Finally, solve it using step 5 of this guide

    https://joelkallman.blogspot.com/2018/08/scripting-service-creation-in-oracle.html

    --

    -- Step 5:  Create an administrator account and a developer account in each worskpace

    --

    --

    begin

        -- We must set the APEX workspace security group ID in our session before we can call create_user

        apex_util.set_security_group_id( apex_util.find_security_group_id( p_workspace => 'OACADEMY1'));

        apex_util.create_user(

            p_user_name               => 'BOB',

            p_email_address           => <a class="jive-link-email-small" href="mailto:'[email protected]">'[email protected]</a><span>'</span>,

            p_default_schema          => 'OACADEMY_DB10',

            p_allow_access_to_schemas => 'OACADEMY_DB10',

            p_web_password            => 'change_me',

            p_developer_privs         => 'ADMIN:CREATE:DATA_LOADER:EDIT:HELP:MONITOR:SQL' );  -- workspace administrator

            apex_util.create_user(

            p_user_name               => 'JUNE',

            p_email_address           => <a class="jive-link-email-small" href="mailto:'[email protected]">'[email protected]</a><span>'</span>,

            p_default_schema          => 'OACADEMY_DB11',

            p_allow_access_to_schemas => 'OACADEMY_DB11',

            p_web_password            => 'change_me',

            p_developer_privs         => 'CREATE:DATA_LOADER:EDIT:HELP:MONITOR:SQL' );  -- developer

        commit;

    end;

    /

    Thanks friend for your help..

Sign In or Register to comment.