Managing Workspace to Schema Assignments

When users log in to Oracle Application Express, they log in to a shared work area called a workspace. Each workspace can have multiple associated (or mapped) schemas. By associating a workspace with a schema, developers in that workspace can:

Topics:

Viewing Schema and Workspace Assignments in a Development Environment

Oracle Application Express administrators can view the existing schema to workspace assignment on the Manage Workspace to Schema Assignments page.

To view the existing schema to workspace assignment:

  1. Log in to Oracle Application Express Administration Services. See "Logging in to Oracle Application Express Administration Services".

  2. Click Manage Workspaces.

  3. Under Manage Workspaces, click Manage Workspace to Schema Assignments.

    The Manage Workspace to Schema Assignments page appears. It lists all workspaces in your environment along with its most recently associated schema. Note that only one schema appears for each workspace in this list.


Tip:

You can view all schemas associated with a workspace on the Workspace home page or by viewing the Workspace Details report. See "Viewing Workspace Details".

Viewing Schema and Workspace Assignments in a Runtime Environment

To view the existing schema to workspace assignment in a runtime environment:

  1. Start SQL*Plus and connect to the database where Oracle Application Express is installed as SYS. For example:

    • On Windows:

      SYSTEM_DRIVE:\ sqlplus /nolog
      connect sys as sysdba
      
    • On UNIX and Linux:

      $ sqlplus /nolog
      connect sys as sysdba
      

    When prompted enter the appropriate password.

  2. Run the following statement:

    ALTER SESSION SET CURRENT_SCHEMA = FLOWS_030100
    
  3. Run the following statement:

    SELECT APEX_INSTANCE_ADMIN.GET_SCHEMAS(WORKSPACE_NAME) 
    FROM DUAL;
    

    Where WORKSPACE_NAME is the name of the workspace.

Editing Existing Schema and Workspace Assignments

To edit an existing schema and workspace assignment:

  1. Log in to Oracle Application Express Administration Services. See "Logging in to Oracle Application Express Administration Services".

  2. Click Manage Workspaces.

  3. Under Manage Workspaces, click Manage Workspace to Schema Assignments.

    The Manage Workspace to Schema Assignments page appears.

  4. To edit an existing workspace to schema assignment:

    1. Select the workspace name.

      The Edit Schema to Workspace Assignment page appears.

    2. Select a new workspace or schema.

    3. Click Apply Changes.

Associating Additional Schemas with a Workspace

Oracle Application Express administrators can associate (or map) additional existing schemas to a workspace.

Associating Additional Schemas in a Full Development Environment

To associate additional schemas with a workspace:

  1. Log in to Oracle Application Express Administration Services. See "Logging in to Oracle Application Express Administration Services".

  2. Click Manage Workspaces.

  3. Under Manage Workspaces, click Manage Workspace to Schema Assignments.

    The Manage Workspace to Schema Assignments page appears.

  4. Click Create.

    The Add Schema wizard appears.

  5. For New or Existing Schema, select Existing and click Next.

  6. Follow the on-screen instructions to associate the existing schema to a workspace.

  7. To verify that the new schema is added to the workspace:

    1. Log in to the workspace on Oracle Application Express.

    2. Review the Workspace Schemas list on the Workspace home page. The list shows all schemas currently associated with this workspace.

Associating Additional Schemas in a Runtime Environment

To associate additional schemas with a workspace in a runtime environment:

  1. Start SQL*Plus and connect to the database where Oracle Application Express is installed as SYS. For example:

    • On Windows:

      SYSTEM_DRIVE:\ sqlplus /nolog
      connect sys as sysdba
      
    • On UNIX and Linux:

      $ sqlplus /nolog
      connect sys as sysdba
      

    When prompted enter the appropriate password.

  2. Run the following statement:

    ALTER SESSION SET CURRENT_SCHEMA = FLOWS_030100
    
  3. Run the following statement:

    BEGIN
    APEX_INSTANCE_ADMIN.ADD_SCHEMA(WORKSPACE_NAME, SCHEMA_NAME)
    END;
    

    Where:

    • WORKSPACE_NAME is the name of the workspace.

    • SCHEMA_NAME is the name of the schema.

Removing a Schema Mapping from a Workspace in a Runtime Environment

To remove a schema mapping from a workspace in a runtime environment:

  1. Start SQL*Plus and connect to the database where Oracle Application Express is installed as SYS. For example:

    • On Windows:

      SYSTEM_DRIVE:\ sqlplus /nolog
      connect sys as sysdba
      
    • On UNIX and Linux:

      $ sqlplus /nolog
      connect sys as sysdba
      

    When prompted enter the appropriate password.

  2. Run the following statement:

    ALTER SESSION SET CURRENT_SCHEMA = FLOWS_030100
    
  3. Run the following statement:

    BEGIN
    APEX_INSTANCE_ADMIN.REMOVE_SCHEMA(WORKSPACE_NAME, SCHEMA_NAME)
    END;
    

    Where:

    • WORKSPACE_NAME is the name of the workspace.

    • SCHEMA_NAME is the name of the schema.

Creating a New Schema

Oracle Application Express administrators can create a new schema and associate it with a workspace.

To create a new schema for a workspace:

  1. Log in to Oracle Application Express Administration Services. See "Logging in to Oracle Application Express Administration Services".

  2. Click Manage Workspaces.

  3. Under Manage Workspaces, click Manage Workspace to Schema Assignments.

    The Manage Workspace to Schema Assignments page appears.

  4. Click Create.

    The Add Schema wizard appears.

  5. For New or Existing Schema, select New and click Next.

  6. For Choose Workspace, select the workspace that you want to associate the new schema with and click Next.

  7. For Identify Schema:

    1. Schema - Enter a unique name containing only letters.


      Tip:

      To verify that the new schema name is unique, open the select list and search for the name.

    2. Password - Enter a case-sensitive password.

    3. Default Tablespace - Identify the default tablespace that you want this schema to use.

    4. Temporary Tablespace - Identify the temporary tablespace you want this schema to use.

    5. Click Next.

  8. Confirm the information and click Add Schema.

  9. To verify that the new schema is added to the workspace:

    1. Log in to the workspace on Oracle Application Express.

    2. Review the Workspace Schemas list on the Workspace home page. The list shows all schemas associated with this workspace.