Wednesday, 11 January 2017

[nQSError: 67004] Configuration value Agents\Log Dir not set.

While configuring a scheduler to export the result set to some shared location on the network. Here is the document provided by Oracle. Have followed the same but resulting in error saying,

[nQSError: 66013] [Line:12 Column:1]
[nQSError: 67004] Configuration value Agents\Log Dir not set.

Cause:

  • Log_Dir is not set in instanceconfig file for scheduler
  • TAG name in Java Script file is not as per the instanceconfig file used by scheduler.

Solution:

We need to set Log_Dir parameter in instanceconfig.xml file of the scheduler,  you can find this file at this location,

ORACLE_INSTANCE\config\OracleBISchedulerComponent\coreapplication_obischn

If you are using the script provided by Oracle here, then you need to make some changes to the file as below,

var fileName = GetConfigurationValue("Log Dir", "Agents") + "\\" + JobID + "-" + InstanceID + "-" + UserID + "-" + Parameter(1);
If you see the instanceconfig.xml file for scheduler, the XML TAG is <iBots> and not <Agents>. (I'm using version 11.1.1.7.150120). So this needs to be changed as below,
var fileName = GetConfigurationValue("Log Dir", "iBots") + "\\" + JobID + "-" + InstanceID + "-" + UserID + Parameter(1);

You will get rid of this issue for sure. Happy blogging. :-)

Copy Results to the File System - Using VB Scipt (Windows Only)

Oracle Business Intelligence 11g, doesn’t provide any built-in method to allow Agent to automatically export/archive OBIEE11g content(Entire Dashboard(or) Dashboard Page(or) Analysis(or) Conditional Report of Agent(or) even Briefing Book) to file system. Ideally there should be a "Destination" of file/FTP added to New Agent screens just like BI Publisher allows FTP. Although this can be done by linking an action to the agent which invokes Java Scripts, VB Scripts, EJBs (Java), etc.. which physically move the OBIEE11g content to the file system.

Action Framework of OBIEE 11g opens up direct integration with Java. So, any process that can be called via Java can be directly called from OBIEE 11g as well. This example configures a java script for the Oracle BI Scheduler that copies the results of an agent to another directory. The script copies the temporary file that contains the results of the Conditional Request to the agent log directory.

In last article, we get to know how to export a report to a shared location using Java script. Today will do the same but using VB Script.

Create a VB Script file using the below contents,

'##=====================================================================
'## Purpose:
'## 1. This script takes a file from OBIEE and saves to the file system
'## 2. Creates a reporting subdirectory if not already present
'##
'## Inputs (specified in Actions tab of OBIEE Delivers Agent):
'## 1. Parameter(0) - This actual file to be exported
'## 2. Parameter(1) - The file name specified within OBIEE
'##
'##=====================================================================

'##Create a variable and assign the base folder path where to store the file:
Dim sPath
sPath = "C:\Users\Prithvi\Documents"
'##Remember the above path is either a shared folder or folder on OBIEE server.

Dim objFSO
Set objFSO = CreateObject("Scripting.FileSystemObject")

'##check whether directory exists, if not create
Dim objDir
If Not objFSO.FolderExists(sPath) Then
Set objDir = objFSO.CreateFolder(sPath)
End If
Set objDir = Nothing

'##build string to get date in yyyy-mm-dd format
Dim sDate, sDateFull
sDate = Now
sDateFull = DatePart("yyyy", sDate) & "-"
If Len(DatePart("m", sDate))=1 Then sDateFull = sDateFull & "0" End If
sDateFull = sDateFull & DatePart("m", sDate) & "-"
If Len(DatePart("d", sDate))=1 Then sDateFull = sDateFull & "0" End If
sDateFull = sDateFull & DatePart("d", sDate)

'##Create a complete path with file name and add the date on the file name:
Dim sFileName
sFileName = sPath & "\" & Parameter(1) & "-" & sDateFull & ".xls"

