Saturday 19 March 2016

connection failed while importing metadata in obiee 11g

There are many reasons you may get this error. One way to resolve the issue is to correct the shortcut which is placed on the desktop

Go to the Installed path of the Admin tool. 

In my case it is 

C:\Program Files\Oracle Business Intelligence Enterprise Edition Plus Client Tools\oraclebi\orahome\bifoundation\server\bin\

Find Admintool.exe and create a shortcut by using right click and paste the below value

"C:\Program Files\Oracle Business Intelligence Enterprise Edition Plus Client Tools\oraclebi\orahome\bifoundation\server\bin\bi_init.bat" coreapplication admintool.exe

Make sure that (“) didn’t miss.

Note: tnsnames.ora file should be kept in the repository folder from where you are opening the rpd. This file you can get it from Oracle database from the server under network folder.

Wednesday 16 March 2016

How to Calculate AGE between two dates in OBIEE

Age in OBIEE


First thing is you need to have two date fields to calculate age. In OBIEE we have TIMEDIFF time function to calculate difference between two dates.

Example is shown below

Timediff(SQL_TSI_YEAR, Date of birth, CURRENT_DATE)

DATE OF BIRTH column is derived from the database
CURRENT_DATE is the predefined variable to fetch sysdate.

Output of this query will give you the age.

There is a big flaw in this query because it always finds the age by differentiating year.

Below query will even consider day and month of the birth date and calculates exact age between dates.

 SELECT 

--Year
TRUNC(MONTHS_BETWEEN(SYSDATE,DOB)/12) YEAR,

--Month

trunc(mod(months_between(sysdate,dob),12)) month,

--Day
TRUNC(SYSDATE-ADD_MONTHS(DOB,TRUNC(MONTHS_BETWEEN(SYSDATE,DOB)/12)*12 +TRUNC(MOD(MONTHS_BETWEEN(SYSDATE,DOB),12)))) DAY

,

--Difference between Birth Month and Current Month
TO_NUMBER(TO_CHAR(SYSDATE,'MM'))-TO_NUMBER(TO_CHAR(DOB,'MM')) MON,


--Difference between Birth Day and Current Day
TO_NUMBER(TO_CHAR(SYSDATE,'DD'))-TO_NUMBER(TO_CHAR(DOB,'DD')) days,



--Compare the above two factors and decide which year. This query will calculate even day difference between the dates.

CASE WHEN TO_NUMBER(TO_CHAR(SYSDATE,'MM'))-TO_NUMBER(TO_CHAR(DOB,'MM'))<=0 OR 
TO_NUMBER(TO_CHAR(SYSDATE,'DD'))-TO_NUMBER(TO_CHAR(DOB,'DD'))<=0 THEN

CASE WHEN TO_NUMBER(TO_CHAR(SYSDATE,'MM'))-TO_NUMBER(TO_CHAR(DOB,'MM'))=0 then 
TRUNC(MONTHS_BETWEEN(SYSDATE,DOB)/12) -1

ELSE 

TRUNC(MONTHS_BETWEEN(SYSDATE,DOB)/12) 

END

ELSE 

CASE WHEN TO_NUMBER(TO_CHAR(SYSDATE,'MM'))-TO_NUMBER(TO_CHAR(DOB,'MM'))>0
THEN TRUNC(MONTHS_BETWEEN(SYSDATE,DOB)/12) END

end

correct_age

from (Select to_date('16042015','DDMMYYYY') dob from dual);

Tuesday 15 March 2016

Migration of BI Publisher Reports

Migrating 10g to 11g BI PUBLISHER

