Oracle® Application Express Administration Guide Release 3.2 Part Number E12512-01 |
|
|
PDF · Mobi · ePub |
This section describes how Oracle Application Express administrators can manage existing workspaces within an Oracle Application Express instance.
Topics in this section include:
See Also:
"Creating Workspaces", "Managing Schemas", "Managing Users in an Oracle Application Express Instance"Use the Existing Workspaces page to view a report of existing workspaces, delete an existing workspace, or create a new workspace.
To view existing workspaces:
Log in to Oracle Application Express Administration Services. See "Logging in to Oracle Application Express Administration Services".
Click Manage Workspaces.
Under Workspace Reports, click Existing Workspaces.
The Existing Workspaces page appears with a navigation bar at the top:
Search - To search for a workspace, enter a case insensitive query in the Search field and click Go.
Display - To change the number of workspaces that appear in the list, make a selection from the Display list and click Go.
To create a new workspace, click Create Workspace and follow the on-screen instructions.
To view workspace details, click the workspace name. See "About the Workspace Details Page".
Oracle Application Express administrators can view and edit workspace information on the Workspace Details page.
To view workspace details:
Log in to Oracle Application Express Administration Services. See "Logging in to Oracle Application Express Administration Services".
Click Manage Workspaces.
Under Workspace Reports, click Workspace Details.
The Workspace Details page appears.
Make a selection from the Workspace list at the top of the page and click Go.
The Workspace Details page appears.
The Workspace Details page is divided into the following sections:
Name. Displays high-level information about the workspace: ID, Short Name, and the First Schema Provisioned. To edit the workspace name, click Edit Attributes and follow the on-screen instructions.
Schemas. Displays the default tablespace for each workspace schema.
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 schemas. By associating a workspace with a schema, developers can build applications that interact with the objects in that schema and create new database objects in that schema. To edit workspace to schema assignments, click Workspace to Schema Assignments. See "Managing Schemas".
Privileges. Lists the database system privileges for each workspace schema.
Role Privileges. Lists the database roles granted to each workspace schema.
Tablespace Utilization. Displays the tablespace used with each workspace schema.
Applications. Lists all applications within the workspace.
Developers. Lists all application developers within the workspace. To edit a developer, click Manage Application Developers. See "Managing Users in an Oracle Application Express Instance".
Application Express Users. Lists all defined users within the workspace. To edit a user, click Manage Users. See "Managing Users in an Oracle Application Express Instance".
Objects by Type. Lists objects used by the schemas in the workspace.
Change Requests. Lists all change requests in an Oracle Application Express instance.
User Activity. Lists user activity by date.
Developer Activity. Lists developer activity by developer name and application.
Oracle Application Express administrators can view a summary of workspace database privileges on the Workspace Database Privileges page.
To view workspace database privileges:
Log in to Oracle Application Express Administration Services. See "Logging in to Oracle Application Express Administration Services".
Click Manage Workspaces.
Under Workspace Reports, click Workspace Database Privileges.
The Workspace Database Privileges page appears.
To search for a workspace, enter a case insensitive query in the Find field and click Go.
To control the number of workspaces that display, make a selection from the Display list and click Go.
To view workspace details, click the workspace name.
The Workspace Details page appears. See "Viewing Workspace Details".
If you are managing a large hosted Oracle Application Express instance, periodically purging inactive workspaces can free up resources for other users. The process of purging inactive workspaces consists of the following steps:
Identify inactive workspaces.
Remove the resources associated with each inactive workspace.
Delete the inactive workspaces.
Topics in this section include:
The first step in determining if a workspace is inactive is to establish some basic rules. A common approach is to base the rules on the Oracle Application Express activity records found in the current Application Express engine schema.
The following DDL (data definition language) creates a table of all workspaces requested before June 28, 2004 but that have been inactive since June 10, 2004. In this example, inactivity is determined by checking a key within the Application Express engine schema for the most recent updates by each workspace.
ALTER SESSION SET CURRENT_SCHEMA = APEX_030200; CREATE TABLE ws_to_purge AS SELECT c.security_group_id, c.company_name, c.admin_email, c.request_date, SYSDATE last_updated_on, 'Y' ok_to_delete FROM wwv_flow_provision_company c WHERE c.request_date <= to_date('20040628','YYYYMMDD') AND ( not exists (SELECT NULL /* Activity Log */ FROM wwv_flow_activity_log l WHERE l.security_group_id = c.security_group_id AND l.time_stamp > to_date('20040610','YYYYMMDD')) ) AND NOT EXISTS (SELECT NULL /* workspace applications */ FROM wwv_flows f WHERE f.security_group_id = c.security_group_id AND f.last_updated_on > to_date('20040610','YYYYMMDD')) AND NOT EXISTS (SELECT NULL /* Pages */ FROM wwv_flow_steps s WHERE s.security_group_id = c.security_group_id AND s.last_updated_on > to_date('20040610','YYYYMMDD')) AND NOT EXISTS (SELECT NULL /* Regions */ FROM wwv_flow_page_plugs p WHERE p.security_group_id = c.security_group_id AND p.last_updated_on > to_date('20040610','YYYYMMDD')) AND NOT EXISTS (SELECT NULL /* Items */ FROM wwv_flow_step_items i WHERE i.security_group_id = c.security_group_id AND i.last_updated_on > to_date('20040610','YYYYMMDD')) AND NOT EXISTS (SELECT NULL /* Templates */ FROM wwv_flow_templates t WHERE t.security_group_id = c.security_group_id AND t.last_updated_on > to_date('20040610','YYYYMMDD')) AND NOT EXISTS (SELECT NULL /* Files uploaded */ FROM wwv_flow_file_objects$ o WHERE o.security_group_id = c.security_group_id AND o.created_on > to_date('20040610','YYYYMMDD')) AND NOT EXISTS (SELECT NULL /* SQL Workshop history */ FROM wwv_flow_sw_sql_cmds s WHERE s.security_group_id = c.security_group_id AND s.created_on > to_date('20040610','YYYYMMDD'));
After you identify inactive workspaces, you can purge them. Purging inactive workspaces is a two-step process:
First, remove the resources (that is, the database schemas, tablespaces, and data files) associated with each inactive workspace.
Second, drop the inactive workspaces from Oracle Application Express.
After you have identified inactive workspaces in a single table, the next step is to remove them.
Note:
Before removing the schemas, tablespaces, or data files associated with inactive workspaces, make sure these resources are not being used in any other workspace or application.To remove the resources associated with inactive workspaces:
Identify the schemas used by the workspaces to be deleted by joining the table containing the identified inactive workspaces to wwv_flow_company_schemas.
Drop the schemas, tablespaces, and data files used exclusively by the inactive workspaces from the database. You can identify the schemas to drop by running a query similar to the following:
SELECT s.schema FROM ws_to_purge ws, wwv_flow_company_schemas s WHERE s.security_group_id = ws.security_group_id AND ws.ok_to_delete = 'Y';
Once you remove the resources associated with an inactive workspace, you can delete the workspace. You can delete inactive workspaces manually using the Oracle Application Express Administration Services application. Or, you can delete them programmatically as shown in the following PL/SQL example.
BEGIN FOR c1 IN (SELECT security_group_id FROM ws_to_purge WHERE ok_to_delete = 'Y') LOOP WWV_FLOW_PROVISIONING.TERMINATE_SERVICE_BY_SGID(c1.security_group_id); END LOOP; END;
Removing a workspace does not remove any of the associated database objects. To remove the associated schemas, a database administrator (DBA) must use a standard database administration tool, such as Oracle Enterprise Manager or SQL*Plus.
Topics in this section include:
To remove a workspace in a full development environment:
Log in to Oracle Application Express Administration Services. See "Logging in to Oracle Application Express Administration Services".
Click Manage Workspaces.
Under Workspace Reports, click Existing Workspaces.
Under the Action column, click Delete.
Follow the on-screen instructions.
To remove a workspace in a runtime development environment:
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.
Run the following statement:
ALTER SESSION SET CURRENT_SCHEMA = APEX_030200
Run the following statement:
BEGIN APEX_INSTANCE_ADMIN.REMOVE_WORKSPACE(WORKSPACE_NAME, DROP_USER, DROP_TABLESPACE) END;
Where:
WORKSPACE_NAME
is the name of the workspace.
DROP_USER
is either Y or N. The default is N.
DROP_TABLESPACE
is either Y
or N
. The default is N
.
Oracle Application Express administrators can lock a workspace to address security or performance issues. Locking a workspace immediately locks all workspace administrator, developer and user accounts in the workspace. It also changes the status of all applications in the workspace to Unavailable.
Warning:
Locking a workspace makes it permanently inaccessible.To lock a workspace:
Log in to Oracle Application Express Administration Services. See "Logging in to Oracle Application Express Administration Services".
Click Manage Workspaces.
Under Manage Workspaces, click Lock Workspace.
For Workspace, select the workspace you want to lock and click Next.
Review the information about applications and users and click Lock Workspace.
To move a workspace and all associated users to a new Oracle Application Express instance, an Oracle Application Express administrator must export the workspace. When you export a workspace, Oracle Application Express generates a text file. This file contains information about your workspace, all the users in your workspace, and any groups in your workspace (if applicable). You can use this file to import your workspace into another Oracle Application Express instance.
Keep in mind, this method only imports workspace, users, and groups. This file does not contain:
The schemas associated with this workspace or the objects in those schemas.
Any applications, images, cascading style sheets, and static text files.
These items must be exported separately.
See Also:
"Deploying an Application" in Oracle Application Express Application Builder User's GuideTopics in this section include:
To export a workspace:
Log in to Oracle Application Express Administration Services. See "Logging in to Oracle Application Express Administration Services".
Click Manage Workspaces.
Under Manage Workspaces, click Export Workspace.
Select a workspace and then click Export Workspace.
To export the selected workspace, click Save File.
Follow the on-screen instructions.
To import a workspace:
Log in to Oracle Application Express Administration Services. See "Logging in to Oracle Application Express Administration Services".
Click Manage Workspaces.
Under Manage Workspaces, click Import Workspace.
Click Browse, select a workspace export file, and click Next.
To install the workspace, click Install.
Follow the on-screen instructions.