'##Place the file on the folder:
Dim objFile
objFSO.CopyFile Parameter(0), sFileName, True
Set objFile = Nothing
Set objFSO = Nothing
'#####===================================================================
  • Create a sample agent as below
  • Schedule it to Once.
  • Set the Condition tab as it is.
  • In Delivery Content, select the report you want to export. Give it a Title if you want.
  • Uncheck all the boxes in Recipients.
  • Configure Actions tab as below,
  • Click Ok.
  • Now Save and Run the agent.
  • Check whether the report is exported to the specified location or not.
  • Open and check the contents of the report you exported.

In the next article, we will see How To Create and Invoke Enterpise Java Beans (EJB) Using The Action Framework to export a report / dashboard to a shared location.


Thursday, 5 January 2017

Differenct ways to do performance tuning in OBIEE 11g

Below are the best practices to better performance of your OBIEE system.

  • Aggregation
  • Fragmentation
  • Tend to star schema in physical model only
  • Use hints in physical layer of the repository
  • Avoid complex joins, opaque views, etc. Use an opaque view only if there is no other solution to your data model design.
  • Do not enable log level (at least not in production) except Administrator role. Admin user can act as normal user o run the same query for diagnose  purpose.
  • Do not have complicated formuleas for measures in Answers/ad-hoc reports. Do it from DB end or at max in BMM layer itself.
  • If possible implement data level security to lower the data set pulled from DB
  • Various configuration options can be used to limit the maximum number of rows that can be downloaded, processed, rendered, included in mail, etc.
  • FILTER function in Edit Formula is always cost-saving that CASE statement.
  • In connection pool, set the number of "Maximum Connestions" parameter very carefully.
  • In case of huge data export, consider an option of ODBC or JDBC call into a BI server.
  • Try to use cache seeding wherever possible. (Use EPT to purge stale data)
  • If a number of users are huge, clustered environment is a must. (Vertical clustering)
  • If users are from across the globe, load balancing with clustered environment should be there. (Horizontal clustering)
  • Allocate more memory to JVM. Minimum heap and Maximum heap size parameters.
  • Set the no. of elements for each dimesnion level
  • Use the where clause in LTS if possible
  • Reconfirm that aggregate/fragmented tables are getting used properly
  • Set the Usage Tracking to get the usage, load, peak time of your system. (Usage tracking should be switched off if not needed as it will avoid extra DB Operations that run against each query.)
  • Apply index on column from DB side only
  • Consult with the DBA’s of your environment to improve performance from your DB end.
  • Configure correct hardware for OBIEE and DB server according to Oracle’s recommendation.
  • Get long running physical queries, check explain plan and make change accordingly to DB tables or from OBIEE.
Happy blogging.. :-)


Sunday, 20 November 2016

Configure currency options in Oracle Business Intelligence

When we developers create analyses/canned reports, we often include data that shows currency, such as American dollars. As the administrator, you can perform various tasks that affect currency options that are available to users.

Oracle Business Intelligence users can select the currency in which they prefer to view currency columns in analyses and dashboards. They select the currency in the Currency box in the My Account dialog box, Preferences tab. You define the currency options that are to be displayed in the Currency box in the userpref_currencies.xml file.

You define the currency options that are to be displayed in the Currency box and in a currency prompt in the userpref_currencies.xml file. (These currency options must be for currencies to which your installation can convert columns.) Defining the currency options also controls whether the Currency box is available on the My Account dialog: Preferences tab and whether the Currency Prompt option is available on the Definition pane of the Prompt editor.

For the user-preferred currency options to take effect, the following configuration also must be done in the Oracle Business Intelligence repository:

Modify the userpref_currencies.xml file

Navigate to,

C:\Middleware\instances\instance1\config\OracleBIPresentationServicesComponent\coreapplication_obips1

Before modifying userpref_currencies.xml, make a copy of it in the same directory.

Remove the first <UserCurrencyPreferences> tag and the <!-- comment marker.
Remove the --> comment marker and the last </UserCurrencyPreferences> tag.
Your file should look similar to the following screenshot:

