Tuesday 14 July 2015

Oracle APEX 4.2.x and 5.0 environment info

Are we running APEX Listener or HTTPS or Embedded PL/SQL?

Something every APEX DBA (developers as well) should know! :)

Just a short post on how to recognize or find out what is your current APEX architecture. 

Many times it happens that you join the project at the end and there is absolutely no documentation about how and in what type of architecture your APEX instance is running, right? Then we are on the same page and in this post I will try to give some guidelines.

It can not be too difficult as there are only three options. 

It is either APEX Listener (now ORDS), HTTPS or Embedded PL/SQL (EPG). For most DEV environments it is most likely to be Embedded PL/SQL as this one is easier for developers/ DBAs to setup it up.

Most common example for EPG would be
http://www.myapexexample.com:8080/apex
as most often EPG runs on port 8080 but it doesn't have to be. 

Now on prod environments it becomes more interesting. 
Sometimes it is not easy to say for sure what we are using just by looking at your APEX URLs.

For example:
http://www.myapexexample.com:7001/ords/f?p=101
problem is that /ords/ can be reconfigured during the installation to be /apex/ or something else. Then you wouldn't be able to say ORDS or not.

HTTPS example would be 
https://apex.oracle.com/pls/apex/f?p=101
key part most of the times for recognizing it would be /pls/ part. But if you login into APEX workspace and select About option you would notice something different.

Meaning the above link even though it uses /pls/ in its syntax actually runs ORDS.
 
From my experience we found instances where we had clients with Web logic installed and partially configured but they were running as PL/SQL embedded. From DBA perspective it was very hard to determinate which version were we running from just by listening to the opened ports etc. First he thought it was Web logic and ORDS then it turned to be PL/SQL embedded as port 8080 was opened and used.

What we can do from APEX side (if we have access to APEX workspace as administrators/ developers) is to open About option that sits under main Administration tab and see what is says there.

4.2.x version

where you will get a basic idea where you are. Screens below are examples of different APEX versions and values I got for some of my environments.

APEX 4.2.0 running embedded PL/SQL

APEX 4.2.6 running ORDS
 
 APEX 5.0 running ORDS (option is hidden under top right ? menu)
 
Unfortunately I didn't have any HTTPS example where I could have copied the same but there is a work around.

If for any reason you can not find this link you can retrieve the same by using:
begin
OWA_UTIL.print_cgi_env;
end;
in your APEX SQL Workshop. 

What this procedure will do is display similar details to the one you can see under About option. 

Problem with this is that I was unable to run this in TOAD or SQL Developer ether as schema owner or SYS as I was getting exception raised.

I will only include EPG version on APEX 4.2.0 as an example:
PLSQL_GATEWAY = WebDb
GATEWAY_IVERSION = 2
SERVER_SOFTWARE = Oracle Embedded PL/SQL Gateway/11.2.0.3.0
GATEWAY_INTERFACE = CGI/1.1
SERVER_PORT = 8080
SERVER_NAME = XDB HTTP Server
you can clearly see the similarities to About screen.

To simplify the output we can use
select owa_util.get_cgi_env( 'SERVER_SOFTWARE' ) from dual;
which would in HTTPS example give back
Oracle-Application-Server-10g/10.1.2.2.0 Oracle-HTTP-Server
Hopefully this will give you enough details to determinate your APEX instance details.

Regards,
SLino



No comments:

Post a Comment