Postinstallation Tasks For Oracle Application Express
Postinstallation Tasks For Oracle Application Express
Restarting Processes Choosing an HTTP Server Configuring the Embedded PL/SQL Gateway Configuring Oracle HTTP Server in a New Installation Copying the Images Directory Enabling Network Services in Oracle Database 11g About Running Oracle Application Express in Other Languages Managing JOB_QUEUE_PROCESSES Obfuscating PlsqlDatabasePassword Parameter Logging In to Oracle Application Express Patching Oracle Application Express 3.0
Note: Within the context of this document, the Oracle home directory (ORACLE_HTTPSERVER_HOME) is the location where Oracle HTTP Server is installed.
About the Embedded PL/SQL Gateway About Oracle HTTP Server and mod_plsql About Password Security
server in the Oracle database and includes the core features of mod_plsql. The following graphic illustrates the Oracle Application Express architecture using the embedded PL/SQL gateway.
Description of the illustration arch_epg.gif As shown in the previous graphic, the embedded PL/SQL gateway offers a simple two tier architecture: a Web browser and an Oracle database, containing the embedded PL/SQL and Oracle Application Express. See Also: "Configuring the Embedded PL/SQL Gateway"
Description of the illustration arch.gif See Also: "Configuring Oracle HTTP Server in a New Installation"
Note that this configuration consists of three tier architecture: a Web browser, Oracle HTTP Server (Apache) with mod_plsql, and an Oracle database containing Oracle Application Express.
4.5.3.1 Configuring the Embedded PL/SQL Gateway in New Installation or When Upgrading Database
In a new installation or when upgrading the database, you configure the embedded PL/SQL gateway by running the configuration script apxconf.sql. Running this script enables you to configure the port for Oracle XML DB HTTP server and to specify a password for the Application Express ADMIN account. Then, you unlock the ANONYMOUS account. To configure the embedded PL/SQL gateway: 1. Change your working directory to ORACLE_BASE\ORACLE_HOME\apex or whatever convention used to indicate the Oracle home. 2. Start SQL*Plus and connect to the database where Oracle Application Express is installed as SYS. For example:
3. DRIVE_LETTER:\> sqlplus /nolog 4. SQL> CONNECT SYS as SYSDBA 5. Enter password: SYS_password
7. @apxconf
8. When prompted, enter a password for the Application Express Admin account. Be sure to make a note of the password you enter. You will use this password to log in to Oracle Application Express Administration Services. 9. When prompted, enter the port for the Oracle XML DB HTTP server. The default port number is 8080. 10. Enter the following statement to unlock the ANONYMOUS account:
Disabling Oracle XML DB HTTP Server To disable Oracle XML DB HTTP server: 1. Start SQL*Plus and connect to the database where Oracle Application Express is installed as SYS. For example:
2. DRIVE_LETTER:\> sqlplus /nolog 3. SQL> CONNECT SYS as SYSDBA 4. Enter password: SYS_password
5. Run the following statements:
1. Start SQL*Plus and connect to the database where Oracle Application Express is installed as SYS. For example:
2. DRIVE_LETTER:\> sqlplus /nolog 3. SQL> CONNECT SYS as SYSDBA 4. Enter password: SYS_password
5. Run the following statements:
Configuring Oracle HTTP Server Release 9.0.3 in a New Installation Configuring Oracle HTTP Server Distributed with Oracle Database 11g or Oracle Application Server 10g in a New Installation
Changing the Password for the ADMIN Account Changing the Password for the APEX_PUBLIC_USER Database User Modifying the wdbsvr.app File in a New Installation Modifying the Oracle9i httpd.conf
Changing the Password for the ADMIN Account To change the password for the ADMIN account: First, change the password for the Oracle Application Express ADMIN account. 1. Start SQL*Plus and connect to the database where Oracle Application Express is installed as SYS. For example:
2. DRIVE_LETTER:\> sqlplus /nolog 3. SQL> CONNECT SYS as SYSDBA 4. Enter password: SYS_password 5. Run apxxepwd.sql. For example: 6. @apxxepwd.sql
When prompted enter a password for the ADMIN account. 7. Enter the following command followed by the new password.
8. @apxxepwd.sql password
For example to change the password to apex, you would enter:
@apxxepwd.sql apex
Changing the Password for the APEX_PUBLIC_USER Database User In order to specify the password in the DAD file, you have to change the password for the database user APEX_PUBLIC_USER. Please use the following steps to change the password for the APEX_PUBLIC_USER database user: 1. Start SQL*Plus and connect to the database where Oracle Application Express is installed as SYS. For example:
2. DRIVE_LETTER:\> sqlplus /nolog 3. SQL> CONNECT SYS as SYSDBA 4. Enter password: SYS_password
5. Run the following statement:
2. ORACLE_BASE\ORACLE_HTTPSERVER_HOME\Apache\modplsql\cfg\ wdbsvr.app
3. Add an entry for Oracle Application Express using the following syntax. Only change the settings indicated in italics.
4. [DAD_apex] 5. connect_string = localhost:1521:orcl 6. password = apex 7. username = apex_public_user 8. default_page = apex 9. document_table = wwv_flow_file_objects$ 10. document_path = docs 11. document_proc = wwv_flow_file_mgr.process_download 12. reuse = Yes 13. enablesso = No 14. stateful = STATELESS_RESET 15. nls_lang = American_America.AL32UTF8
Where:
o
Password for the APEX_PUBLIC_USER Database User. o nls_lang determines the language setting of the DAD. The character set portion of the nls_lang value must always be set to AL32UTF8, regardless of whether or not the database character set is AL32UTF8.
If either the territory portion or the language portion of the NLS settings contains a space, you must wrap the value in double quotes as shown in the following example:
2. ORACLE_BASE\ORACLE_HTTPSERVER_HOME\Apache\Apache\conf\h ttpd.conf
3. Add an alias entry that points to the file system path where you copied the images directory.
AddType text/xml
xbl
htc
7. Stop and restart Oracle HTTP Server. o Stop Oracle HTTP Server - From the Start menu, select Programs, Oracle - OraHome, Oracle HTTP Server, and Stop HTTP Server. o Restart Oracle HTTP Server - From the Start menu, select Programs, Oracle - OraHome, Oracle HTTP Server, and Start HTTP Server. See Also:
4.5.4.2 Configuring Oracle HTTP Server Distributed with Oracle Database 11g or Oracle Application Server 10g in a New Installation
Perform the following post-installation steps if: Note: To install Oracle HTTP Server, use the Oracle Fusion Middleware Web Tier Utilities 11g (11.1.1.2.0) media or download.
This is a new installation of Oracle Application Express (that is, you are not upgrading from a previous release) You are running Oracle HTTP Server distributed with Oracle Database 11g or Oracle Application Server 10g. Oracle HTTP Server is installed in an Oracle home.
Changing the Password for the ADMIN Account Unlocking the APEX_PUBLIC_USER Database User Changing the Password for the APEX_PUBLIC_USER Database User Edit the dads.conf File Stop and Restart Oracle HTTP Server
Note that instructions do not apply if you are running Oracle HTTP Server release 9.0.3. To learn more, see "Configuring Oracle HTTP Server Release 9.0.3 in a New Installation". Note: Within the context of this section, the Oracle home directory (ORACLE_HTTPSERVER_HOME) is the location where Oracle HTTP Server is installed. Changing the Password for the ADMIN Account
First, change the password for the Oracle Application Express ADMIN account. To change the password for the ADMIN account: 1. Change your working directory to ORACLE_BASE\ORACLE_HOME\apex or whatever convention used to indicate the Oracle home. 2. Start SQL*Plus and connect to the database where Oracle Application Express is installed as SYS. For example:
3. DRIVE_LETTER:\> sqlplus /nolog 4. SQL> CONNECT SYS as SYSDBA 5. Enter password: SYS_password 6. Run apxxepwd.sql. For example: 7. @apxxepwd.sql
When prompted enter a password for the ADMIN account. 8. Enter the following command followed by the new password.
9. @apxxepwd.sql password
For example to change the password to apex, you would enter:
@apxxepwd.sql apex
Unlocking the APEX_PUBLIC_USER Database User When configuring Oracle HTTP Server for Oracle Application Express in a new installation, the database user APEX_PUBLIC_USER must be an unlocked account. To unlock the account for database user APEX_PUBLIC_USER, execute the following steps: 1. Start SQL*Plus and connect to the database where Oracle Application Express is installed as SYS. For example:
2. DRIVE_LETTER:\> sqlplus /nolog 3. SQL> CONNECT SYS as SYSDBA 4. Enter password: SYS_password
5. Run the following statement:
1. Start SQL*Plus and connect to the database where Oracle Application Express is installed as SYS. For example:
2. DRIVE_LETTER:\> sqlplus /nolog 3. SQL> CONNECT SYS as SYSDBA 4. Enter password: SYS_password
5. Run the following statement:
6. SQL> PASSWORD APEX_PUBLIC_USER 7. Changing password for APEX_PUBLIC_USER 8. New password: password 9. Retype new password: password
Edit the dads.conf File If this is a new installation of Oracle Application Express, you need to edit the dads.conf file. The dads.conf file contains the information about the DAD to access Oracle Application Express. To edit the dads.conf file: 1. Use a text editor and open the dads.conf: o Oracle Application Server 10g:
ORACLE_BASE\ORACLE_HTTPSERVER_HOME\Apache\modplsql \conf\dads.conf o Oracle HTTP Server distributed with Oracle Database 11g: o ORACLE_BASE\ORACLE_HTTPSERVER_HOME\ohs\modplsql\co nf\dads.conf 2. Copy the following into the dads.conf file. Replace ORACLE_HTTPSERVER_HOME, host, port, service_name, and apex_public_user_password with values appropriate for your environment. Note that apex_public_user_password is the password
o
you defined in "Changing the Password for the APEX_PUBLIC_USER Database User". Note that the path listed is only an example. The path in the dads.conf file should reference the file system path described in Copying the Images Directory.
Alias /i/ "ORACLE_BASE\ORACLE_HTTPSERVER_HOME\images/" AddType text/xml xbl AddType text/x-component htc <Location /pls/apex> Order deny,allow PlsqlDocumentPath docs
AllowOverride None PlsqlDocumentProcedure wwv_flow_file_mgr.process_download PlsqlDatabaseConnectString host:port:service_name ServiceNameFormat PlsqlNLSLanguage AMERICAN_AMERICA.AL32UTF8 PlsqlAuthenticationMode Basic SetHandler pls_handler PlsqlDocumentTablename wwv_flow_file_objects$ PlsqlDatabaseUsername APEX_PUBLIC_USER PlsqlDefaultPage apex PlsqlDatabasePassword apex_public_user_password Allow from all </Location>
3. Locate the line containing PlsqlNLSLanguage. The PlsqlNLSLanguage setting determines the language setting of the DAD. The character set portion of the PlsqlNLSLanguage value must be set to AL32UTF8, regardless of whether or not the database character set is AL32UTF8. For example:
AMERICAN_AMERICA.AL32UTF8
Note: This section is relevant only if you choose Oracle HTTP Server with mod_plsql. However, if you choose Oracle XML DB HTTP Server with the embedded PL/SQL gateway, then these steps can be ignored. Topics in this section include:
Copying the Images Directory After an Upgrade Copying the Images Directory in a New Installation
Oracle9i HTTP Server Release 2see the httpd.conf file. Oracle HTTP Server distributed with Oracle Database 11gsee the dads.conf file. Oracle Application Server 10gsee the marvel.conf file.
When you locate the images directory path, Oracle recommends that you copy the existing images directory to a backup location. Doing this allows you to revert to the previous release, if that becomes necessary. After you copy the existing images directory, use the following command syntax to copy the apex\images directory from the 11g Oracle database home to the existing images directory path, overwriting the existing images:
DRIVE_LETTER:\> xcopy /E /I ORACLE_HOME\apex\images ORACLE_HTTPSERVER_HOME\Apache\images Oracle HTTP Server distributed with Oracle Database 11g: DRIVE_LETTER:\> xcopy /E /I ORACLE_HOME\apex\images ORACLE_HTTPSERVER_HOME\ohs\images
ORACLE_HOME is the Oracle Database 11g Oracle home ORACLE_HTTPSERVER_HOME is the existing Oracle Application Server or
Oracle HTTP Server Oracle home
ORACLE_HOME is the Oracle Database 11g Oracle home ORACLE_HTTPSERVER_HOME is the existing Oracle Application Server or
Oracle HTTP Server Oracle home
Sending outbound mail in Oracle Application Express. Users can call methods from the APEX_MAIL package, but issues arise when sending outbound email.
Using Web services in Oracle Application Express. PDF/report printing. Searching for content in online Help (that is, using the Find link).
Granting Connect Privileges The following example demonstrates how to grant connect privileges to any host for the FLOWS_030000 database user.
In order to run the examples, the compatible initialization parameter of the database must be set to at least 11.1.0.0.0. In an 11g database, the parameter is already set by default. However, you will have to set this parameter in case of a database upgrade to 11g from a prior version. See Also: "Creating and Configuring an Oracle Database" in the Oracle Database Administrator's Guide for information about changing database compatible initialization parameters
DECLARE ACL_PATH VARCHAR2(4000); ACL_ID RAW(16); BEGIN -- Look for the ACL currently assigned to '*' and give FLOWS_030000 -- the "connect" privilege if FLOWS_030000 does not have the privilege yet. SELECT ACL INTO ACL_PATH FROM DBA_NETWORK_ACLS WHERE HOST = '*' AND LOWER_PORT IS NULL AND UPPER_PORT IS NULL; -- Before checking the privilege, make sure that the ACL is valid -- (for example, does not contain stale references to dropped users). -- If it does, the following exception will be raised: --- ORA-44416: Invalid ACL: Unresolved principal 'FLOWS_030000' -- ORA-06512: at "XDB.DBMS_XDBZ", line ... -SELECT SYS_OP_R2O(extractValue(P.RES, '/Resource/XMLRef')) INTO ACL_ID FROM XDB.XDB$ACL A, PATH_VIEW P WHERE extractValue(P.RES, '/Resource/XMLRef') = REF(A) AND EQUALS_PATH(P.RES, ACL_PATH) = 1; DBMS_XDBZ.ValidateACL(ACL_ID); IF DBMS_NETWORK_ACL_ADMIN.CHECK_PRIVILEGE(ACL_PATH, 'FLOWS_030000', 'connect') IS NULL THEN DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE(ACL_PATH,
'FLOWS_030000', TRUE, 'connect'); END IF; EXCEPTION -- When no ACL has been assigned to '*'. WHEN NO_DATA_FOUND THEN DBMS_NETWORK_ACL_ADMIN.CREATE_ACL('power_users.xml', 'ACL that lets power users to connect to everywhere', 'FLOWS_030000', TRUE, 'connect'); DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL('power_users.xml','*'); END; / COMMIT;
Troubleshooting an Invalid ACL Error If you receive an ORA-44416: Invalid ACL error after running the previous script, use the following query to identify the invalid ACL:
REM Show the dangling references to dropped users in the ACL that is assigned REM to '*'. SELECT ACL, PRINCIPAL FROM DBA_NETWORK_ACLS NACL, XDS_ACE ACE WHERE HOST = '*' AND LOWER_PORT IS NULL AND UPPER_PORT IS NULL AND NACL.ACLID = ACE.ACLID AND NOT EXISTS (SELECT NULL FROM ALL_USERS WHERE USERNAME = PRINCIPAL);
Next, run the following code to fix the ACL:
DECLARE ACL_ID RAW(16); CNT NUMBER; BEGIN -- Look for the object ID of the ACL currently assigned to '*' SELECT ACLID INTO ACL_ID FROM DBA_NETWORK_ACLS WHERE HOST = '*' AND LOWER_PORT IS NULL AND UPPER_PORT IS NULL;
-- If just some users referenced in the ACL are invalid, remove just those -- users in the ACL. Otherwise, drop the ACL completely. SELECT COUNT(PRINCIPAL) INTO CNT FROM XDS_ACE WHERE ACLID = ACL_ID AND EXISTS (SELECT NULL FROM ALL_USERS WHERE USERNAME = PRINCIPAL); IF (CNT > 0) THEN FOR R IN (SELECT PRINCIPAL FROM XDS_ACE WHERE ACLID = ACL_ID AND NOT EXISTS (SELECT NULL FROM ALL_USERS WHERE USERNAME = PRINCIPAL)) LOOP UPDATE XDB.XDB$ACL SET OBJECT_VALUE = DELETEXML(OBJECT_VALUE, '/ACL/ACE[PRINCIPAL="'||R.PRINCIPAL||'"]') WHERE OBJECT_ID = ACL_ID; END LOOP; ELSE DELETE FROM XDB.XDB$ACL WHERE OBJECT_ID = ACL_ID; END IF; END; / REM commit the changes. COMMIT;
Once the ACL has been fixed, you need to run the first script in this section to apply the ACL to the FLOWS_030000 user. See "Granting Connect Privileges".
more of these translated versions. At runtime, each user's Web browser language settings determine the specific language version. The translated version of Oracle Application Express should be loaded into a database that does not support the character encoding of the language, the installation may fail or the translated Oracle Application Express instance may appear corrupt when run. The database character set AL32UTF8 supports all the translated versions of Oracle Application Express. You can manually install translated versions of Oracle Application Express using SQL*Plus. The installation files are encoded in AL32UTF8. Note: Regardless of the target database character set, to install a translated version of Oracle Application Express, you must set the character set value of the NLS_LANG environment variable to AL32UTF8 prior to starting SQL*Plus. The following examples illustrate valid NLS_LANG settings for loading Oracle Application Express translations:
American_America.AL32UTF8 Japanese_Japan.AL32UTF8
2. set NLS_LANG=American_America.AL32UTF8 3. Start SQL*Plus and connect to the target database as SYS. For example: 4. DRIVE_LETTER:\> sqlplus /nolog
9. @load_lang.sql
Where lang is the specific language (for example, load_de.sql for German or load_ja.sql for Japanese).
In the installation log file On the About Application Express page in Oracle Application Express From SQL*Plus
Viewing JOB_QUEUE_PROCESSES in the Installation Log File After installing or upgrading Oracle Application Express to release 3.0, you can view the number of JOB_QUEUE_PROCESSES in the installation log files. See "Reviewing the Log of an Installation Session". Viewing JOB_QUEUE_PROCESSES in Oracle Application Express You can also view the number of JOB_QUEUE_PROCESSES on the About Oracle Application Express page.
To view the About Oracle Application Express page: 1. Log in to Oracle Application Express. See "Logging In to Oracle Application Express". 2. On the Administration list, click About Oracle Application Express. The current number JOB_QUEUE_PROCESSES displays at the bottom of the page. Viewing JOB_QUEUE_PROCESSES from SQL*Plus Users can also view the number of JOB_QUEUE_PROCESSES from SQL*Plus by running the following SQL statement:
ORACLE_BASE\ORACLE_HTTPSERVER_HOME\Apache\modplsql\conf
Oracle HTTP Server 11g:
ORACLE_BASE\ORACLE_HTTPSERVER_HOME\ohs\modplsql\conf
Workspace administrators are users who perform administrator tasks specific to a workspace such as managing user accounts, monitoring workspace activity, and viewing log files. Developers are users who create and edit applications. Developers can have their own workspace or share a workspace. End users have no development privileges. You define end users so that they can access applications that do not use an external authentication scheme. Oracle Application Express administrators are superusers that manage an entire hosted instance using the Application Express Administration Services application.
2. Specify a provisioning mode. In Oracle Application Express Administration Services, you need to determine how the process of creating (or provisioning) a workspace will work in your development environment. 3. Create a Workspace. A workspace is a virtual private database allowing multiple users to work within the same Oracle Application Express installation while keeping their objects, data and applications private. Each workspace has a unique ID and name. An Oracle Application Express administrator can create a workspace manually or have users submit requests. 4. Log in to a Workspace. Once you create a workspace in Oracle Application Express Administration Services, return to the Oracle Application Express Login page and log in to that workspace. See Also:
Oracle Database 2 Day + Application Express Developer's Guide or "Quick Start" in Oracle Database Application Express User's Guide
http://www.oracle.com/technetwork/developertools/apex/overview/index.html
Upgrading to Oracle Database 11g will not patch an Oracle Application Express 3.0 instance to Oracle Application Express 3.0.1.
Connected Mode: This mode is recommended if your server has direct connection to the Internet or connection through a proxy server. In this mode, configuration data is automatically collected and uploaded to the Oracle system. Updates to Oracle Configuration Manager occur automatically. Disconnected Mode: This mode is recommended if your server does not have a connection to Internet. In this mode, you can collect configuration data manually by using the emCCR collect command. When you run this command,