<Config>
<UserCurrencyPreferences currencyTagMappingType="static">
  <UserCurrencyPreference sessionVarValue="USD" displayText="USD America" currencyTag="int:USD" />
  <UserCurrencyPreference sessionVarValue="EUR" displayText="Euro Dollars" currencyTag="int:euro-l" />
  <UserCurrencyPreference sessionVarValue="JP" displayText="Japnees Currency" currencyTag="loc:ja-JP" />
  <UserCurrencyPreference sessionVarValue="ORGC" displayText="Org Currency" currencyTag="loc:en-BZ" />
  <UserCurrencyPreference sessionVarValue="lc1" displayTag="int:DEM" currencyTag="int:DEM" />
</UserCurrencyPreferences>
</Config>

Save and close the userpref_currencies.xml file.

Creation of the PREFERRED_CURRENCY session variable

Go to your repository
Manage > Variables.
Select Action > New > Session > Initialization Block.
Name the initialization block IB_PREFERRED_CURRENCY.
Click Edit Data Source.
Select Default initialization string.
Write a below query to set a session variable value. 
select 'VALUEOF(NQ_SESSION.PREFERRED_CURRENCY)' from dual

Click Edit Data Target
Give it a name as, PREFERRED_CURRENCY
Set an appropriate and dedicated connection pool.
Select Enable any user to set the value. Select this option to set session variables after the initialization block has populated the value (at user login) by calling the ODBC store procedure NQSSetSessionValue(). For example, this option lets non-administrators to set this variable for sampling.
Put 'EUR' as a default initializer

Make sure you IB reflect the below image.

Conversion setup of logical currency columns in the Business Model and Mapping layer

Create a logical columns for converting a currency values from one to another. Typically, this currency conversion should be calculated as part of your data warehouse extract, transform, and load (ETL) process.

Euro Currency: "SupplierSales"."Fact-Sales"."Dollars" * .75
Japnees Currency: "SupplierSales"."Fact-Sales"."Dollars" * .89
Org Currency: "SupplierSales"."Fact-Sales"."Dollars" * 1.57

Create a logical column to use the appropriate conversion factor using the PREFERRED_CURRENCY session variable.

Create a new logical column named as, Preferred Currency
Select Derived from existing columns using an expression.

Put the below formula,

IndexCol( CASE VALUEOF(NQ_SESSION."PREFERRED_CURRENCY")
WHEN 'USD' THEN 0
WHEN 'EUR' THEN 1
WHEN 'JP' THEN 2
WHEN 'ORGC' THEN 3
ELSE 4 END,
"Supplier Sales"."D1_ORDERS2"."ACTLEXTND",
"Supplier Sales"."D1_ORDERS2"."Euro Currency",
"Supplier Sales"."D1_ORDERS2"."Japnees Currency",
"Supplier Sales"."D1_ORDERS2"."Org Currency",
"Supplier Sales"."D1_ORDERS2"."ACTLEXTND")


Drag this Preferred Currency column to the physical layer.

Set default currency as per your preferences

  • Login to OBIEE > My Account > Preferences
This shows how the values that are generated dynamically from the SQL statement in the userpref_currencies.xml file are displayed in a drop-down list of currency options for the Currency box on the Preferences tab of the My Account dialog. The drop-down list is similar to what is displayed for a prompt on a dashboard page.

  • Set currency as Euro
Create analysis and confirm the Preferred Currency column displays the preferred currency selected on the My Account page (Euro, in this example).
Take for example,

Year, Dollars, Preferred Currency in to your analysis.
  • For Preferred Currency, goto Column Properties > Data Format
  • Select Override Default Data Format.
  • Set Treat Numbers As to Currency.
  • Set Currency Symbol to User's Preferred Currency
  • Confirm that the Preferred Currency column displays the preferred currency selected on the My Account page (Euro, in this example).

  • Click on results.

Try changing currency from my account again.

Happy blogging.. :-)

Saturday, 5 November 2016

Remove / Hide Dashboard section borders OBIEE 11g

Hi,

