Contact Us

Installation instruction

EMLight works with Oracle RDBMS version 10g (XE, SE, EE) or higher.
Web browsers supported: Chrome, Firefox, Safari, Opera.

Basicaly installation of EMLight consist of three simple steps:

SQL*Plus is the only tool required for installation.

Preinstallation tasks:
- Download EMLight archive file
- Extract archive into any directory
- Change current directory to EMLight

Installation

  1. Edit file credentials.sql
    You must specify TNS Alias of target database there.
    Also you can change schema name (EMLIGHT by default), password and default tablespace (USERS).
  2. Create Oracle user EMLIGHT:
    sqlplus "sys/<sys_password>@alias as sysdba" @install_1.sql
    You can review list of required system privileges granted to user EMLIGHT in file: create/grants.sql
    That privileges does not allow EMLIGHT user to read any data from other database schemas and does not allow it to change anything in database outside of EMLIGHT schema.
  3. Create EMLIGHT objects (tables and packages):
    sqlplus /nolog @install_2.sql
    Note: it will connect to Oracle Server with credentials specified in file credentials.sql on first step.
  4. Configure Database Access Descriptor (DAD).

    DAD can be configured in two ways:
    - Using Embedded PL/SQL Gateway
    - Using Oracle HTTP Server and mod_plsql

    For details read:
    Oracle® Database Advanced Application Developer's Guide -> Using Embedded PL/SQL Gateway
    Oracle® HTTP Server mod_plsql User's Guide

    • Configuring Embedded PL/SQL Gateway

      1. Connect to Oracle Server as SYS user and execute:
        declare
            l_user         varchar2(30) := 'EMLIGHT';	-- EMLIGHT oracle user name
            l_dad          varchar2(30) := 'eml';	-- DAD name
            l_path         varchar2(30) := '/'||l_dad||'/*';
        begin
            --  dbms_epg.drop_dad  (   l_dad);
        
            dbms_epg.create_dad(       l_dad, l_path);
            dbms_epg.set_dad_attribute(l_dad,'database-username', 	l_user);
            dbms_epg.set_dad_attribute(l_dad,'authentication-mode',	'Basic');
            dbms_epg.set_dad_attribute(l_dad,'default-page',		'vp$.status');
            dbms_epg.set_dad_attribute(l_dad,'document-table-name',	'vp_document_table');
            dbms_epg.set_dad_attribute(l_dad,'document-path',		'docs');
            dbms_epg.set_dad_attribute(l_dad,'document-procedure',	'vp$.download_file');
            dbms_epg.set_dad_attribute(l_dad,'path-alias',		'go');
            dbms_epg.set_dad_attribute(l_dad,'path-alias-procedure',	'vp$.go');
            dbms_epg.set_dad_attribute(l_dad,'nls-language',		'american_america.al32utf8');
            dbms_epg.set_dad_attribute(l_dad,'error-style',		'DebugStyle');
            
        -- If you don't want to be asked for login every time you access -- the application, uncomment the following line. This causes EPG -- to bypass authentication and allows unrestricted access to the -- application to anyone (anonymous access.) -- dbms_epg.authorize_dad(l_dad, l_user);
        commit; end;
      2. Set Oracle HTTP Port number (8080 or other):
        begin DBMS_XDB.SETHTTPPORT(8080); end; 
      3. Unlock ANONYMOUS account:
        ALTER USER ANONYMOUS ACCOUNT UNLOCK;

    • Configuring Oracle HTTP Server and mod_plsql

      1. Edit file $ORACLE_HTTP_HOME/Apache/modplsql/conf/dads.conf.
        Add follow DAD description to the file:
        <Location /eml>
          SetHandler pls_handler        
          Order deny,allow
          Allow from all
          AllowOverride None
          PlsqlDatabaseUsername         emlight
          PlsqlDatabasePassword         emlight
          PlsqlDatabaseConnectString    <HOST_NAME>:1521:<ORACLE_SID>
          PlsqlAuthenticationMode       Basic
          PlsqlDefaultPage              vp$.status
          PlsqlDocumentTablename        vp_document_table
          PlsqlDocumentPath             docs
          PlsqlDocumentProcedure        vp$.download_file
          PlsqlPathAlias                go
          PlsqlPathAliasProcedure       vp$.go
          PlsqlErrorStyle               DebugStyle
          PlsqlNLSLanguage              AMERICAN_AMERICA.UTF8
        </Location> 
        Change HOST_NAME and ORACLE_SID to point to your target database where EMLIGHT is installed.
      2. Restart Oracle HTTP Server:
        $ $ORACLE_HTTP_HOME/opmn/bin/opmnctl restartproc ias-component=HTTP_Server
        or
        $ $ORACLE_HTTP_HOME/opmn/bin/opmnctl stopall
        $ $ORACLE_HTTP_HOME/opmn/bin/opmnctl startall
        

  5. Open your web browser and enter follow URL in address line:
    http://<host_name>:8080/eml/go/home
    
    Where <host_name> is hostname of your target database (if you use Embedded PL/SQL Gateway) or your Oracle HTTP Server.

De-installation of EMLight

  1. Connect as SYS and drop EMLIGHT user:
    DROP USER EMLIGHT CASCADE;
  2. Remove DAD:

    • When using Embedded PL/SQL Gateway:
      declare
          l_dad   varchar2(30) := 'eml';	-- DAD name
      begin
          dbms_epg.drop_dad( l_dad );
      end; 
    • When using Oracle HTTP Server and mod_plsql:
      Edit file $ORACLE_HTTP_HOME/Apache/modplsql/conf/dads.conf and remove EMLIGHT DAD description.
      Restart Oracle HTTP Server.