Sunday, September 27, 2009

Multiple OBI Presentation Services on same machine - Windows

Hello Oracle BI practitioners, this is my first blog. I would be happy if I get any +ve or -ve comments.



I was searching on how to run more than one Oracle BI Presentation Service (PS) on the same box, especially on windows.

My requirement was to run / load two RPDs in same box and access, which lead me to the requirement of running multiple presentation services on same machine. I have read through few blogs and implemented the requirement. I am still looking for more information about Isapiconfig.xml, which will enable me to deploy my applications on IIS and point them to particular presentation service.



This diagram illustrates the impacted part of OBI architecture:




Below are high level steps to implement multiple presentation servers on same windows box.
  1. Deploy two applications to point to each presentation services
  2. Create two presentation services


1. Deploy applications on OC4J

When you install OBI on OC4J, it deploys application "analytics" with default configurations on OC4J.

To be safe while trying these, deploy two applications. One "OBI" and second "OBICustom".

Goto http://localhost:9704/em/ and then login to Enterprise Manager. Click on Applications tab.




Then click on Deploy button.

Choose following options.

Archive Location=%SAROOTDIR%\web\analytics.war
Select Automatically create a new deployment plan.


and then Click Next button

Give Application Name and Context Root=OBI


Click on Next button and then click on Deploy button.

It will take some time to deploy and display log

Sample Log:
[Sep 27, 2009 9:32:48 PM] Application Deployer for OBI STARTS.
[Sep 27, 2009 9:32:48 PM] Copy the archive to C:\OracleBI\oc4j_bi\j2ee\home\applications\OBI.ear
[Sep 27, 2009 9:32:49 PM] Initialize C:\OracleBI\oc4j_bi\j2ee\home\applications\OBI.ear begins...
[Sep 27, 2009 9:32:49 PM] Unpacking OBI.ear
[Sep 27, 2009 9:32:52 PM] Done unpacking OBI.ear
[Sep 27, 2009 9:32:52 PM] Unpacking analytics.war
[Sep 27, 2009 9:34:03 PM] Done unpacking analytics.war
[Sep 27, 2009 9:34:03 PM] Initialize C:\OracleBI\oc4j_bi\j2ee\home\applications\OBI.ear ends...
[Sep 27, 2009 9:34:03 PM] Starting application : OBI
[Sep 27, 2009 9:34:03 PM] Initializing ClassLoader(s)
[Sep 27, 2009 9:34:03 PM] Initializing EJB container
[Sep 27, 2009 9:34:03 PM] Loading connector(s)
[Sep 27, 2009 9:34:04 PM] Starting up resource adapters
[Sep 27, 2009 9:34:04 PM] Initializing EJB sessions
[Sep 27, 2009 9:34:04 PM] Committing ClassLoader(s)
[Sep 27, 2009 9:34:04 PM] Initialize analytics begins...
[Sep 27, 2009 9:34:04 PM] Initialize analytics ends...
[Sep 27, 2009 9:34:04 PM] Started application : OBI
[Sep 27, 2009 9:34:04 PM] Binding web application(s) to site default-web-site begins...
[Sep 27, 2009 9:34:04 PM] Binding analytics web-module for application OBI to site default-web-site under context root OBI
[Sep 27, 2009 9:34:04 PM] Binding web application(s) to site default-web-site ends...
[Sep 27, 2009 9:34:04 PM] Application Deployer for OBI COMPLETES. Operation time: 75708 msecs

Now one application is ready to be accessed. The URL will be http://localhost:9704/OBI/

Click Return

Follow the same steps as above, except give Application Name and Context Root=OBICustom
The URL for OBICustom will be http://localhost:9704/OBICustom/

Click Return

Now both application will look for a presentation service listening on port 9710. Next step is to modify OBICustom, to look for /connect to a presentation service listening on port 9712. For that, go to %SAROOTDIR%\oc4j_bi\j2ee\home\applications\OBICustom\analytics\WEB-INF\ and edit web.xml.

Now locate <param-name>oracle.bi.presentation.sawserver.Port</param-name>
and just below that <param-value>9710</param-value>

and modify port 9710 to 9712.

Goto OC4J Enterprice Manager (http://localhost:9704//em/) and click on restart button and then Yes button.

Let's move to next step.

2. Create presentation services

We will need two copies of instanceconfig.xml.

As we have OBI PS installed, which will listen on 9710; we can use the same instance for OBI application hosted on OC4J.

For second OBI PS, go to %SADATADIR%\web\config\. You will find instanceconfig.xml in the folder. Create a copy of instanceconfig.xml and name it to instanceconfig_9712.xml. Edit instanceconfig_9712.xml.

Search for the tag <ServerInstance>. Add <Listener port="9712"> just below that. You can also modify <CatalogPath> and <DSN> for second instance of Presentation Service. I kept it same, but its possible to have different catalogs and DSNs for two of the PS.


Now create service using windows sc command.

C:\Users\Diptesh>sc create OBICustomPS binPath= "%SAROOTDIR%\web\bin\sawserver.e
xe -c %SADATADIR%\web\config\instanceconfig_9712.xml /service" DisplayName= "Ora
cle BI PS"

you will get a message

[SC] CreateService SUCCESS

Open Services from Control Panel -> Administrative Tools OR by typing services.msc in Run dialog box.


Start "Oracle BI Presentation Service" and "Oracle BI PS"

Now you can access two different urls on the same maching, which are based on two different OBI PS.

To test that
stop Oracle BI Presentation Service
try to open http://localhost:9704/OBI.
You won't be able to see login screen.
Now start the service and visit the same url again. You should be able to see login screen.

Follow same steps with Oracle BI PS and url http://localhost:9704/OBICustom. This proves your implementation of two PS on the same windows.

Alternate methods to test:
1. Catalog
Create a copy of catalog (%SADATADIR%\web\catalog\samplesales)
Name it as you want and modify tag in instanceconfig_9712.xml.
Restart presenation services. Now do some catalog related changes and those will not apper in the other url.

2. DSN
See how to load multiple RPDs in one OBI server. Create one more DSN and change DSN tag in instanceconfig_9712.xml. Restart services and access two different RPDs.

If any IIS expert wants to give more detail on Isapiconfig.xml, which can help me to deploy same architecture on IIS is more than welcomed.

7 comments:

Anonymous said...

this is cool and very clear architecture.

Anonymous said...

i liked this architecture. but couldn't understand isapi question.

Diptesh said...

Hi "Anonymous",

There is an "isapiconfig.xml" in %SADATAROOT%\web\config

I wanted to create two copies of isapiconfig.xml and tell my hosted application (virtual directory) that which isapiconfig to be used.

OR

If possible, in a single copy of isapiconfig, I wanted to specify different services and ports and specify which one to be used with which hosted application.

I hope that clears your doubt.

academic said...

Excellent read. I like your style...have a good one!/Nice blog! Keep it up!
Typingservices

Steffi said...

Excellent read. I like your style...have a good one!/Nice blog! Keep it up!


Typingservice

Unknown said...

Hi,

While starting the OBI Custom ( Oracle BI PS ) service, system returns an error message saying " Windows doesn't start the Oracle BI PS on Local Computer .... and refer to service specific error code-1 "

Service specific error from system event log :

" The Oracle BI PSC service terminated with service-specific error 4294967295 (0xFFFFFFFF). "

Diptesh said...

You might be able to find something in presentation server log.

Two reasons I am aware of are:
1. Corruption of catalog.
2. Bad OBIEE installation (esp. improper uninstall and installation)