OBIEE 11G – Error in Importing Metadata

Recently I start creating a repository (11g version) in offline mode and I want to import metadata which failed by the error ‘The connection has failed’.. I have searched for a solution and I will explain this in the next sections.

We can import some metadata from the Oracle BI Administration Tool > File > Import > from Database …  In the Import dialog box, we have to select a connection type, in my case ‘OCI 10g/11g’. Next step is to enter a Data Source Name (orcl) and a username and password from which you want to import the tables.

Import Metadata

By clicking on the ‘next’-button it troughs an error ‘The connection has failed..’ This was very weird because my Oracle DB and Listener were up-and-running. I had checked this before to make a connection via SQLdeveloper.

At this point I had to find a solution before I could go further on my repository modeling. On Oracle forums I found a nice tip which solves the problem.

The root cause can be found in the following directory:

<biee11>\instances\instance1\bifoundation\OracleBIApplication\coreapplication\setup

There you will find a file named ‘user.cmd’ respectively ‘user.sh’. When you open the .cmd file you will see that you can set a TNS_ADMIN. This was not done earlier and this causes the problem of importing metadata through the wizard.

Solution: you have to set the TNS_ADMIN to an appropriate path such as <biee11>\Oracle_BI1\network\admin. This is the location where your tnsnames.ora is stored.

Edit User Command

Afterwards, you have to save the .cmd file and try again to import some metadata in the Administration Tool.

Note: maybe you have to close the Administration Tool or restart your BI-services. For me it was sufficient to restart the Administration Tool and everything was working fine!

Important remark: when you are creating Dashboards & Answers or you are working in Online mode and you want to retrieve some data for a certain table by selecting the option ‘View Data’, you will also get the error: ‘The connection has failed..’. This problem will only occur when your tnsnames.ora is not stored in the Oracle_BI1 directory.

Oracle BI EE 11g Launch Day!

Introduction:
Oracle Business Intelligence Enterprise Edition 11g, the new, industry-leading technology platform for business intelligence, which offers:

- A powerful end-user experience with rich visualisation, search, and actionable collaboration
– Advancements in analytics, OLAP, and enterprise reporting, with unmatched performance and scalability
– Simplified system configuration, life-cycle management, and performance optimisation

A first impression of the new BI Suite:

OBIEE 11g Lauch Website on
http://tinyurl.com/3ycsko4

OBIEE 11g – New Features Overview
http://tinyurl.com/34dpp4z

OBIEE 11g – Technical Overview paper
http://tinyurl.com/3yd88l6

OBIEE 11g – New Interface Screenshots
http://tinyurl.com/34bkz9r

Unfortenately still no news on the official product launch date.

Will be continued..

Tips & Tricks in BIP

I have worked with BIP for a few months and I discover some tips & tricks around developing reports. If you develop too fast or you are unattended to some stuff, you would see some of following errors. I will give you a list where you have to be aware of.

Tips & Tricks 1:

If you create a new datasource and you type a new SQL-query, ended with a semicolon.

For example: SELECT * FROM dual ;

You will get an error message:


When you click on ‘Error Detail’, it returns: ORA-00911: invalid character.

Solution for this problem is that you remove your semicolon at the end and render your report again.

Tips & Tricks 2:

If you create a new template name without uploading a RTF-template first. This means that there is no RTF-template available under ‘layouts’. After you created a template name, you will upload your RTF-template into BIP.

In the picture below, you can see that drop-down box for ‘template’ is empty.

Overview Report:


You go back to tab ‘Layouts’ and you upload your RTF-template. Without returning to template name, you run your report and you will get following error.

Error message:

Error detail: Attribute missing in : ‘url’

Solution, you have to go back to edit your report. Go to your template name and assign your RTF-template that you have uploaded into BIP.

The reason why he gives this error is simple. You create a new template name but you didn’t assign a RTF-template to it. Because this was uploaded after you create a new template name. BIP will not automatically assign new RTF-template to your template name. That’s why you see this error. You have to do it manually.

Unless, if you first upload your RTF-template and then create a new template name. Now, he will take first RTF-template in the list and assign it to your template name. You change it if you want.

Next two tips & tricks is dependent on which version of BIP you’re working on. It seems that the problems in 10.1.3.3 were solved or better, they have a workaround to avoid these problems.

Tips & Tricks 3:

This first problem I met, is that you always need to select a ‘default data source’ if you create a LOV (List Of Values). So I will explain the situation.

When you create a parameter in BIP, it is also possible to attach an LOV to this item. The LOV can be used to choose values dependent on tables in your schema. So if you create a new LOV, you have to choose explicitly a connection data source like ‘HR’ or something else you defined by JDBC Connection in the Admin tab.

