Tuesday 23 May 2017

Oracle Application Express (APEX) 5.x Installation With Oracle HTTP Server (OHS)

---Create a new tablespace to act as the default tablespace for APEX.
$sqlplus /as sysdba

-- For Oracle Managed Files (OMF).
SQL>CREATE TABLESPACE apex DATAFILE SIZE 1G AUTOEXTEND ON NEXT 100M;

-- For non-OMF.
SQL>CREATE TABLESPACE apex DATAFILE '/path/to/datafiles/apex01.dbf' SIZE 1G AUTOEXTEND ON NEXT 100M;

Remove the existing lower version of apex from database use below command.
---Uninstallation Process---

SQL>select * from dba_registry;

SQL>exit

$ cd $ORACLE_HOME/apex
$sqlplus /as sysdba

SQL>@apxremov.sql

SQL>exit

---Installation Process---

$ unzip apex_5.x.x_en.zip -d $ORACLE_HOME/

cd $ORACLE_HOME/apex

SQL>@apexins.sql APEX APEX TEMP1 /i/

SQL>@apxchpwd.sql

SQL> ALTER USER APEX_PUBLIC_USER IDENTIFIED BY myPassword ACCOUNT UNLOCK;

-----Installation and Configuration Oracle HTTP Server (OHS)----


----Login with oracle database user
#su - oracle

$mkdir -p /testsite/HTTP_Server ----software location
$mkdir -p /testsite/Oracle_WT ------Installation location

$ unzip ofm_webtier_ibm_aix_11.1.1.7.0_64_disk1_1of2 -d /testsite/HTTP_Server
$ unzip ofm_webtier_ibm_aix_11.1.1.7.0_64_disk1_2of2 -d /testsite/HTTP_Server

$cd /testsite/HTTP_Server

$ ls -l
Disk1
Disk2
Disk3
Disk4
Disk5

$cd Disk1

----Ignore Prerequisites.
$./runInstaller -ignoreSysPrereqs
$cd /testsite/Oracle_WT/Oracle_WT/instances/instance1/config/OHS/ohs1/mod_plsql

----Enter the below entry in the dads.conf file

Alias /i/ "/testsite/testdb/db/apex/images/"---Apex Image folder Location
<Location /apex>
   Order deny,allow
   PlsqlDocumentPath docs
   AllowOverride None
   PlsqlDocumentProcedure         wwv_flow_file_mgr.process_download
   PlsqlDatabaseConnectString     erptestappldb:1528:test ServiceNameFormat
   PlsqlNLSLanguage               AMERICAN_AMERICA.AL32UTF8
   PlsqlAuthenticationMode        Basic
   SetHandler                     pls_handler
   PlsqlDocumentTablename         wwv_flow_file_objects$
   PlsqlDatabaseUsername          APEX_PUBLIC_USER
   PlsqlDefaultPage               apex
   PlsqlDatabasePassword          myPassword
   PlsqlRequestValidationFunction wwv_flow_epg_include_modules.authorize
   PlsqlPathAlias                 i
   PlsqlPathAliasProcedure        wwv_flow.resolve_friendly_url
   Allow from all
</Location>

$cd Oracle_WT/Oracle_WT/instances/instance1/bin
$pwd
$ls -l
$./opmnctl stopall
$./opmnctl startall

----APEX should now be available from a URL like "http://machine:port/apex".--default port 7777


APP-FND-01516L Invalid application username, password, or database

Error:

APP-FND-01516L Invalid application username, password, or database

Username: APPLSYSPUB
Database: VIS




Solution:

Check the alter log file of the database for below error:

ORA-00020: maximum number of processes 0 exceeded
ORA-20 errors will not be written to the alert log for
 the next minute. Please look at trace files to see all
 the ORA-20 errors.

Shutdown the application and database

edit the init parameter file by increasing the parameter processes and sessions, then start the database with the edited init prameter file and start the application

E-Business Autoconfig Issues/Autoconfig Issues seen after a Patch, Clone, Migration or Installation

While doing the cloning of Oracle Application and after that  run auto config, then getting the  following error occurs. 

ERROR
-----------------------
ERROR at line 1:
ORA-04091: table APPLSYS.FND_PROFILE_OPTION_VALUES is mutating,
trigger/function may not see it
ORA-06512: at "APPS.FND_CORE_LOG", line 45
ORA-06512: at "APPS.FND_CORE_LOG", line 456
ORA-06512: at "APPS.FND_PROFILE", line 110
ORA-06512: at "APPS.ALR_FND_PROFILE_OPTIO_0_84_UAR", line 2
ORA-04088: error during execution of trigger
'APPS.ALR_FND_PROFILE_OPTIO_0_84_UAR'
ORA-06512: at line 43
ORA-06512: at line 123 

Error Codes
---------------------------------------------------
ORA-04091,ORA-06512,ORA-04088

Solution:

Run the below query and check triggers status:

SELECT * FROM DBA_TRIGGERS WHERE TABLE_NAME = 'FND_PROFILE_OPTION_VALUES' AND TABLE_OWNER = 'APPLSYS';

If below trigger status enable then I suggested to disable the triggers and retest the issue.

ALR_FND_PROFILE_OPTIO_0_84_UAR
ALR_FND_PROFILE_OPTIO_0_84_IAR
-----------------------