The Following are the below steps in-order to migrate the BI Publisher reports from 10g to 11g.Copy  the 10g reports repository and restore  it to some location in the current system where BI Publisher 11g is Installed.
  • Take a backup of the BI 11g Repository by going into the following location.
  • mv  $ORACLE_HOME/user_projects/domains/bitest_domain/config/bipublisher  bipublisher_ORG
  • Running the Upgrade wizard by going into the following location
    •   Cd  $ORACLE_HOME/Oracle_BI/bin
    • $ ./ua
    • Click on Next
    • Select  à  Upgrade Oracle BI Publisher Repository and click on next.
    • Select  à  Upgrade 10g BI Publisher Repository Directory and click on next.
    • Provide the 10g reports repository location which is copied and stored in the current system.
    • /rtmrap/bi10greports_repos/XMLP
    • Enter the destination 11g BI Publisher Repository Directory and click on next. Provide the 11g reports repository location  /rtmrap/bi_weblogic/middleware_home/user_projects/domains/bitest_domain/config/bipublisher/repository
    • Enter the weblogic Admin Server Connections details 
    • UserName       :   biweblogic
    • Password        :   biweblogic1
    • Click on Next
    • Click on Finish

    • After completing the upgrading steps restart the weblogic domain and managed server.
    • To Start the BI Core application go the following location and execute the below command.
    • Cd  $ORACLE_HOME/instance/bi_inst1/bin
    • ./opmnctl  startall
    • ./opmnctl status
    • After re-bouncing the BI domain & Managed Server. Login into the BI Publisher application and go the following location
    • Click on Administration tab
    • Select Server Configuration
    • Select Catalog Type :  Oracle BI EE Catalog
    • Specify the BI Publisher repository location
    • For ex:/rtmrap/bi_weblogic/middleware_home/user_projects/domains/bitest_domain/config/bipublisher/repository
    • Click on Upload to BI Presentation Catalog
    • Restart the BI domain, Managed Server & core application.
    • After re-bouncing the weblogic domain, login into the bi publisher application.
    • In-order to view the reports
    • Go the catalog and select the respective folder to view the reports.




Different Types of tables used in OBIA

Different type of tables used in Datawarehouse. This is important to know whoever is working on the data model. Each type of table has its own set of data.


Following are the different types of tables used in OBIA.

Aggregate tables (_A)
Contain summed (aggregated) data.
Dimension tables (_D)
Star analysis dimensions.
Delete tables (_DEL)
Tables that store IDs of the entities that were physically
deleted from the source system and should be flagged
as deleted from the data warehouse.
Note that there are two types of delete tables: _DEL
and _PE. For more information about the _PE table
type, see the following Primary extract tables (_PE)
row.
Dimension Hierarchy tables (_DH)
Tables that store the dimension's hierarchical structure.
Dimension Helper tables (_DHL)
Tables that store M:M relationships between two joining dimension tables.
Staging tables for Dimension Helper (_DHLS)
Staging tables for storing M:M relationships between two joining dimension tables.
Staging for Dimension Hierarchy (_
DHS)
Staging tables for storing the hierarchy structures of dimensions that have not been through the final extract-transform-load (ETL) transformations.
Staging tables for Dimension (_DS)
Tables used to hold dimension information that have not been through the final ETL transformations.
Fact tables (_F)
Contain the metrics being analyzed by dimensions.
Fact Staging tables (_FS)
Staging tables used to hold the metrics being analyzed by dimensions that have not been through the final ETL transformations.
Internal tables (_G, _GS, _S)
Internal tables are used primarily by ETL mappings for data transformation and controlling ETL runs.
Helper tables (_H)
Helper tables are inserted between the fact and dimension tables to support a many-to-many (M:M) relationship between fact and dimension records.
Map dimension tables (_M)
Tables that store cross-referencing mappings between the external data ID and the internal ID.
Mini dimension tables (_MD)
Include combinations of the most queried attributes of their parent dimensions. The database joins these small tables to the fact tables.
Primary extract tables (_PE)
Tables that are used to support the soft delete feature.
The table includes all the primary key columns
(integration ID column) from the source system. When a delete event happens, the full extract from the source compares the data previously extracted in the primary extract table to determine if a physical deletion was done in the Siebel application. The soft delete feature is disabled by default. Therefore, the primary extract tables are not populated until you enable the soft delete feature.
Persisted staging tables (_PS)
Tables that source multiple data extracts from the same
source table.
These tables perform some common transformations
required by multiple target objects. They also simplify the source object to a form that is consumable by the warehouse needed for multiple target objects. These tables are never truncated during the life of the data warehouse. These are truncated only during full load, and therefore, persist the data throughout.
Pre-staging temporary table (_TMP)
Source-specific tables used as part of the ETL processes to conform the data to fit the universal staging tables (table types _DS and _FS). These tables contain intermediate results that are created as part of the conforming process.
Staging tables for Usage Accelerator (_WS)
Tables containing the necessary columns for the ETL transformations.

