Showing posts with label OBI EE Tutorials. Show all posts
Showing posts with label OBI EE Tutorials. Show all posts

Friday, 4 May 2012

OBI EE 10g / 11g - Tutorials - Section 02 - Repository File (RPD) - Physical Layer

Oracle Business Intelligence is a metadata driven BI tool and the main backbone of this tool is called Repository file that commonly known as RPD. The RPD file is clearly devided into three main layers based on the usage and design. They are -
  1. Physical Layer
  2. Business Model and Mapping Layer
  3. Presentation Layer
In this section we will descuss the details of the Physical Layer objects and help you to understand their usage.

Database :



The first object that comes in the physical layer is the Database. In OBI EE this Database object reflects an abstruct database instance and you can change its properties to fit this absturct instance to a specific database instance like Oracle Database, DB2 or SQL Server.



This can be changed using the database source defination from the general property tab. In most cases if you are importing the tables using the import utilities, this Database instance will be created automatically with all the proper values. But in some cases you may have to build it by yourself, in those times make sure you have selected the database source defination properly. The database features strongly depends on the database you selected. Wrong selection can lead to improper query and poor runtime performance.

Persist Connection Pool is needed in some CRM databases where the database itself can not meet the requirement of the query. In that case an intermediate table is created in the database to hold some information that can be used to meet the query requirement. Not generally used.

Allow Populate Query is a mechanism that stores some result (known as POPULATE SQL) in the database. Not generally used.

Direct Database Request is a mechanism to allow end users to directly fire physical sqls against the physical data sources. If not used properly it can cause security issues. Not generally used.

Connection Pool :

After Database instance the next element that comes is call a Connection Pool. A connection pool as the name suggests is a pool of prebuild connections that will be reused for different query requests. We define the TNS NAMES (for Oracle Database) in this section. We also provide the user credentials as well as some pooling relared parameters like timeout period etc.


Name : Any logical name to identify the connection pool.

Call Interface : The approach through which the database will be connected. For most database if the native call interface (like OCI in case of Oralce) is available, use that one for better performance. If it is not available use the ODBC datasource.

Maximum Connection : OBI EE creates a set of connection during start up and use those connections in the pool. But that initial number of connections can not be sufficient to handle the pick load. In that case OBI EE will create new connections and add them to the connection pool set. This parameters limits the number of the maximum number of connections that can be creates in a pool. In case of production system the number of connection pool can be determined using this rule (Avg Number of Requests Per Dashboard X Avg Number of Concurrent Users) X 10%. The maximum number of connection allowed from a repository is 800.

Fully Qualified Table Name : This ensures that all the table name when added to the SQL automatically prefixed with the Schema name. Use only when you are building models involving more than one database schemas.

Shared Logon : Same log on will be used for all the users. If you are using different credentials for different users then this should be unchecked.

Connection Pooling : Connection will be kept alive for the timeout period and will be reused for other queries.

Other parameters are not generally used. keep the default values.

Physical Layer Objects - Table, View and Alias :

The physical layer as the name prescribes hold the links for the physical database objects - Tables, Views and Aliases.

The tables can be imported directly from the database sources or it can be created manually. The easiest way is to import them from database. You can find the import option from menu File-> Import -> from database. Provide the database information and it will show you all the objects accessible using that database user. Select the set of tables, views and click ok. This will create a connection pool, a schema folder and import the selected tables.



Sometimes you may need to create SELECT statements in physical layer, thay are called Opeque Views. But use them only when you do not have any way to create database views.

The last component that comes is called Alias. Alias is very important in Oracle BI physical layer design. You should create one alias for each of the roles for a table. As Fact tables has only one role and Dimensions might have more than one role, so in a good RPD you will find many alias created on the dimension tables. They improve the design by eliminating the chance of circular joins from physical layer and provides easy to understand logs during run time.

For every Table, Opeque View and Alias, define proper primary keys and caching. If you have a table that is refreshed very often then disable the caching for that table. For other table make cache never expires and use either Event Pooling or Manual cache purging (using nqCMD) to handle the cache. You can also provide database hints for each table you import.

 

Physical LayerJoins :


Once all the required tables, views and alias are created you have to create proper joins between these objects. In physical layer the joins should be always primary key - foreign key joins. Do not use complex joins in physical layer. This will impact the performance of the application very much. You only need complex joins in physical layer if your datamodel is not proper. So if your data model needs complex joins in physical layer it is better to remodel the application than creating such joins.

Once the joining are complete check the consistancy of the model. Right click on the database schema and click the Check Consistancy on the popup menu.


Thursday, 5 April 2012

OBI EE 10g / 11g - Tutorials - Section 01 - Basic Architecture

The first thing you should do before your first OBI EE installation is to identify the basic components of OBI EE and understand the relation between them. This is generally known as the architecture of OBI EE.

Oracle BI EE has four (4) primary components -
1> Oracle BI Server
2> Oracle BI Presentation Server and Oracle BI Java Host
3> Oracle BI Scheduler
4> Oracle BI Cluster Controller 

[Note : In case of Microsoft Windows environments the second component is broken into two windows services. For the Linux and Linux like operating systems they are started from a single process.]

Along with these primary components there are some other secondary Oracle BI objects that are closely involved in the configuration of basic architecture. They are -
6> Repository File (RPD), It hold the relationship among the data in physical and business views.
7> Presentation Catalog File (Webcat). It hols the metadata about the viewing objects like a request or dashboard.
8> BI Plug-in (analytics.ear), It needs to be deployed on a web server application server to complete the total architecture.

