ApeX 5.0.2 Installation/Upgrade
Uninstallation of APEX from a default Oracle 11gR2 database
If you use the graphical dbca utility to create a new Oracle 11gR2 database, you will have noticed that this includes Application Express by default, and there is no way to deselect that option (to my knowledge) during the installation process. Here I will explain how you can remove APEX from the 11g database after the installation.
First, you need to figure out what version of APEX is installed. You can do this by looking at the name of the APEX_xxxxxx schema, or by executing the following query (with user SYS as SYSDBA):
SQL> select version from dba_registry where comp_id=’APEX’;
VERSION
——————————————————————————–
3.2.1.00.12
Next, you need to download the latest version of APEX as of writing is 5.0.1, but the uninstallation won’t work with this version.
Next, change to the directory “apex” and run the apexremov.sql script with user SYS as SYSDBA:
$ sqlplus /nolog
SQL*Plus: Release 11.2.0.3.0 Production on Fri Apr 6 14:07:26 2012
Copyright (c) 1982, 2011, Oracle. All rights reserved.
SQL> connect / as sysdba
Connected.
SQL> @apxremov.sql
When the script executed without errors, you should see the following message at the end:
PL/SQL procedure successfully completed.
…Application Express Removed
SQL>
You can now query dba_registry again, and you will notice that APEX is uninstalled!
Installation Steps:
- Unzip 0.2.zip (Version may vary) as follows, preserving directory names:
- Change your working directory to apex
- Start SQL*Plus and connect to the database where Oracle Application Express is installed as SYS specifying the SYSDBA For example:
$ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password
- Disable any existing password complexity rules for the default profile. See “Configuring Password Protection” in Oracle Database Security Guide. (Optional Step)
- Run sql passing the following arguments in the order shown:
@apxrtins tablespace_apex tablespace_files
tablespace_temp images
Where:
- tablespace_apex is the name of the tablespace for the Oracle Application Express application user.
- tablespace_files is the name of the tablespace for the Oracle Application Express files user.
- tablespace_temp is the name of the temporary tablespace.
- images is the virtual directory for Oracle Application Express images. To support future Oracle Application Express upgrades, define the virtual image directory as /i/.
Example:
@apxrtins SYSAUX SYSAUX TEMP /i/
When Oracle Application Express installs it creates three new database accounts:
- APEX_050200 – The account that owns the Oracle Application Express schema and
metadata.
- FLOWS_FILES – The account that owns the Oracle Application Express uploaded files.
- APEX_PUBLIC_USER – The minimally privileged account used for Oracle Application
Express configuration with Oracle HTTP Server and mod_plsql.
If you are upgrading from a previous release, FLOWS_FILES, already exists and APEX_PUBLIC_USER is created if it does not already exist.
Changing Admin Password
Run apxchpwd.sql. For example:
@apxchpwd
When prompted enter a password for the ADMIN account.
Enable APEX_PUBLIC_USER
ALTER USER APEX_PUBLIC_USER ACCOUNT UNLOCK
ALTER USER APEX_PUBLIC_USER IDENTIFIED BY new_password
Reference: https://docs.oracle.com/cd/E14373_01/install.32/e13366/otn_install.htm#CBHBDAIF
Installing ORDS
- Download and unzip Oracle REST Data Services. See Section 1.3, “Installing Oracle REST Data Services”.
- Change your active directory to the directory where you unzipped Oracle REST Data Services.
- Execute the following command:
java -jar ords.war - When prompted, enter the information required to complete the configuration process. Each prompt may have a default response enclosed in brackets []. To choose the default response, press Enter without entering anything.
You are prompted to enter the following data:- Location to store configuration data – Enter the location where you want to store Oracle REST Data Services configuration data. There is no default value.
- Name of the database server – Enter the name of the database server. The default value is localhost.
- Database listener port – Enter the port number that database is listening on. The default value is 1521.
- Database service name or database SID – Options include:
- Database service name – Enter 1 to specify the database service name (the default value).
- Database SID – Enter 2 to specify the database SID.
- Database user name – Enter the database user name to use for all PL/SQL Gateway operations. The default value is APEX_PUBLIC_USER.
- Database user password – Enter the database password for the user specified in the previous step. There is no default value.
- Passwords for RESTful Services Database Accounts – Options include:
- Choose passwords – Enter 1 to specify passwords for APEX_LISTENER and APEX_REST_PUBLIC_USER accounts (the default value).
- Re-use APEX_PUBLIC_USER password – Enter 2 to use the same password for APEX_LISTENER and APEX_REST_PUBLIC_USER as used for APEX_PUBLIC_USER.
- Skip passwords – Enter 3 to skip configuring RESTful Services. Note that entering 3 disables RESTful Services.
Reference: https://docs.oracle.com/cd/E37099_01/doc.20/e25066/install.htm#AELIG7183
Create Web Archive for Oracle Application Express Images
Before you begin, you must create a Web archive (WAR) file to contain the Oracle Application Express image files. Using the Java Archive (jar) command, enter the following command to create a Web archive file named i.war:
java -jar ords.war static <apex directory>\images
Where:
- <temp directory> is the directory location of the unzipped Oracle Application Express Listener file.
<apex directory> is the directory location of Oracle Application Express.
Tip:
The space and period (.) at the end of the command is required.
Install the Deployment
Tip:
The Oracle Application Express Listener files, apex.war and i.war, must be available before you start this task.
To install the deployment:
- Go to the WebLogic Server Home Page. Below Domain Configuration, select
Deployments. The Summary of Deployments displays
Description of the illustration wlogic_deploy.gif
- Click Install.
- Specify the location of the war file and click Next. The apex.war file is located in the folder where you unzipped the Oracle Application Express Listener ZIP file.
Install Application Assistant appears.
Description of the illustration wlogic_install_app.gif
- Select Install this deployment as an application and click Next.
- Select the servers and/or clusters to which you want to deploy the application or module and click Next.
Tip: If you have not created additional Managed Servers or clusters, you will not see this assistant page.
- In the Optional Settings, specify the following:
- Name – Enter: apex
- Security – Select the following: Custom Roles: Use roles that are defined in the Administration Console; use policies that are defined in the deployment descriptor
- Source accessibility – Select: Use the defaults defined by the deployment’s targets
- Click Next.
Description of the illustration wlogic_install_sum.gif
A summary page appears.
- Under Additional configuration, select one of the following:
- Yes, take me to the deployment’s configuration – Displays the Configuration page.
- No I will review the configuration later – Returns you to the Summary of Deployments page.
- Review the summary of configuration settings that you have specified.
- Click Finish.
- Repeat the previous steps and deploy the war file. In the optional settings, specify the following:
- Name – Enter: i
- Security – Select: DD Only: Use only roles and policies that are defined in the deployment descriptors
- Source Accessibility – Select: Use the defaults defined by the deployment’s targets
- If your domain is in Production Mode, then on the Change Center click Activate Changes.
Verifying the State and Health of apex and i
In the Summary of Deployments, select the Control tab and verify that both the apex and i State are Active and the Health status is OK.
Description of the illustration wlogic_deploy_state.gif
If apex or i are not Active, then enable them. In the Deployments table, select the check box adjacent to apex and/or i. Click Start and select Servicing all requests to make them active.
Reference:https://docs.oracle.com/cd/E21611_01/doc.11/e21058/install.htm#AELIG7028
APEX Application Deployment
- Create Tablespace
CREATE TABLESPACE “NG_APEX”
DATAFILE
‘+DATA/DBNAME/datafile/NG_APEX.DBF’
SIZE 2000M AUTOEXTEND ON NEXT 10485760 MAXSIZE 32767M LOGGING
ONLINE PERMANENT BLOCKSIZE 8192 EXTENT MANAGEMENT LOCAL AUTOALLOCATE DEFAULT NOCOMPRESS SEGMENT SPACE MANAGEMENT AUTO;
Note: assumption TEMP tablespace exists for user default temporary tablespace
- Import DM datapump – example script for import:
impdp system@directory directory=P6_IMP dumpfile= expNGDM_v1.DMP logfile=impNGDM_06032015.log
Note: assumption directory exists to support datapump import
REF https://docs.oracle.com/cd/E59726_01/install.50/e39144/listener.htm#HTMIG29162
MAKE SURE TO RUN THIS SCRIPT TO ENABLE THE ACL PRIV FOR BIP
4.8.2 Granting Connect Privileges Prior to Oracle Database 12c
The following example demonstrates how to grant connect privileges to any host for the APEX_050000 database user. This example assumes you connected to the database where Oracle Application Express is installed as SYS specifying the SYSDBA role.
DECLARE
ACL_PATH VARCHAR2(4000);
BEGIN
— Look for the ACL currently assigned to ‘*’ and give APEX_050000
— the “connect” privilege if APEX_050000 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;
IF DBMS_NETWORK_ACL_ADMIN.CHECK_PRIVILEGE(ACL_PATH, ‘APEX_050000’,
‘connect’) IS NULL THEN
DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE(ACL_PATH,
‘APEX_050000’, 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’,
‘APEX_050000’, TRUE, ‘connect’);
DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL(‘power_users.xml’,’*’);
END;
/
COMMIT;
Creating Workspace
Open Admin console
https://192.168.2.123:7001/ords/apex_admin
Enter details provided by DBA
Click Create Work Space
Enter workspace name e.g. NG APPS
Select Reuse Existing Schema “Yes” and select Schemas named “NG_APPS”
Click Next
Click Done!
Importing APEX Application
Open Apex
e.g.http://192.168.2.123:7001/apex/
Enter credentials provided by Admin/DBA
Select Import File > select provided file and click Next
Click Install Application icon
Last screen like below!
Enter Credentials provided by DBA
No Comments