Sunday 13 March 2016

Unable to Login in to OBIEE 11g

  • Check whether all the services are up or not.
  • Most of the times cluster server will not be up due to which you may see this issue.
  • If you are using Windows Environment then try configuring loop back adapter.
  • If you are using Windows Environment in Laptop then make sure that before you start the servers wifi is switched of. This is mandatory step because host will be conflicted in case of wifi.
  • Check in the logs what are the errors it is throwing.
  • Most of the errors will be related to Networking such as Host, Wifi, Environment Variables, Improper shutdown.

If you see any errors in the log file kindly send to me. I will try to help you regarding this.

Unresolved Column in OBIEE 11g

Many of you might have notices this error during their Initial developments. This is one of the many common mistakes we might done during the import.


Odbc driver returned an error (SQLExecDirectW).

A general error has occurred. [nQSError: 27005] Unresolved column:

Primary check what you have to do is to check whether this column is present in your Database or not.



  • Open the RPD.
  • Right click on the column.
  • Select view data.
  • If you see that ODBC error here then it would not be present in the database.
  • Check the column name again in the database and correct it.


Saturday 12 March 2016

OBIEE Checklist Document

Checklist document is used to validate all the development work that you have done in OBIEE.

This is one of the important document which will let the business know that we have completed and validated all the development.

You can download this file from the below link

http://downloads.ziddu.com/download/25275530/OBIEE_Checklist_Document.rtf.html


Forward me if you have any other versions of the same.

OBIEE LLD - Low Level Design


  1. Scope of the project
  2. Data source system structure which includes all columns and its details
  3. Repository details (Physical layer details, tables and join between tables, BMM Layer details and Presentation Layer Details) and variables and user group details
  4. Report Details
  5. Users and Security details

OBIEE HLD - High Level Design

1. scope of the project
2. Source database design
3. High level warehouse design ( Star schema /snowflake schema) structure
4. Fact tables and Dimension tables and relation between the tables
4. Oracle BI Distributed architecture
5. Authorization and Authentication Details (User and group)
6. Standard Guidelines

How to set Cache Settings in OBIEE 11g

Enabling Cache:
  1. Go to Fusion Middleware Control and log in as weblogic.
  2. In the left pane, expand Business Intelligence
  3. Click coreapplication.
  4. Click Capacity Management.
  5. Click the Performance tab.
  6. Click Lock and Edit Configuration.
  7. Select Cache Enabled.
  8. Click Apply to activate the changes.
  9. Click Activate Changes.
  10. Restart Oracle BI components to apply recent changes.

Modifying Cache Parameters:

Use Fusion Middleware Control to set query cache parameters. You can use Fusion
Middleware Control to set the maximum number of cache entries in the query cache, as
well as the maximum size for a single cache entry.
  1. Return to Fusion Middleware Control, which should still be open. If it is not open, enter the http://localhost:7001/em and log in to Fusion Middleware Control as weblogic with password welcome1.
  2. In the left pane, expand Business Intelligence.
  3. Click coreapplication.
  4. Click Capacity Management.
  5. Click the Performance tab.
  6. Click Lock and Edit Configuration.
  7. Change Maximum cache entries from 1000 to 10000.
  8. Apply and activate your changes.
  9. Leave Fusion Middleware Control open, but do not restart to apply recent changes at this time.
Modifying Cache Parameters Manually

Use NQSConfig.ini to view and manually edit additional query cache parameters.
  1. Navigate to D:\bi\instances\instance1\config\OracleBIServerComponent\coreapplication_obis1.
  2. Before making changes to NQSConfig.ini, make a copy of the file and paste it in the same directory.
  3. Open NQSConfig.ini.
  4. Navigate to the CACHE section.
  5. Make the following modifications:
  6. Modify the MAX_ROWS_PER_CACHE_ENTRY parameter as follows: MAX_ROWS_PER_CACHE_ENTRY = 50000
This parameter controls the maximum number of rows for any cache entry. Limiting the
number of rows is a useful way to avoid using up the cache space with runaway
queries that return large numbers of rows. If the number of rows a query returns is
greater than the value specified in the MAX_ROWS_PER_CACHE_ENTRY parameter,
the query is not cached.

