Friday, May 3, 2013

[OBIEE 11g] Multi-Source Session Variables In OBIEE11g RPD – Get Values From Multiple Sources

 




Multi-Source Session Variables in OBIEE11g RPD – Get values from multiple sources





In addition to supporting regular session variables that are populated from one data source, In 11.1.1.7.0 version, the Oracle Business Intelligence also supports session variables that can be populated from multiple data sources. 

These multi-source session variables can be used in logical queries or in repository data filters, and contain the union of values from the different data sources. There is no restriction on the number of values that the multi-source session variable can hold. To create a multi-source session variable, you first create row-wise initialization blocks for each source.



Then, you explicitly define session variables for each source. The format for the session variable names must be:


  • <ms_variable_name>____<source>



where the separator must be exactly four underscore characters.

This automatically creates a single multi-source session variable, named:

  • <ms_variable_name>



The component session variable names 
(<ms_variable_name>____<source>) appear separately in the Variable Manager in the Administration Tool, but the Expression Builder displays only the single multi-source session variable name (<ms_variable_name>).



Note:

While the main focus of this section is on the definition and usage of multi-source session variables, you may also select the VALUEOF the component session variables in logical queries and data filters.



If any of the row-wise initialization blocks returns null results, this is logged in the Oracle BI Server log, nqserver.log. Values can still be added to the multi-source session variable from other component initialization blocks that succeed in returning values. The multi-source session variable will fail only if all of the component initialization blocks return null values.



You can set execution precedence and deferred execution with multi-source session variables, similar to regular session variables.






Example to Illustrate the Creation and Usage of Multi-Source Session Variables



The following example illustrates how to create and use a multi-source session variable:


1.   In the Variable Manager in the Administration Tool, select Action > New > Session > Initialization Block.


2.   Create a row-wise initialization block called ‘Extra_products_orcl_init’ with the following SQL for Default initialization string:


               select distinct ‘MSVPRODUCTS____orcl’,PROD_NAME from extra_products



3.   Create a second row-wise initialization block called ‘SampleApp_Products_init’ with the following SQL for Default initialization string:


              select distinct ‘MSVPRODUCTS____OBI‘,”Sample App Lite Data”…”D10 Product”.”Prod_Dsc” AS “Prod_Dsc” from “Sample App Lite Data”…”D10 Product”



4.   Still in the Variable Manager, select Action > New > Session > Variable.


5.   Create a session variable called MSVPRODUCTS____orcl, making sure to include four underscores between the variable name and the source name. And select the initialization block called Extra_products_orcl_init.


6.   Create a second session variable called MSVPRODUCTS____OBI, making sure to include four underscores between the variable name and the source name. And select the initialization block called SampleApp_Products_init.



While the component session variables appear in the Variable Manager, the multi-source session variable that has been created, MSVPRODUCTS, will appear in Expression Builder.







Using the Multi-Source Session Variable in a Logical Query:


You can now use the multi-source session variable MSVPRODUCTS in a logical query.


For example:
Select “SampleApp Lite”.”D1 Products”.”Product Type”,”SampleApp Lite”.”D1 Products”.”Brand”,”SampleApp Lite”.”D1 Products”.”Product” from “SampleApp Lite”.”D1 Products” where “SampleApp Lite”.”D1 Products”.”Product”=VALUEOF(NQ_SESSION.MSVPRODUCTS)




Using the Multi-Source Session Variable in a Data Filter:


To use the multi-source session variable MSVPRODUCTS in a data filter, perform the following steps:


1.   In the Administration Tool, select Manage, then select Identity.

2.   In the Identity Manager dialog, in the tree pane, select BI Repository.

3.   In the right pane, select the Application Roles tab, then double-click the application role for which you want to set data filters.

4.   In the Application Role dialog, click Permissions.

5.   In the User/Application Role Permissions dialog, click the Data Filters tab.

6.   In the Data Filters tab, create the data filter expression:

             
”SampleApp Lite”.”D1 Products”.”Product” = VALUEOF(NQ_SESSION.MSVPRODUCTS)









Note that the Expression Builder, as shown in the image that follows, displays only the multi-source session variable MSVPRODUCTS, and not the regular session variables that were used during the creation of the multi-source session variable.




[OBIEE 11g] Change The OBIEE Repository Password From The Command Line






Change the OBI Repository Password from the Command Line




In OBIEE 11.1.1.7.0 there is new BI Server utility called obieerpdpwdchg to change the RPD password from command line.


Follow these steps to change the repository password using the obieerpdpwdchg utility, and then deploy the modified repository in Fusion Middleware Control:



1.   Run bi-init to launch a command prompt.

                    
You can find the bi-init command from

  • Client installations:  ORACLE_HOME/bifoundation/server/bin
  • All other installations: ORACLE_INSTANCE/bifoundation/OracleBIApplication/coreapplication/setup


Double-click bi-init.cmd (or bi-init.bat for client installations) to display a command prompt that is initialized to your Oracle instance.



2.    At the command prompt, type obieerpdpwdchg with the following arguments: 


o    -I name_and_path_of_existing_repository

o    -O name_and_path_of_new_repository



Then, enter the current (old) password and the new password when prompted. The repository password must be longer than five characters and cannot be empty. 

For example:

obieerpdpwdchg -I E:\SampleAppLite.rpd -O E:\New_SampleAppLite.rpd
Give password for repository: Admin123
Give password for repository: <new Password>
  





Note that passwords are masked on the command line unless you include the -C option in the command to disable masking.


3.   Open a Web browser and log in to Fusion Middleware Control from the computer where the updated repository is located.
 

4.   In the navigation tree, expand Business Intelligence and then click coreapplication to display the Business Intelligence Overview page.


5.   Display the Repository tab of the Deployment page.


6.   Click Lock and Edit Configuration.


7.   Click Browse next to Repository File. Then, select the updated repository file and click Open.


8.   Enter the new (updated) repository password in the Repository Password and the Confirm Password fields.


Make sure to specify the password that has been set in the repository. If the passwords do not match, the Oracle BI Server fails to start, and an error is logged in nqserver.log.



         9.   Click Apply, then click Activate Changes.

10. Return to the Business Intelligence Overview page and click Restart