rem WARNING WARNING WARNING rem WARNING: Support for multiple databases in a single OWB home is not covered by the Oracle Database license. It requires a separate license for ODI-EE. In order to ensure compliance you should verify you have the relevant licenses prior to using this feature. rem WARNING WARNING WARNING rem rem DESCRIPTION rem This script is designed to help configure OWB when multiple database instances are running from the same Oracle Home configuration where OWB is installed. rem After running the script, the runtime logs and runtime property files (Runtime|rtrepos.properties) will be placed under different directories each for one database instance. rem Check bug 11687172 for more details. rem rem USAGE rem 1) Stop the Control Center Service if it is running, e.g. rem $ cd /owb/rtp/sql rem $ sqlplus OWBSYS/ rem $ > @stop_service rem make sure control center service is stopped rem 2) Log on as "OWBSYS" in SQL*Plus rem 3) For each database instance, run this script and provide a unique name as the parameter, such as rem @/owb/rtp/sql/setup_rt_for_multi_instances.sql rem After running this script, you will notice that in / owb/bin/admin and in owb/log, sub directories with the given name are created. rem 4) restart control center service, e.g. rem $ cd /owb/rtp/sql rem $ sqlplus OWBSYS/ rem $ > @start_service rem rem NOTE rem 1) This is only needed if multiple instances or RAC clusters are running from the same Oracle home! rem 2) java_admin priv should be assigned to OWBSYS, this is done in cat_owb.sql already; grant it manually if not. rem PROMPT WARNING: Support for multiple databases in a single OWB home is not covered by the Oracle Database license. It requires a separate license for ODI-EE. In order to ensure compliance you should verify you have the relevant licenses prior to using this feature. PROMPT set serveroutput on create or replace package owbsys.wb_rt_switch_to_subdir as procedure switch_to_subdir (home in varchar2, subDir in varchar2); function get_runtime_home return varchar2; end wb_rt_switch_to_subdir; / create or replace package body owbsys.wb_rt_switch_to_subdir as procedure switch_to_subdir (home in varchar2, subDir in varchar2) as language java name 'oracle.wh.runtime.server.Util.switchToSubDir(java.lang.String, java.lang.String)'; function get_runtime_home return varchar2 as language java name 'oracle.wh.runtime.server.Util.getRuntimeHome() return java.lang.String'; end wb_rt_switch_to_subdir; / declare home varchar2(100); unix_home varchar2(100); sub_dir varchar2(20) := '&1.'; begin dbms_java.set_output(4000); --enable to display the java output --retrieve the runtime home home := owbsys.wb_rt_switch_to_subdir.get_runtime_home(); unix_home := replace(home, '\', '/'); ---grant java permission to those files - this should be done within the script dbms_java.grant_permission('OWBSYS','java.io.FilePermission', unix_home||'/owb/bin/admin/Runtime.properties','read,write'); dbms_java.grant_permission('OWBSYS','java.io.FilePermission', unix_home||'/owb/bin/admin/rtrepos.properties','read,write'); dbms_java.grant_permission('OWBSYS','java.io.FilePermission', unix_home||'/owb/bin/admin/'||sub_dir,'read,write'); dbms_java.grant_permission('OWBSYS','java.io.FilePermission', unix_home||'/owb/bin/admin/'||sub_dir||'/Runtime.properties','read,write'); dbms_java.grant_permission('OWBSYS','java.io.FilePermission', unix_home||'/owb/bin/admin/'||sub_dir||'/rtrepos.properties','read,write'); --switch to sub dir owbsys.wb_rt_switch_to_subdir.switch_to_subdir(home, sub_dir); end; /