Got a new requirement for the formatting OBIEE dashboard. Our customer wants to hide the section border, default blue layout, etc etc. In short, dashboard background page would contain a plain white colour like in any white paper document.

Yes of course, we can opt for None for the Border of that particular section, but that want affect for the background colour. Even if you set the background colour for all sections in your page, the default blue colour will not leave your screen.

For this, I've come up with one HTML/CSS script which will reset all the formatting related to section/column to a white colour or set it to none.

Drag one text box to your page > edit > paste the below script into it > select "Contains HTML Markup" > save the changes.

<style>
.DashboardPageContentDiv{
background-color:white;
padding:0px;
}
.SectionTable{
background-image:none;
border-left:none;
border-right:none;
border-top:none;
border-bottom:none;
margin-right:0px;
margin-left:0px
-webkit-box-shadow:none;
box-shadow:none;
}
</style>

There you are, enjoy..!!

Monday, 28 September 2015

The BISQLGroupProvider is not available in dropdown list.

Problem
While creating a BISQLGroupProvider Authentication Provider, you might not get it in dropdown list of Type.

The BISQLGroupProvider is not available in dropdown list.

Solution:
Please check the existence of BISecurityProviders.jar in location $MW_HOME/wlserver_10.3/server/lib/mbeantypes

If not, copy the file from $MW_HOME/ORACLE_HOME/bifoundation/security/providers to $MW_HOME/wlserver_10.3/server/lib/mbeantypes

Restart all services (AdminServer + bi_server + OPMN) to reflect the changes.

You are done.!! :-)

Wednesday, 9 September 2015

Start/Stop OBIEE 11g services on Unix platform

Steps to start the OBIEE services on UNIX platform:
  1. Start node manager:
    Navigate to,
    /<MW_HOME>/wlserver_10.3/server/bin

    command,
    nohup sh ./startNodeManager.sh &
    To confirm whether nodemanager is up and running, you can check the log in nohup.out file, you can find this file at above location only.

    Note: nohup will start nodemanager in backend, so you will be able to use the existing terminal for starting AdminServer or any other activitites.

  2. Start the Administration Server:
    After confirming node manager is started, we need to start the AdminServer.

    Navigate to,
    MW_HOME/user_projects/domains/bifoundation_domain/bin

    command,
    ./startWebLogic.sh
    You need to provide Administrator user name and password here.

    Note: Do not close the terminal window later on, or the server will get shutdown.

  3. Start Managed Servers:
    Navigate to,
    MW_HOME/user_projects/domains/bifoundation_domain/bin

    command,
    ./startManagedWebLogic.sh bi_server1 http://<administration_server_ip_address>:7001
    You need to provide Administrator user name and password here.

  4. In the end, you need to start OPMN process.
    Navigate to,
    /<MW_HOME>/instances/instance1/bin

    command,
    ./opmnctl startall

    To check the status of OPMN processes,
    command,
    ./opmnctl status

Steps to stop the OBIEE services:
  1. Stop OPMN processes:
    First, you need to stop OPMN process.
    Navigate to,
    /<MW_HOME>/instances/instance1/bin
    ./opmnctl stopall

  2. Stop Managed Servers:
    Navigate to,
    MW_HOME/user_projects/domains/bifoundation_domain/bin
    ./stopManagedWebLogic.sh bi_server1 http://<administration_server_ip_address>:7001

    To confirm whether Managed Server is stopped, execute the below command..
    ps -ef|grep java|grep obiee|grep bi_server

  3. Stop the Administration Server:
  4. Navigate to,
    MW_HOME/user_projects/domains/bifoundation_domain/bin
    ./stopWebLogic.sh

    To confirm whether AdminServer is stopped, execute the below command..
    ps -ef|grep java|grep obiee|grep AdminServer

  5. Stop node manager:
    Just kill the nodemanager process, use the below command
    kill -9 <nodemanager_pid>

    To confirm whether nodemanager is stopped, execute the below command..
    ps -ef|grep java|grep obiee|grep nodemanager