Search code examples
oracle-databaseoracle-ordsmod-plsql

Distinguish between Oracle mod_plsql and ORDS in frontend


I would need to distinguish in my frontend what kind of Oracle backend (mod_plsql or ords) is running and cannot seem to find a reliable way to do so. Any ideas would be most appreciated.


Solution

  • This is by design to not "leak" what the backend details. A custom mechanism would be required to know this in the front end.

    ORDS does inject an http header into OWA CGI ENVs for this purpose. A procedure like this could allow someone to write a a proc to return a 1/0 or something to know if ords or not ords.

    create or replace procedure whoami as
    begin
    if  owa_util.get_cgi_env( 'APEX_LISTENER_VERSION' ) is not null   then
    
        htp.prn('ords');
    else
        htp.prn('not ords');
    end if;
    end;
    /