By Buddel
I’m currently working for a customer that is using OWB 10.2.0.1 and a 10.2.0.4 database. All on Windows. Not the best environment in my humble opinion, but hey, it is a customer. They can decide that.
We were having some problems with OWB that have been solved in OWB 10.2.0.4 but also in 11.1.0.6. In other words, we had to do some migration. Because Oracle 11g is the way to go (there were more business-like terms used to persuade the business to accept this decision of course), we decided to skip OWB 10.2.0.4 and start using OWB 11.1.0.6. The DBA’s were not ready to start using database 11g so we also decided to stay on 10.2.0.4 with the database. This means you have to do some extra steps in your database to get OWB 11 running. Perfectly documented in this part of the administration guide for OWB. Worked like a charm.
The difficulties came later on. We have an architecture that looks very much like the Split Repositories Implementation in the same manual. In the said architecture there is only one control center service running, according to the manual. And it is running against the run-time environment. If I tried that I could not deploy from my design repository to my run-time environment and if I stopped the control center service against the run-time environment I could not run any mappings.
So why not start two control center services? One in the design environment and one in the run-time environment. I tried that, but I ran into some obscure java errors that said ‘a file could not be opened because it is in use by another program’. Just that: a file. Not a name, not a directory, just a file. Period. Time to go file hunting.
I imagined it to be a log file of OWB that was opened by the control center service. Both services were using the same OWB_HOME so I went looking there. In /owb/admin/log where 2 files clearly related to the control center service. One was a log file (OWBSYS.LOG) that I traced to a setting in the run time parameters table of the repository owner. The table is owned by owbsys and is called wb_rt_platformproperties. Look for a property_path with value “property.RuntimePlatform.0.messages” and “property.RuntimePlatform.0.errors”. They both have the default property_value “%RTHOME%owblogOWBSYS.log”. I changed these parameters so both control center services would use a different log file. Indeed they did if I started one service, stopped it, started the other service. But if I started both services I still got the ‘file already in use’ message. I left the setting for the parameter because I like to get different log files for different services and went hunting further.
The next log file is created when starting the service with owbbinwin32run_service.bat (or the shortcut to it in the programs menu -> Oracle -> Warehouse Builder -> Administration -> Start Control Center Service). In this bat-file the output of the bat-file itself is sent to a log file using redirection (the >run_service.log at the end of the command). I first started one control center service then changed the bat-file so it would log to a different file and then started the second control center service. And lo and behold, I got me two running control center services.
Eureka!
I then had to do some fiddling to the bat-file because I did not want to change the log file every time I had to start the services. In Unix or Linux this is easy. You just add `date “+%Y%d%m_%H%M%S”` to the name of the file and you get an unique file name every time you start. On Windows this is not so easy. I googled around a bit and found some rather complex bat-files that seemed to work if I started them from the command line but worked differently when using the shortcut. It can probably be solved by someone more savvy than me in the wonders of cmd bat files but I decided to take the easy way out. I used the following bat file to find the number of log files that where already present. Add 1 to that count and append the file name with the resulting count. Now my control center services start every time! Even with split repositories.
This is how the bat file now looks (changed parts in bold and italic, you probably have to scroll a bit to see all changes):
@echo off set STARTUP_TYPE=%1 shift set NODEID=%1 shift set RTHOME=%1 shift set RTUSER=%1 shift set HOST=%1 shift set PORT=%1 shift set SERVICE=%1 shift pushd %RTHOME%owbbinwin32 set JVM_OPTIONS=-Xmx768M set JAVAPATH=%RTHOME%jdk set OWB_HOME=%RTHOME% set JDK_HOME=%JAVAPATH% set ORA_HOME=%RTHOME% set OEM_HOME=%RTHOME% set IAS_HOME=%RTHOME% set ORACLE_HOME=%RTHOME% set PATH=%RTHOME%bin;%JAVAPATH%jrebinclient;%JAVAPATH%jrebin;%RTHOME%owbbinadminrem if exist ......owblibintrtpplatform.jar goto check_common rem echo cannot find rtpplatform.jar, exiting rem goto exitrem :check_common rem if exist ......owblibintrtpcommon.jar goto run_service rem echo cannot find rtpcommon.jar, exiting rem goto exit rem :run_service :: aanpassing om control center service voor 2 db's op dezelfde machine te laten lopen set tel=0 for /f "tokens=*" %%a in ('dir %RTHOME%owblogrun_service*.log /B/A-D') do set /a tel+=1 set /a tel+=1 SET RUNSRVCLOG=%RTHOME%owblogrun_service_%tel%.log %JAVAPATH%jrebinjavaw.exe %JVM_OPTIONS% -DORACLE_HOME="%RTHOME%" -DOCM_HOME="%RTHOME%" -DOCM_ORACLE_HOME="%RTHOME%" -classpath %RTHOME%owbbinadmin;%RTHOME%owbbinadminlauncher.jar -DOWB_HOME=%OWB_HOME% -DJDK_HOME=%JDK_HOME% -DORA_HOME=%ORA_HOME% -DOEM_HOME=%OEM_HOME% -DIAS_HOME=%IAS_HOME% Launcher %RTHOME%owbbinadminowb.classpath oracle.wh.runtime.platform.service.Service %STARTUP_TYPE% %NODEID% %RTUSER% %HOST% %PORT% %SERVICE% > %RUNSRVCLOG% :exit popd
This is how the bat file used to look:
@echo off set STARTUP_TYPE=%1 shift set NODEID=%1 shift set RTHOME=%1 shift set RTUSER=%1 shift set HOST=%1 shift set PORT=%1 shift set SERVICE=%1 shift pushd %RTHOME%owbbinwin32 set JVM_OPTIONS=-Xmx768M set JAVAPATH=%RTHOME%jdk set OWB_HOME=%RTHOME% set JDK_HOME=%JAVAPATH% set ORA_HOME=%RTHOME% set OEM_HOME=%RTHOME% set IAS_HOME=%RTHOME% set ORACLE_HOME=%RTHOME% set PATH=%RTHOME%bin;%JAVAPATH%jrebinclient;%JAVAPATH%jrebin;%RTHOME%owbbinadminrem if exist ......owblibintrtpplatform.jar goto check_common rem echo cannot find rtpplatform.jar, exiting rem goto exitrem :check_common rem if exist ......owblibintrtpcommon.jar goto run_service rem echo cannot find rtpcommon.jar, exiting rem goto exit rem :run_service %JAVAPATH%jrebinjavaw.exe %JVM_OPTIONS% -DORACLE_HOME="%RTHOME%" -DOCM_HOME="%RTHOME%" -DOCM_ORACLE_HOME="%RTHOME%" -classpath %RTHOME%owbbinadmin;%RTHOME%owbbinadminlauncher.jar -DOWB_HOME=%OWB_HOME% -DJDK_HOME=%JDK_HOME% -DORA_HOME=%ORA_HOME% -DOEM_HOME=%OEM_HOME% -DIAS_HOME=%IAS_HOME% Launcher %RTHOME%owbbinadminowb.classpath oracle.wh.runtime.platform.service.Service %STARTUP_TYPE% %NODEID% %RTUSER% %HOST% %PORT% %SERVICE% > %RTHOME%owblogrun_service.log :exit popd
Via:: Klein Oracle Denkraam