22 Feb 2012

OBIEE - How to Set a Temp Query Logging Level?

You might want to diagnose performance or data issues by setting a temporary log level for a query. You can enable query logging for a select statement by adding a prefix clause in the Advanced SQL Clauses section of the Advanced tab in Oracle BI Presentation Services.
For example, for the select statement:
SELECT a, b, c from dim1, fact 1;
You can specify the logging level of 5 in the Prefix field as follows:
Set Variable LOGLEVEL=5;
For this query, the logging level of 5 is used regardless of the value of the underlying LOGLEVEL variable.

OBIEE - What is Log File Rotation?

Log file rotation is the creation of new log files, when the file exceeds a specified threshold or date.
Take the MaximumFileSizeKb setting for the component log configuration file for the Oracle BI Scheduler as an example. Whenever a log file exceeds the size that is specified by this setting, then the existing Scheduler log file is renamed, and a new log file is created.
·                     nqscheduler.log — The latest log file.
·                     nqscheduler-<n>.log — The renamed previous log file.
where <n> = date and timestamp, 
for example nqscheduler-20100909-2135.log
Additionally, a log file date that is older than the MaximumLogAgeDay setting is deleted.

13 Feb 2012

OBIEE - Function Shipping

OBIEE Function-Shipping:

Each database has its own set of built in features and limits. The BI server always makes use of these built-in database functions as it will be more efficient to process data on database. This process is aptly called Function Shipping. In case if the required function is not supported by the data source, then the BI server performs the operations by itself.

In the BI AdminTool double-click on the physical data source to take a look at the properties associated, in the Features tab you can see the inbuilt functions available in the data source. BI Server will decide what functions to ship and what not during run time based on the settings here.




The Default settings (Check Boxes) are getting loaded from a INI file bases on the data source and connection pool settings.

The INI file, contains the default settings for database features, is in <Oracle_Instance>\config\OracleBIServerComponent\coreapplication\DBFeatures.INI

If you must modify the DBFeatures.ini file, use extreme caution because setting features that the underlying databases do not support can cause errors and unexpected results to be returned.
Regards, 
- Akash

9 Feb 2012

Outer Joins - Left, Right and Full - Practical Example

Outer Join:
An outer join does not require each record in the two joined tables to have a matching record. The joined table retains each record—even if no other matching record exists. Outer joins subdivide further into left outer joins, right outer joins, and full outer joins, depending on which table(s) one retains the rows from (left, right, or both). In this case left and right refer to the two sides of the JOIN keyword.
SQL> Select * from A;
emp_idemp_namedpt_id
1001Saran20
1002Jason20
1003Brian20
1004Paul10
1012Mary40
1007Steve30
1008Jim20
1009Mark20
1010Yihong20
1013Melanie30
1011Greathouse50
1014Jie50
1015Raj50



SQL> Select * from B;
dpt_iddpt_name
10Management
20Development
30Usability
40HR
60Sales

Left Outer Join:
This means that a left outer join returns all the values from the left table, plus matched values from the right table or NULL in case of no matching join predicate.
SQL> 
select a.EMP_ID, a.EMP_NAME, a.DPT_ID, b.Dpt_name from a 
LEFT OUTER JOIN b on a.DPT_ID = B.DPT_ID 
order by a.EMP_ID;


emp_idemp_namedpt_iddpt_name
1001Saran20Development
1002Jason20Development
1003Brian20Development
1004Paul10Management
1007Steve30Usability
1008Jim20Development
1009Mark20Development
1010Yihong20Development
1011Greathouse50Null
1012Mary40HR
1013Melanie30Usability
1014Jie50Null
1015Raj50Null

Right Outer Join:
This returns all the values from the right table and matched values from the left table or NULL in case of no matching join predicate.
SQL> 
select a.EMP_ID, a.EMP_NAME, a.DPT_ID, b.Dpt_name from a 
RIGHT OUTER JOIN b on a.DPT_ID = B.DPT_ID 
order by a.EMP_ID;


emp_idemp_namedpt_iddpt_name
1001Saran20Development
1002Jason20Development
1003Brian20Development
1004Paul10Management
1007Steve30Usability
1008Jim20Development
1009Mark20Development
1010Yihong20Development
1012Mary40HR
1013Melanie30Usability
NullNullNullSales


Full Outer Join
full outer join combines the effect of applying both left and right outer joins. Where records in the FULL OUTER JOINed tables do not match, the result set will have NULL values for every column of the table that lacks a matching row. For those records that do match, a single row will be produced in the result set.
SQL> 
select a.EMP_ID, a.EMP_NAME, a.DPT_ID, b.Dpt_name from a 
FULL OUTER JOIN b on a.DPT_ID = B.DPT_ID 
order by a.EMP_ID;

emp_idemp_namedpt_iddpt_name
1001Saran20Development
1002Jason20Development
1003Brian20Development
1004Paul10Management
1007Steve30Usability
1008Jim20Development
1009Mark20Development
1010Yihong20Development
1011Greathouse50Null
1012Mary40HR
1013Melanie30Usability
1014Jie50Null
1015Raj50Null
NullNullNullSales

Regards,
- Akash