Tuesday, 13 July 2021

Changing the image prefix in APEX



Mostly during APEX configuration we specify the image prefix as /i/
Example : 
                    SQL > @apexins.sql sysaux syaux temp /i/

Source container Database 19c
	Container Database	:	CDB
    Pluggable Database 1 : apxpdb1 : Apex20 configured : ORDS + Apache
Pluggable Database 2 : apxpdb2 : Apex20 configured : ORDS + Apache
Pluggable Database 3 : apxpdb3 : Apex20 configured : ORDS + Apache


I want to create a 4th pluggable database with apex version 19.
	Container Database	:	CDB
Pluggable Database 1 : apxpdb1 : Apex20 configured : ORDS + Apache
Pluggable Database 2 : apxpdb2 : Apex20 configured : ORDS + Apache
Pluggable Database 3 : apxpdb3 : Apex20 configured : ORDS + Apache
Pluggable Database 4 : apxpdb4 : Apex19 configured : ORDS

The challenge I faced is with the images folder we deploy in Apache TOMCAT / OHS.

As we know that we copy the images folder from APEX and copy it to webapps folder under Tomcat installation directory and rename the directory as i.

Already there is an images folder copied under webapps folder from APEX20.

We cant use the same images folder for APEX 19 as the images content are different in Apex19 and Apex20.


So a quick solution was to change the image prefix for Apex19 from /i/ to /i19/.
 /i19/ will be my new name to the image prefix.

Inside Apex directory , navigate to utilities folder and run below script 
Connect to pluggable database apxpdb4
SQL > @reset_image_prefix.sql



Option A - If Using Apache Tomcat

Once the above script is completed - 
        1. Copy the Images folder from apex19 folder and copy it to webapps folder under tomcat
        2. Rename the images folder to  i19.
        3.  Restart Apache Tomcat services.

Option B - If Using OHS

Once the above script is completed - 
        1. Edit the dads.conf file and add a new image alias as 
                    Alias /i19/ /location/to/images/
        2. Restart OHS services

         *** refer my blog to configure APEX to run over OHS.

No comments:

Post a Comment