Oracle® Database Express Edition Application Express User's Guide Release 2.1 Part Number B25309-01 |
|
|
View PDF |
As you develop applications in Application Builder, you can mange your application development environment on the Application Administration page.
This section contains the following topics:
Use the Application Administration page to mange your application development environment. The Application Administration page contains the following icons:
Manage Services links to the Mange Services page. Use this page to manage session state, log files, preferences, and application models. See "About the Manage Services Page".
Manage Application Express Users links to the Manage Application Express Users page. Use this page to manage Application Express user accounts and user groups. See "Managing Application Express End Users".
Monitor Activity links to the Monitor Activity page. Use this page to monitor changes to page views and entire applications. See "Monitoring Activity".
Email Configuration links to the Email Configuration page. Use this page to configure email environment settings as well as manage the email log and email queue. See "How to Send Email from an Application".
A Tasks list displays on the right side of the Application Administration page and displays the following link:
About Application Express links to an About page that lists basic product information. See "About Application Express".
This section contains the following topics:
Use the Application Administration page to mange your application development environment.
To access the Application Administration page:
On the Database Home Page, click the Application Builder icon.
On the Tasks list, click Administration.
The Application Administration appears.
The About Application Express page lists basic product information.
To access the About Application Express page:
On the Database Home Page, click the Application Builder icon.
On the Tasks list, click About Application Express.
The About Application Express page appears.
The following Oracle Application Express product information displays:
Product build
Schema compatibility
Last DDL time
Host schema
Application Owner
Workspace ID
Current user
Language Preference
Current Time (on server)
The Manage Services pages page contains the following icons:
Session State. Use the Session State page to purge session state or user preferences. See "Managing Session State and User Preferences".
Manage Logs. Use the Manage Logs page to purge the Developer Activity and External Count Clicks log. See "Managing Log Files".
Preferences. Use the Preferences page to disable and enable application preferences such as PL/SQL program unit editing in Object Browser. See "Disabling PL/SQL Program Unit Editing".
Application Models. Use the Application Models page to search for and delete application models. See "Managing Application Models".
This section contains the following topic:
To access the Manage Services Page:
On the Database Home Page, click the Application Builder icon.
On the Tasks list, click Manage Services.
The Manage Services page appears.
A session is a logical construct that establishes persistence (or stateful behavior) across page views. Each session is assigned a unique ID which the Application Express engine uses to store and retrieve an application's working set of data (or session state) before and after each page view. Sessions persist in the database until purged.
Topics in this section include:
See Also:
"Understanding Session State Management"A session establishes persistence (or stateful behavior) across page views. You view and purge session state for the current session, purge existing sessions by age, or first review session details on the Session State page and then purge.
Topics in this section include:
To view session state for the current session:
On the Database Home Page, click the Application Builder icon.
From the Administration list, select Manage Services.
Click Session State.
When the Session State page appears, click Current preferences and session state with an option to purge.
To view information about the current session, click View Session State.
To reset the session state for the current session, click Purge Session State.
To purge existing session by age:
On the Database Home Page, click the Application Builder icon.
From the Administration list, select Manage Services.
Click Session State.
Select Purge sessions by age.
Make a selection from Sessions older than.
Click one of the following buttons:
Report Session generates a report detailing the total number of sessions for the database user account, the number of users, and the number of old sessions.
Purge Sessions purges existing sessions by age.
See Also:
"Viewing Session State"You can determine whether to remove existing sessions by first reviewing session details on the Session State page.
To view session details prior to removing session state:
On the Database Home Page, click the Application Builder icon.
From the Administration list, select Manage Services.
Click Session State.
Select Recent sessions with drill down to session details.
To narrow the results, select a time increment, specify a user, and click Go.
To view session details, select the session ID.
The Session Details page appears.
Click one of the following buttons:
Remove Session. Removes the record of the session from the SESSIONS
table along with session state (including collections data) associated with the session.
Any user using a session that is removed will no longer be able to use the session and will be prompted to re-authenticate in most situations upon their next page request. This option could be used by administrators who might have a need to make sure a certain a specific user could no longer access to an Oracle Application Express applications.
Remove State. Clears the session data from the session state tables (including collections data) but does not remove the session record. Removing a session is a good approach for developers during debugging.
This is the equivalent of clearing session state for the current session using the Clear Cache argument value SESSION
in the f?p URL. This option might be used by developers during debugging.
You can use preferences to store values for a specific Application Express user across distinct sessions. Once set, these preferences can removed programatically or manually. You can set user preferences by creating a page process, by the calculation of a preference Item Source Value, or programatically using a PL/SQL API.
Topics in this section include:
To manage user preferences for the current user:
On the Database Home Page, click the Application Builder icon.
From the Administration list, select Manage Services.
Click Session State.
When the Session State page appears, click Current preferences and session state with an option to purge.
To view preferences for the current user, click View Preferences.
To reset user preferences for the current user, click Reset Preferences.
You view preferences for a specific user on the Purge Preferences report.
To view the Purge Preferences report:
On the Database Home Page, click the Application Builder icon.
From the Administration list, select Manage Services.
Click Session State.
On the Session State page, select Preferences by user.
The Preferences by Users page appears.
Specify a user and click Go.
You can set user preferences within your application through the creation of a page process, by creating a preference item, or programatically.
Topics in this section include:
To set user preference values by creating a page process:
Navigate to the appropriate Page Definition:
Navigate to the Database Home Page.
Click the Application Builder icon.
Select an application.
Select a page.
The Page Definition appears.
Under Page Processes, click the Create icon.
The Create Page Process Wizard appears.
For the process category, select Session State.
For the process type, select one of the following:
Set Preference to value of item
Set Preference to value of item if item is not NULL
Specify a process name, sequence, and processing point.
Specify the preference value in the field provided using the format:
PreferenceName:Item
Click Page Items to see a list of available items.
Follow the on-screen instructions.
You can set the source of an item based on a user preference by defining the item source type as Preference.
To define the source of item based on a user preference:
Navigate to the appropriate Page Definition:
Navigate to the Database Home Page.
Click the Application Builder icon.
Select an application.
Select a page.
The Page Definition appears.
Under Item, click the Create icon.
The Create Item Wizard appears.
For the item type, select Hidden.
Specify the Item Name, sequence, and region.
From the Item Source list, select Preference.
In Item Source Value, enter the name of the preference.
Click Create Item.
To set or reference user preferences programatically, you must use a PL/SQL API. User-level caching is available programmatically. You can use the set_preference
function to set a user level preference called NAMED_PREFERENCE
. For example:
HTMLDB_UTIL.SET_PREFERENCE( p_preference=>'NAMED_PREFERENCE', p_value =>:ITEM_NAME);
You can reference the value of a user preference using the function GET_PREFERENCES
. For example:
NVL(HTMLDB_UTIL.GET_PREFERENCE('NAMED_PREFERENCE'),15)
In the previous example, the preference would default to the value 15 if the preference contained no value.
To remove user preferences programatically, you must use a PL/SQL API. You can use the REMOVE_PREFERENCE
procedure to remove a user level preference called NAMED_PREFERENCE
, for example:
HTMLDB_UTIL.REMOVE_PREFERENCE( p_preference=>'NAMED_PREFERENCE', p_value =>:ITEM_NAME);
You can reset user preferences by creating a page process and selecting the process type Reset Preferences.
To reset user preferences using a page process:
Navigate to the appropriate Page Definition:
Navigate to the Database Home Page.
Click the Application Builder icon.
Select an application.
Select a page.
The Page Definition appears.
Under Page Processes, click the Create icon.
The Create Page Process Wizard appears.
For the process category, select Session State.
From Type, select Reset Preferences.
Specify a process name, sequence, and process point.
Follow the on-screen instructions
You can purge preferences for a specific user on the Purge Preferences page.
To purge preferences for a specific user:
On the Database Home Page, click the Application Builder icon.
From the Administration list, select Manage Services.
Click Session State.
On the Session State page, select Purge preferences by user.
The Purge Preferences page appears.
Select a specific user and click Report.
A report appears at the bottom of the page.
To purge the displayed user preferences, click Purge User Preferences.
Log entries older then one month are automatically deleted. You can also manually purge log files on the Manage Logs page.
To purge log files, you must have a database account that has been granted a DBA role.
Topics in this section include:
Page Views track user activity for an application. Application developers enable logging within their application on the Edit Application Attributes page.
The Application Express engine actually uses two logs to track user activity. At any given time, one log is designated as current. For each rendered page view, the Application Express engine inserts one row into the log file. A log switch occurs at the interval listed under Log Interval. At that point, the Application Express engine removes all entries in the noncurrent log and designates it as current.
To truncate the activity logs manually:
On the Database Home Page, click the Application Builder icon.
From the Administration list, select Manage Services.
Select Manage Logs.
The Manage Logs page appears.
Select Page Views.
If prompted, enter the appropriate administrator username and password and click Login.
The entries in the current logs display.
Click either Truncate Log 1 or Truncate Log 2.
See Also:
"Monitoring Activity"The External Clicks Log counts clicks from an application to an external site. You can implement this functionality using COUNT_CLICK
procedure.
See Also:
"COUNT_CLICK Procedure"To purge the External Clicks Log:
On the Database Home Page, click the Application Builder icon.
From the Administration list, select Manage Services.
Click Manage Logs.
Click External Clicks.
If prompted, enter the appropriate administrator username and password and click Login.
Click Truncate Logs.
The Application Builder Activity log tracks changes to applications.
To purge the Application Builder Activity log:
On the Database Home Page, click the Application Builder icon.
From the Administration list, select Manage Services.
Click Manage Logs.
Click Builder Activity.
If prompted, enter the appropriate administrator username and password and click Login.
Click Truncate Logs.
See Also:
"Monitoring Activity"The SQL History logs maintain a history of recent commands and scripts run in SQL Commands.
To delete SQL History logs:
On the Database Home Page, click the Application Builder icon.
From the Administration list, select Manage Services.
Select Manage Logs.
The Manage Logs page appears.
Click SQL History.
If prompted, enter the appropriate administrator username and password and click Login.
The SQL History page appears, listing the current number of history entries.
To delete all entries, click Truncate Logs.
See Also:
"Using SQL Commands"The SQL Scripts Execution Log maintains a history of script executions from SQL Scripts.
To delete SQL Scripts Execution Log:
On the Database Home Page, click the Application Builder icon.
From the Administration list, select Manage Services.
Select Manage Logs.
The Manage Logs page appears.
Click SQL Script Execution.
If prompted, enter the appropriate administrator username and password and click Login.
The SQL Script Execution page appears, listing the current number of entries.
To delete all entries, click Truncate Logs.
See Also:
"Using SQL Scripts"By default, developers can change and compile PL/SQL source code when browsing database procedures, packages, and functions in Object Browser. You can disable PL/SQL program unit editing by selecting Do not allow PL/SQL program unit editing on the Preferences page.
To disable PL/SQL program unit editing:
On the Database Home Page, click the Application Builder icon.
From the Administration list, select Manage Services.
Click Preferences.
The Preferences page appears.
From PL/SQL Editing select one of the following:
Allow PL/SQL program unit editing
Do not allow PL/SQL program unit editing
If you select Do not allow PL/SQL program unit editing, developers can still create and replace PL/SQL program units using scripts or SQL Commands.
See Also:
"Using SQL Commands"Running the Create Application Wizard creates an application model. This model contains basic application property values, such as the application pages and page definitions, DML processes, and multi-row operation processes. When you create a new application, you can base it on an existing application model, making the creation process more productive.
See Also:
"About the Create Application Wizard"This section contains the following topics:
You can remove unwanted application models on the Application Models page.
To delete an application model:
On the Database Home Page, click the Application Builder icon.
From the Administration list, select Manage Services.
Click Application Models.
The Application Models page appears.
To search for a model, enter a case insensitive query in the Model field and click Go.
Select the models you want to delete and click Delete Checked.
See Also:
"Creating an Application"The simplest way to make an application available to other users is to create Application Express end users. Application Express end users do not have application development privileges and can only access applications that do not use an external authentication scheme. Use the Manage Application Express Users page to create new user accounts, manage existing user accounts, and change user passwords.
Topics in this section include:
See Also:
"Exporting Application Express Users", "About Publishing the Application URL" and "About Application Express Account Credentials" for information about implementing Application Express AuthenticationYou edit existing end user accounts on the View User page.
To edit an existing a user account:
On the Database Home Page, click the Application Builder icon.
From the Administration list, select Manage Application Express Users.
The Manage Application Express Users page appears.
Click View Users.
The View Users page appears.
You control how the page displays by making a selection from the View list. Available options include:
Icons (the default) displays each user as a large icon. To edit a user, click the appropriate icon.
Details displays each user as a line in a report. To edit a user, click a user name.
Select a user.
The Edit User page appears.
Under Edit User, edit the User Name or Email address.
Under Password, edit the current password by typing a new password in the Password and Confirm Password fields
Under User Groups, select an optional user group.
You can use groups to restrict access to various parts of an application. Groups are primarily useful when using Application Express Authentication.
Click Apply Changes.
You create new user accounts on the Create User page.
To create a new user account:
On the Database Home Page, click the Application Builder icon.
From the Administration list, select Manage Application Express Users.
The Manage Application Express Users page appears.
Click Create User.
The Create User page appears.
Under User Identification, enter the appropriate information. Required fields are marked with a red asterisk (*).
Under User Groups, select an optional user group.
You can use groups to restrict access to various parts of an application. Groups are primarily useful when using Application Express Authentication.
Click Create User or Create and Create Another.
To change an end user password:
On the Database Home Page, click the Application Builder icon.
From the Administration list, select Manage Application Express Users.
The Manage Application Express Users page appears.
Click View Users.
The View Users page appears.
To search for an existing user, enter a query in the Find field and clicking Go.
Select a user.
Scroll down to Password.
Type a new password in the Password and Confirm Password fields and click Apply Changes.
You can create groups to restrict access to various parts of an application. Keep in mind, however, that groups are not portable over different authentication schemes. Groups are primarily useful when using Application Express Authentication.
Topics in this section include:
See Also:
"About Application Express Account Credentials" for information about implementing Application Express Authentication and "Managing Application Express End Users"On the Database Home Page, click the Application Builder icon.
From the Administration list, select Manage Application Express Users.
The Manage Application Express Users page appears.
Click Create Group.
The Create/Edit Group page appears.
Specify a group name, description, and click Create Group.
To edit an existing group assignment:
On the Database Home Page, click the Application Builder icon.
From the Administration list, select Manage Application Express Users.
The Manage Application Express Users page appears.
Click User Group Assignments.
The User Group Assignments page appears.
Click the Edit icon adjacent to the Group Name.
Scroll down to User Groups, make a new selection, and click Apply Changes.
To view a report of user group assignments:
On the Database Home Page, click the Application Builder icon.
From the Administration list, select Manage Application Express Users.
The Manage Application Express Users page appears.
Click User Group Assignments.
The User Groups Assignments report appears.
On the Database Home Page, click the Application Builder icon.
From the Administration list, select Manage Application Express Users.
The Manage Application Express Users page appears.
Click View Users.
The Existing Users page appears.
Select a user.
The Edit User page appears.
Scroll down to User Groups.
Select a group from the Groups list.
Click Apply Changes.
On the Database Home Page, click the Application Builder icon.
From the Administration list, select Manage Application Express Users.
The Manage Application Express Users page appears.
Click View Users.
The Existing Users page appears.
Select a user.
The Edit User page appears.
Scroll down to User Groups.
Deselect the selected group in the Groups list.
Click Apply Changes.
You can monitor changes to page views and entire applications by viewing reports on the Monitor page.
Topics in this section include:
To access the Monitor page:
On the Database Home Page, click the Application Builder icon.
From the Administration list, select Monitor Activity.
The Monitor page is divided into the following sections:
Page Views
Application Changes
Sessions
Select a report to review.
To view application changes by developer:
On the Database Home Page, click the Application Builder icon.
From the Administration list, select Monitor Activity.
Under Application Changes, select By Application.
Specify a time frame. Make a selection form the Time list and click Go.
To view additional details, select a user ID.
To view application changes by day:
Navigate to the Database Home Page.
Click the Administration icon.
Click Monitor Activity.
Under Application Changes, select By Day.
The Application Changes by Day page appears.
Select the appropriate report:
Month View. Offers a listing of application changes by day in a Calendar view.
Report. Includes a report of application changes by day.
Line Chart. Make a selection from the Developer list and click Go.
By Developer Report. Specify a time frame by making a selection form the Time list and click Go. To view additional details, select a developer.
The Active Sessions Report displays active sessions for the current workspace (or database user).
To view application changes by developer:
On the Database Home Page, click the Application Builder icon.
From the Administration list, select Monitor Activity.
Under Sessions, select Active Sessions.
Select the session ID to view the Session Details page.
See Also:
"What Is a Session?"This section describes how to send email from an Application Builder application. Before you can send email from an Application Builder application, you first need to configure your Email Environment Settings.
Topics in this section include:
To send email from an Oracle Application Express application, you must configure settings on the Email Environment Preferences page. To access the Email Environment Settings page, you must have a database account that has been granted a DBA role.
To configure Email Environment Preferences:
On the Database Home Page, click the Application Builder icon.
From the Administration list, select Email Configuration.
The Email Configuration page appears.
Click Email Environment Settings.
If prompted, enter the appropriate administrator username and password and click Login.
On the Email Environment Setting page:
SMTP Host Address - Enter the server address of the SMTP server. On installation, this will be set to localhost
. If you are using another server as an SMTP relay, change localhost to that server's address.
For SMTP Host Port - Enter the port the SMTP server listens to for email requests. By default, this setting will be set to 25 at the time of installation.
Click Apply Changes.
You can send an email from an Application Builder application by:
Creating a background job to periodically send all mail messages stored in the active mail queue
Calling the PL/SQL package HTMLDB_MAIL
Topics in this section include:
See Also:
"Configuring Email Environment Settings"Oracle Application Express stores unsent email messages in a table named HTMLDB_MAIL_QUEUE. A DBMS_JOB
background process is automatically created when you install Oracle Application Express. This background process pushes the mail queue every 15 minutes.
The most efficient approach to sending email is to create a background job (using a DBMS_JOB
package) to periodically send all mail messages stored in the active mail queue.
You can also send an email from an Oracle Application Express application by calling the PL/SQL HTMLDB_MAIL
package. This package is built on top of the Oracle supplied UTL_SMTP
package. Because of this dependence, in order to use HTMLDB_MAIL
, the UTL_SMTP
package must be installed and functioning.
See Also:
Oracle Database PL/SQL Packages and Types Reference for more information about the UTL_SMTP package and "HTMLDB_MAIL"HTMLDB_MAIL
contains two procedures for manually sending email:
Use the HTMLDB_MAIL.SEND
procedure to manually send an outbound email message from your application
Use HTMLDB_MAIL
to deliver mail messages stored in HTMLDB_MAIL_QUEUE
Oracle Application Express stores unsent email messages in a table named HTMLDB_MAIL_QUEUE
. You can deliver mail messages stored in this queue to the specified SMTP gateway by calling the procedure HTMLDB_MAIL.PUSH_QUEUE
.
Oracle Application Express logs successfully submitted messages in the table HTMLDB_MAIL_LOG
with the timestamp reflecting your server's local time.
The following UNIX/LINUX example demonstrates the use of the HTMLDB_MAIL.PUSH_QUEUE
procedure using a shell script.
SQLPLUS / <<EOF FLOWS_020100.HTMLDB_MAIL.PUSH_QUEUE; DISCONNECT EXIT EOF
The Email log records message header information and send date of successfully sent mail message.
To view the email log:
On the Database Home Page, click the Application Builder icon.
From the Administration list, select Email Configuration.
Click Manage Email Log.
If prompted, enter the appropriate administrator username and password and click Login.
The Email Log page appears.
To control the number of rows that display, make a selection from the Display list and click Go.
To delete all log entries, click Truncate Log.
Use the Manage Mail Queue page to monitor email messages in the mail queue.
To monitor messages in the mail queue:
On the Database Home Page, click the Application Builder icon.
From the Administration list, select Email Configuration.
Click Manage Email Queue.
If prompted, enter the appropriate administrator username and password and click Login.
The Manage Email Queue page appears.
To send email messages, click Send All Mail.
To delete email messages, select the messages to be deleted and click Delete.