APEX 4.0 on Oracle 10.2.0.4 database with EPG

Ok. I just finished creating two extra Apex-environments (TEST and PROD)

Where I mention “SQL>” you are logged in in your sqlplus as SYS as SYSDBA privileges.

I now have a plan-of-attack for getting Apex 4 on a 10g database with EPG:

  1. Start the APEX installer (I unzipped my apex.zip into D:\APEX, so there is a D:\APEX\apex folder!)
    @apexins apex_ts apex_files_ts /i/
  2. load the apex images
    
    
    @apxldimg D:\APEX
  3. start the EPG configuration:
    
    
    @apex_epg_config D:\APEX
  4. unlock some accounts:
    alter user ANONYMOUS account unlock;
    alter user APEX_PUBLIC_USER account unlock;
    alter user APEX_040000 account unlock;
    alter user FLOWS_FILES account unlock;
    alter user XDB account unlock;
  5. check the DAD authorization:
    select * from dba_epg_dad_authorization;

    if no rows are returned use this:

    exec dbms_epg.authorize_dad('APEX', 'ANONYMOUS');
    commit;
  6. set the SHARED_SERVERS environment:
    
    
    ALTER SYSTEM SET SHARED_SERVERS=5 SCOPE BOTH;
  7. execute this
    SET SERVEROUTPUT ON;
    DECLARE
         l_configxml XMLTYPE;
         l_value VARCHAR2(5) := 'true'; -- (true/false)
         BEGIN
           l_configxml := DBMS_XDB.cfg_get();
           IF l_configxml.existsNode('/xdbconfig/sysconfig/protocolconfig/httpconfig/allow-repository-anonymous-access') = 0
           THEN
             -- Add missing element.
             SELECT insertChildXML(l_configxml, '/xdbconfig/sysconfig/protocolconfig/httpconfig', 'allow-repository-anonymous-access', XMLType('' || l_value || ''), 'xmlns="http://xmlns.oracle.com/xdb/xdbconfig.xsd"')
             INTO l_configxml
             FROM dual;
    
             DBMS_OUTPUT.put_line('Element inserted.');
           ELSE
             -- Update existing element.
             SELECT updateXML(DBMS_XDB.cfg_get(), '/xdbconfig/sysconfig/protocolconfig/httpconfig/allow-repository-anonymous-access/text()', l_value, 'xmlns="http://xmlns.oracle.com/xdb/xdbconfig.xsd"')
             INTO l_configxml
             FROM dual;
    
             DBMS_OUTPUT.put_line('Element updated.');
    
           END IF;
         DBMS_XDB.cfg_update(l_configxml);
         DBMS_XDB.cfg_refresh;
    END;
    /
  8. Find the HTTP port on which the EPG is running:
    
    
    SELECT DBMS_XDB.GETHTTPPORT FROM DUAL;

    you can change it using:

    
    
    exec DBMS_XDB.SETHTTPPORT(portnumber of your choice);
  9. 
    
    shutdown;
  10. 
    
    startup;
  11. start your browser and open the apex page.

I hope this helps, but be aware EPG on 10g is not supported by Oracle.

 

Leave a Comment