You may not select ‘Default Data Source’ as connection because this will render following error:

Error detail: Parameter name: p_dual Can not establish database connection(null)

The reason why you would see this message is because the LOV will be build before there was a default data source connection. So you have to define explicitly your data source connection in 10.1.3.2.

I noticed that the problem is fixed in 10.1.3.3 and you don’t have to select explicitly your connection but you can select it as ‘Default Data Source’.

Tips & Tricks 4:

This topic will handle about more data sources concatenated. If you create more than one data source and you want them concatenated with unique row names.

A short explanation of what I have done. I created two data sources:

  • Name of 1ste datasource = DS_1
  • Name of 2nd datasource = DS 2

Note: In second data source is no ‘underscore’ presented but a space!

I changed the option to ‘Concatenated SQL Data Source’ as Main Data Set on the Data Model Tab. And checked ‘Make row names unique’.

When you run the report, You will get an error message like this:

Error detail: ‘=’ missing in attribute.

The problem is that it is not allowed to use a space in the data source name. So you can change this one or you can obtain to uncheck ‘Make row names unique’. I always choose for the first solution. Also to avoid problems later by the creation of my RTF-template.

Note: If you use a font that is not recognized on the server (where BIP is installed), BIP will use the default font type of Helvetica.

Cross Tab in BIP

The columns of a cross-tab report are data dependent. At design-time you do not know how many columns will be reported, or what the appropriate column headings will be. Moreover, if the columns should break onto a second page, you need to be able to define the row label columns to repeat onto subsequent pages.

You can use the built-in function of Oracle BI Word Plugin to create an Cross Tab. If you want more or less functionality, you have to edit your existing cross tab. So you have to know what every tag means or how to realize.. The following example shows how to design a simple cross-tab report.

This example uses the following XML sample:


&ltROWSET&gt
&ltRESULTS&gt
&ltDEPARTMENT&gtAdministration&lt/DEPARTMENT&gt
&ltYEAR&gt2008&lt/YEAR&gt
&ltQUARTER&gtQ1&lt/QUARTER&gt
&ltSALES&gt3000&lt/SALES&gt
&lt/RESULTS&gt
&ltRESULTS&gt
&ltDEPARTMENT&gtAdministration&lt/DEPARTMENT&gt
&ltYEAR&gt2008&lt/YEAR&gt
&ltQUARTER&gtQ2&lt/QUARTER&gt
&ltSALES&gt2400&lt/SALES&gt
&lt/RESULTS&gt
&ltRESULTS&gt
&ltDEPARTMENT&gtAdministration&lt/DEPARTMENT&gt
&ltYEAR&gt2007&lt/YEAR&gt
&ltQUARTER&gtQ1&lt/QUARTER&gt
&ltSALES&gt1200&lt/SALES&gt
&lt/RESULTS&gt
&ltRESULTS&gt
&ltDEPARTMENT&gtAdministration&lt/DEPARTMENT&gt
&ltYEAR&gt2007&lt/YEAR&gt
&ltQUARTER&gtQ2&lt/QUARTER&gt
&ltSALES&gt3400&lt/SALES&gt
&lt/RESULTS&gt
&ltRESULTS&gt
&ltDEPARTMENT&gtAdministration&lt/DEPARTMENT&gt
&ltYEAR&gt2006&lt/YEAR&gt

&lt/RESULTS&gt
&ltRESULTS&gt
&ltDEPARTMENT&gtHuman Resources&lt/DEPARTMENT&gt

&lt/RESULTS&gt
&ltRESULTS&gt
&ltDEPARTMENT&gtIT&lt/DEPARTMENT&gt

&lt/RESULTS&gt
&lt/ROWSET&gt

From this XML we will generate a report that shows each department and totals the sales by year as shown in the following figure:


The template to generate this report is shown in the following figure. The form field entries are shown in the subsequent table.


The form fields in the template have the following values:


Note: only the first row uses the @column context to determine the number of columns for the table. All remaining rows need to use the @cell context to create the table cells for the column.

Additional Information:

Defining Columns to Repeat Across Pages:
If your table columns expand horizontally across more than one page, you can define how many row heading columns you want to repeat on every page. Use the following syntax to specify the number of columns to repeat:

&lt?horizontal-break-table:number?&gt

where number is the number of columns (starting from the left) to repeat.

Note that this functionality is supported for PDF output only..

Regrouping the XML Data:
The RTF template supports the XSL 2.0 for-each-group standard that allows you to regroup XML data into hierarchies that are not present in the original data. With this feature, your template does not have to follow the hierarchy of the source XML file. You are therefore no longer limited by the structure of your data source.