Each of these primary components have ability to listen service-requests from its immediate client application and send response to those requests. The basic listen ports for these components are as follows :-
1> Oracle BI Server : 9703
2> Oracle BI Presentation Server : 9710
3> Oracle BI Java Host : 9810
4> Oracle BI Scheduler : 9705
5> Oracle BI Cluster Controller : 9706

[Note : All of these ports are configurable and if you want to change them for extra security they can all be changed. I will provide the location of each of these setting at the end of this section]

Now let us discuss the journey of an user request from component to componet. 

The user normally access OBI EE application using its HTTP plugin "analytics/saw.dll" deployed in either IIS or in some other JAVA based application servers. 

[ Additional Information : In case of IIS you will be creating a virtual directory name analytics which will point to your application directory at ORACLEBI_HOME/web/app. In case of default installation the ORACLEBI_HOME will be C:\OracleBI thus the full path will be C:\OracleBI\web\app. In case of a java application server like Oracle Application Server or Weblogic, you have to deploy the Enterprise Archive File (ear) or Web Archive File (war) on the oc4j or managed server instance. The default name of this archive file is analytics and this can be found under ORACLEBI_HOME/web directory.]

The analytics plugin then send the requrst to the BI Presentation service. If this is the first request from the user (i.e. login and session creation request), the Presentation Service sends the request to the Cluster Controller. Cluster Controller has the track of the lightly loaded servers and it gets a session from these server and send that reference back to the Presentation Service. Finally Presentation Service directly communicated with the BI Server to fullfill the user login request. Once the login is complete all the communication is directly happen between Presentation Service and BI Server and the Cluster Controller does not have any role on it. 

Now let us understand what happens when the use executes a report request through the analytics plugin. 
-> Same like the earlier one The plugin will route the request to the Presentation Server. 
-> The presentation server will check if the user has access to the report or not. (Defined in Webcat Folder)
-> If the access is there then the Presnetaion Service will sent the Logical SQL of the report to the BI Server. (Cache will be consulted before sending the query to BI Server)
-> BI Server will check if the user has access to the requested Logical columns or not. (Defined in RPD)
-> If access is present, it will add the filter and send the Physical SQL to the Databases. (Cache will be consulted before sending the query to Database)
-> Database then send the rows fullfilling the Physical SQL to BI Server.
-> BI Server will cache the result and send them back to Presentation Server.
-> Presentation Server will generate the reports, if chart is present in the report then Javahost and CORDA chart engine will be involved to serve the chart generation.
-> The final report with all the report components will be sent back to the user through the web plugin.

In case user needs report alert or schedule dispatch of reports, the BI Scheduler component will be involded. It will store the defination of the scheduled jobs (iBots) in the database tables and pool them time by time to execute automatically.

Once you finish reading this section try to do these things as hands on.
1> Start all OBI EE components from windows services. [If you are in linux environment the scripts to run OBI EE can be found under ORACLEBI_HOME/setup directory]

2> Run the application server where the OBI EE plugin "analytics" is deployed. The default is OC4J.

3> Check the OBI EE login page at http://localhost:9704/analytics/saw/dll?Dashboard and login to the default repository and webcat combination. Credentials are Administrator/Administrator.

4> View the logs files.
-> BI Server Log = NQServer.log under ORACLEBI_HOME/server/Log
-> Query Log = NQQuery.log under ORACLEBI_HOME/server/Log
-> Cluster Log = NQCluster.log under ORACLEBI_HOME/server/Log
-> Scheduler Log = NQScheduler.log under ORACLEBI_HOME/server/Log
-> Presentation Service Log = sawlog0.log under ORACLEBIDATA_HOME/web/log
-> Java Host = jhost0.log.N under ORACLEBIDATA_HOME/web/log/javahost
[Note N is the number of the log file]

Location of the configuration files
BI Server = ORACLEBI_HOME/server/Config/NQSConfig.INI
Presentation Service = ORACLEBIDATA_HOME/web/config/instanceconfig.xml
Cluster Controller =  ORACLEBI_HOME/server/Config/NQClusterConfig.INI
Java Host =  ORACLEBI_HOME/web/javahost/config/config.xml
BI Scheduler =  ORACLEBIDATA_HOME/scheduler/config/instanceconfig.xml
Section 02 : Physical Layer

OBI EE 10g / 11g - Tutorials - Introduction

Dear Friends,

If you notice, the google search engine will provide you hundreds of pages of information on tutorials of about any programming language or application tool. But finding a tutorial site dedicated to Oracle BI EE is very tough. I myself searched a lot but did not found any gude book like OBI EE in 10 days or OBI EE in a month. So I thought to prepare some pages totally dedicated to the teaching of OBI EE to the new comers.

Before you start the tutorial it is better if you can have some basic knowledge of database technologies and query language (formally known as SQL). In OBI EE, you do not need much programming, but understand of data structures and little bit modelling. The BI as everyone says is more of an art than science :)

I will start from the basics of the tool and try to add little and more complex things in future. You are always welcome to suggest me with information that I should add to the sections to make them more informative and useful to the new comers.

Thanking you all,
Somnath

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Section 01 : Basic Architecture 

Blog Archive