Notice the DATA_STORAGE_PATH parameter. This parameter specifies one or more
directories for query cache storage, and the maximum size for each storage directory.
These directories are used to store the cached query results and are accessed when a
cache hit occurs.

Notice that the MAX_CACHE_ENTRIES parameter is changed to 10000. Changes
made to cache configuration in Fusion Middleware Control are written to this file.
       7. Save and close NQSConfig.INI.
       8. Return to Fusion Middleware Control and restart Oracle BI components.

How to set Logging Level to user in OBIEE


  1. Set logging levels for users to allow you to track queries in query logs.
    • Select Manage > Identity to open Identity Manager.
    • In the left pane, select Identity Management > BI Repository.
    • Select Action > Set Online User Filter.
    • Enter an asterisk in the field and click OK to retrieve users.
    • In the right pane, double-click on the User to open the User properties dialogue box.
    • Set the logging level to 2 and click OK.
    • Save the repository.


Best Practices in OBIEE BMM Layer


  1. Use the Business Names in the Logical Layer itself. This will reduce the rework in the presentation layer.
  2. Use the Set Icon feature to easily distinguish the Development Areas or functional areas.
  3. Remove ETL unused fields in the BMM Layer Only.
  4. Use rename wizard to rename all the columns and tables

Best Practices in OBIEE Physical Layer


  1. Use alias for every Dimensional Warehouse tables.
  2. Set Connection Pool Maximum Connections to 10. Increasing the number of connections will increase the multiple connections to database so Increase it as per the recommendations by DBA. More connections will result multiple idle sessions which will in turn decrease the performance.
  3. Set the appropriate Database Features in the Connection Pool Properties. Sometimes you will encounter the errors related to database features. Align with DBA to find actual features.
  4. Turn of cache for the tables which dont require cacheing.
  5. Use alias tables to remove Circular Joins.
  6. Check for the Data Types for each columns.

OBIEE Interview Questions


  1. What is an Alias? An alias is a reference to the existing table off the data warehouse in the physical layer OBIEE
  2. What are the uses of Alias? which can be used for user defined names in the physical layer which will help us in removing circular joins another use  is we can maintain user defined names for the actual tables
  3. What is the difference between Alias and Presentation Alias? physical  alias will be used in the physical layer which will be used in the physical layer. Presentation alias is a reference to the older name of the previous logical column name or presentation name.
  4. How to use Complex Join in Physical Layer?.  Drag arrow from first table to second and use fx button to write join condition using between operator.
  5. Is it possible to use Outer Join in Physical Layer? No
  6. What is LTS? LTS stands for Logical Table Source. It contains there refetence to physical layer objects.
  7. How to give left outer join between two tables in obiee? In the BMM Layer, double click on the join and select the type of the join.
  8. What are level bases matrices? Matrices which are calculated at the dimensional hierarchy level. Ex: Yearly Sales
  9. What is fact less fact? Fact which doesn't have any measurable fields such dollars, amount etc..it will contain only the foreign keys of the dimensions.
  10. What is an implicit fact? ImImplicit fact is used to tell the server to refer default fact when attributes from dimensions are referred.

OBIEE Supplier Dump for Practice

You can use the below links to download OBIEE Supplier Schema which you can use for practicing any of the Datawarehouse reporting

Link to download Supplier Schema


There are two files .dmp file which contains tables and columns with related data. another one for creating user schema.

BI Publisher Reports not found in OBIEE Catalog

There could be two problems which will cause this Issue

1. Reports may not be present in Shared Folder.

  • Go to the respective path of the shared folder where the reports should be present.
  • If you see that there are no reports then this will be because of GUIDs.
  • To Resolve it you just need to refresh the GUIDs so that you will able to see the reports.

To Update GUIDs, Modify the configuration in the NQSconfig.ini


  • FMW_UPDATE_ROLE_AND_USER_REF_GUIDS=YES

Make sure that it is set as NO after you restart the system with YES

2. The user may not have the proper privileges to view the report.

  • Just check the Security Properties on the BI Publisher Folders with Administrator User.
  • Change the roles assigned to it with respective roles.

Hope the above resolution will fix the Issue.