Using the Context Commands:
To support this requirement, BI Publisher provides a set of context commands that allow you to define the context (or placement) of the processing instructions. For example, using context commands, you can:

  • Specify an if statement in a table to refer to a cell, a row, a column or the whole table.
  • Specify a for-each loop to repeat either the current data or the complete section (to create new headers and footers and restart the page numbering).
  • Define a variable in the current loop or at the beginning of the document.

BI Publisher supports the following context types:

Checkbox in BIP

Since BI Publisher is integrated with MS Office, you can use some features of Word to add extra functionality into your reports. This topic will handle about the usage of checkboxes in your RTF-template. An example below..

We will create an checkbox which status is dependent on a value in the xml. First, we have to create a SQL-query to get our value. Next step is to design a template to add our new functionality and as finishing touch, we upload it to BI Publisher and test it out.

SQL-query:

SELECT 1 as checkbox_ind FROM dual

XML-file:


&lt?xml version="1.0" encoding="UTF-8" ?&gt
&ltROWSET&gt
&ltROW&gt
&ltCHECKBOX_IND&gt1&lt/CHECKBOX_IND&gt
&lt/ROW&gt
&lt/ROWSET&gt

RTF-template:
To add an form element into our template, we have to do first some steps to get our element.

Open MS Word 2007 and go to ‘Word Options’ under the Office-logo. There appears a new window where you can set the option for a developer tab.


Check box ‘Show Developer tab in the Ribbon’. Click ‘OK’ and you will see a new tab into your Word-page.


Follow next step to insert a new form element, in our case a checkbox:


The selected form element appears on your page. We are almost there, we have to add the BI Publisher functionality to get our checkbox work.

Select your checkbox and right click on the icon. You see now the properties of this element. You can set the default value of the checkbox. Choose ‘Add Help Text’ and specify your condition on this element.


Extra information about condition: &lt?CHECKBOX_IND=1?&gt
This consists of two element. First element, CHECKBOX_IND, is xml-tag in your xml-file. Second value is the comparising value that has to be met when returning true. If everything is done, click in both dialog boxes on ‘OK’.

At this moment, we have to prepare BI Publisher to understand our checkbox functionality. We have to add a new font. Log in to BI Publisher and go to ‘Admin’ tab.


Choose ‘Font Mappings’ by ‘Runtime Configuration’. Then ‘Add Font Mapping’.


Properties for this font:


Note: If ‘Arial Unicode MS’ –font is not available on the server. You have first to upload this into directory ../jdk/jre/lib/fonts. Restart your OC4J! Now you can select your font-type.

Last step before we upload our template is configure our reports to use this font. Go back to Admin tab and choose ‘Runtime Configuration’ -> Properties. Edit following setting under RTF-template.


Characters used for checkbox: Arial Unicode MS;9746;9744.

Note: Value 9746 stands for checked checkbox and value 9744 stands for unchecked checkbox.

All configuration is done, the final step is to upload our template into BI Publisher and run our report. You see that your checkbox is checked or unchecked dependent on your value of xml-tag ‘CHECKBOX_IND’.

Additional:
If you use the xml-tag &lt?CHECKBOX_IND=1?&gt in your template, it would return the value true or false. This can also be used if needed.

Practical examples:


 

Data templates in BIP

There is so much to talk about but what I haven’t discuss right now is extra functionality in Data Templates. Features that you can use to allow more complexity into your templates.

One of the advantages of data templates is the use of Report Triggers. These triggers will handle a specific sequence. So, the sequence of execution seems to be:

  • Before Report Trigger
  • Data Query (SQL statement)
  • After Report Trigger
  • Output Post Processor

Another thing, maybe not so important for all of you, is that you specify extra options into your data templates to debug better your report or to get more information about a report. These elements are called properties of a data template.

A data template consists of following elements:


&ltdataTemplate name="&ltname&gt" description="&ltdesc&gt"
   dataSourceRef="&ltdatasource&gt" Version="1.0"&gt
&ltproperties&gt
&ltproperty name="showControls" value="false"/&gt
&ltproperty name="online" value="true"/&gt
&ltproperty name="parameterColumns" value="3"/&gt
&ltproperty name="openLinkInNewWindow" value="true"/&gt
&lt/properties&gt
&ltparameters&gt
&lt/parameters&gt
&ltdataQuery&gt
&ltsqlStatement name="Q1"&gt
&lt![CDATA[select ID from dual]]&gt
&lt/sqlStatement&gt
&lt/dataQuery&gt
&ltdataStructure&gt
&ltgroup name="ROW" source="Q1"&gt
&ltelement name="ID" value="ID"/&gt
&lt/group&gt
&lt/dataStructure&gt
&lt/dataTemplate&gt

