Multiple RPD & Multiple Presentation service instance on single BI Server

The objective of the thread is to understand the process of configuring multiple RPD and Presentation service in same BI server instance .Once that will be understood it can be further extended in scalable solution to integrate the approach on multiple server based instance as per business demands .The OBIEE suite documentation mentioned this functionality could be achieved but never mentioned the detail steps how to achieve this .
The initial bit could be found at below URL of Mark Rittman though not in detail :
My goal in this thread is to clearly define the entire process however multiple Presentation Services instances on a machine is “NOT SUPPORTED BY ORACLE” .
The effective use of this approach will support multiple RPD editing online and also modifying multiple BI catalog online through two different instance .Also this would facilitate the running of failover instance in real life production environment .Apart from that customer could also ask for hosting two different (dev and test) instance(environments) in single host . 
Now lets assume that the two RPD i.e deba.rpd & test.rpd and there respective two catalogs both working properly while loaded individually and working independently .
Configuring the NQSCONFIG
Lets configure the NQSCONFIG.ini file as below :
[ REPOSITORY ]
RPD1  =       deba.rpd , DEFAULT;
RPD2    =     test.rpd ;
Configuring the DSN
Create 2 Oracle BI Server System DSN i.e DSN1 to point to default repository deba.rpd and DSN2 to point to test.rpd . Since we are configuring two RPD in parallel to single BI server instance hence  for both DSN we point to server Local with default Port 9703 . The 9703 port is ODBC communication port between BI Server and Presentation Services .
Multiple RPD and Presentation Instance-1Multiple RPD and Presentation Instance-2





N.B : whatever repository will be put under change Default repository section will be override by the DEFAULT settings in NQSCONFIG.ini .You can tick “Connect to Oracle BI Server to obtain default settings” ,so that RPD connection will be established as per the definition in .ini file after BI server restart .
Configuring the Catalog and instanceconfig.xml
For both deba.rpd and test.rpd we have catalog file under ../$OracleBIDataHome/web/catalog/” as “deba” and “test” having different sets of reports in each of them to distinguish properly.So lets make catalog “deba” online after making the below changes in instanceconfig.xml .
<WebConfig>
<ServerInstance>
   <DSN>DSN1</DSN>
   <CatalogPath>D:/OracleBIData/web/catalog/deba</CatalogPath>
Restart the services and log into catalog for “deba” and you can verify that the query running on deba.rpd and your dashboard display the reports relevant for catalog “deba” .Verify that from NQServer.log file .
Edit the xml and make the similar type of change to point to DSN2 and catalog “test” .It should work as well pointing to repo “test” .
Now till this point single BI server hosted two repository and you since the two repo available online hence you can easily make the online modification just by selecting the DSN from Admintool in online mode .
Deploying a new Presentation Service instance
As we know that there must be something different to distinguish two Web server instance . The typical URL is : http://localhost:9704/analytics where “analytics” is the context root and deployable J2EE module .My aim to create another context root by deploying a new instance of the analytics application which can be done by the Enterprise Manager as (http://localhost:9704/em). Typical default userid is “oc4jadmin” .
Lets follow the steps below to deploy the module “analytics.ear” from ..\$OracleBIHome\oc4j_bi\j2ee\home\applications .
Multiple RPD and Presentation Instance-3Multiple RPD and Presentation Instance-4





Multiple RPD and Presentation Instance-5
 Multiple RPD and Presentation Instance-6




Duplicating instanceconfig.xml for Presentation services
The second presentation service should use its own catalog i.e “test” and connect to the repo “test.rpd” while first presentation service would use “deba” .Hence there must be two separate xml web config file to point to different catalog .Duplicate the instanceconfig.xml file and create two xml as instanceconfig_deba.xml , instanceconfig_test.xml .
instanceconfig_test.xml
<WebConfig>  
<ServerInstance>
<Listener port=”9712″/>
<DSN>DSN2</DSN>
<CatalogPath>../$ORACLEBIDATAHOME/web/catalog/test</CatalogPath> 
instanceconfig_deba.xml
<WebConfig>  
<ServerInstance>
<DSN>DSN1</DSN>
<CatalogPath>../$ORACLEBIDATAHOME/web/catalog/deba</CatalogPath> 
Replace $ORACLEBIDATAHOME as per your env settings .
Configuring Presentation service communication channel for OC4J
Context root “analytics” can be communicated by OC4J using the default settings as per web.xml under “..\OracleBIHOME\oc4j_bi\j2ee\home\applications\analytics\analytics\WEB-INF” via default port 9710  .
But to communicate with context root “analytics_deba” I need to change the web.xml file under “..\OracleBIHOME\oc4j_bi\j2ee\home\applications\analytics_deba\analytics\WEB-INF” via default port 9712  .
Search for oracle.bi.presentation.sawserver.port and change the param-value into 9712.
Multiple RPD and Presentation Instance-7






After creating the new configuration files we have to re-start the BI Server , BI Presentation services. Please restart the OC4J instance also .
Running two presentation service parallelly
To start the new presentation services I create two batch file with below target shortcuts .
sawserver.exe -c $ORACLEBIDATAHOME\web\config\instanceconfig_test.xml
sawserver.exe -c $ORACLEBIDATAHOME\web\config\instanceconfig_deba.xml
First stop all service and then start BI and OC4J service and after that invoke the above two scripts .So the presentation services will be started and you can login and type the following URL  in your web browser:
http://server_name:9704/analytics
http://server_name:9704/analytics_deba
So presentation service application/context-root  ”analytics” will refer to one repository file “deba.rpd”  and “analytics_deba” will refer to “test.rpd” but you now have the ability to create different reports, dashboards etc via different presentation services using single BI server env/resource .
N.B : You can define multiple catalog path in one instanceconfig.xml but only one will be active at a time and that will be the one which defined first .Hence the idea is to create multiple instanceconfig to access multiple catalog .