The default properties are present in bold. You find a list below that you can use to extend your report properties.

include_parameters – indicates whether to include parameters in the output.
Valid values:

  • True (default)
  • False

include_null_Element – indicates whether to remove or keep the null elements in the output.
Valid values:

  • True (default)
  • False

xml_tag_case – allows you to set the case for the output XML element names.
Valid values are:

  • Upper (default)
  • Lower
  • As_are (The case will follow the definition in the dataStructure section)

db_fetch_size – sets the number of rows fetched at a time through the JDBC connection. The default value is 500.

scalable_mode – sets the data engine to execute in scalable mode. This is required when processing a large volume of data.
Valid values:

  • On
  • Off (default)

include_rowsettag – allows you to include or exclude the Rowset Tag from the output.
Valid values:

  • True (default)
  • False

debug_mode – turns debug mode on or off.
Valid values:

  • On
  • Off (default)

Example of Use:
&ltproperty name=” include_parameters ” value=” false “/&gt

Oracle BI – Dashboard Prompts & BI Publisher

Situation:
One of the common questions that generally come up with regard to BI EE and BI Publisher is ‘how does one pass parameters to BI Publisher reports in Dashboards?’. One of the solution is to create a BI Publisher Report using HR-scheme as data source. Define a parameter for the BI Publisher report and then match this parameter name while assigning the presentation variable for the dashboard prompt.

Solution:
This method is generally the most used since most of the BI Publisher reports would have database as the data source.

We create a simple BI Publisher report with data coming in from HR-schema of the database.

Report-details:

  • Default Data Source: HR
  • Parameters per line: 1
  • Show Controls: unchecked

Overview BI Publisher Report:


First we will create a new data model, called DS_HR. SQL query will be:

Now add a parameter to the report. In our case, we will have ‘pDept’ as the parameter name.


Create a new RTF-template with following fields:


At least add a template to our report. Upload the template you’ve created before and create a new template name ‘TemplateHR’.


Save Report and test your BI Publisher report to be sure everything is OK.
Then go to the BI Answers and create a dashboard prompt on ‘department name’.

Note: The name of the presentation variable must exactly match that of BI Publisher parameter name.

We set default value to ‘IT’ and assign presentation variable to ‘pDept’.


Include this dashboard prompt and the BI Publisher report into the dashboards.


Final result in Oracle BI Dashboard:


When you checked ‘show controls’ in the BI Publisher report:


With this option enabled, you can choose different templates and output formats.


Oracle BI ODBC-connection [SQORAS32]


I have locally installed a 10gR2-database which I have patched to an 10.2.0.3 (Patch-nr: 5337014)

Situation:
I would create a new System Data Source Name to import tables from the HR-scheme. When we configure a new ODBC data source connection, we get following error:

SQORAS32 – An unsupported operation was attempted

SQORA32 is a dll-file that will be called if you select Oracle 10gR2 as driver to set up a data source.

Solution:
We download patch-nr 5699495 from metalink and follow the instructions below.

Part 1 – Exploding the Kit onto your system:

  • Expand the self-extracting archive file onto your hard drive.
  • Extract contents of the archive, then unzip the contents of the .zip file into a new directory.

Part 2 – Installation instructions:

This section assumes the following:

  1. Oracle 10.2.0.1.0 client has already been installed on your system, and the RDBMS version 10.2.0.3.0 patch # 5337014 has been applied.
  2. Part 1 has been completed.

Installation Instructions:
Once the self-extracting archive file has been exploded it will create an directory structure as shown below on your hard drive.

The directory structure after unzipping and where the files to be copied are shown below. should be replaced with the directory of your 10.2 Oracle Home. IE. c:\Oracle10.2.0\db

Steps:

  • ORA10203\bin\sqora32.dll —> <ORACLE_HOME>\bin
  • ORA10203\bin\sqoras32.dll —> <ORACLE_HOME>\bin
  • ORA10203\bin\sqresus.dll —> <ORACLE_HOME>\bin
  • ORA10203\ODBC\html\ODBCRelnotesUS.htm —> <ORACLE_HOME>\ODBC\html\
  • ORA10203\ODBC\readme.txt —> <ORACLE_HOME>\ODBC\html\
  • ORA10203\ODBC\mesg\oraodbus.msb —> <ORACLE_HOME>\ODBC\mesg\

We solved the problem and now we can create a new ODBC-connection.