Category Archives: Business Objects

BusinessObjects

Use of Outer Joins in Combination with Self Restricting Joins

Problem

BusinessObjects use some algorithm for SQL generation based on objects selected in the query and the universe. There are a number of parameters that control SQL generation. The problem is that in some cases BO generates SQL that is not intuitively expected.

What we would expect is that the self restricting joins are applied to the tables and then the tables are joined.

When SELFJOINS_IN_WHERE=No, the self restricting joins are put in the ON clause of the SQL. The generated SQL ignores the self restricting join on the table FACT.

SELECT DISTINCT
  FACT.A,
  DIM.B
FROM
  DIM  RIGHT OUTER JOIN  FACT
  ON  (FACT.DIM_ID=DIM.DIM_ID  AND  FACT.TYPE=0  AND  DIM.TYPE=0)

When SELFJOINS_IN_WHERE=Yes, the self restricting joins are put in the WHERE clause.  The effect of this is that the outer join turns into inner join in the generated SQL.

SELECT DISTINCT
  FACT.A,
  DIM.B
FROM
  DIM  RIGHT OUTER JOIN  FACT
  ON  (FACT.DIM_ID=DIM.DIM_ID)
WHERE
  ( FACT.TYPE=0  )
  AND  ( DIM.TYPE=0  )

In fact, we expect the following SQL:

SELECT DISTINCT
  FACT.A,
  DIM.B
FROM
  DIM  RIGHT OUTER JOIN  FACT
  ON  (FACT.DIM_ID=DIM.DIM_ID  AND  DIM.TYPE=0)
WHERE
  ( FACT.TYPE=0 )

BusinessObjects cannot place self restricting joins conditionally depending on the join structure. (Probably this will make the algorithm too complex, so this is not a bad thing)

A workaround is to avoid using of self joins using derived tables.

A Solution when SELFJOINS_IN_WHERE=No

Replace FACT with a derived table FACT_D

SELECT DIM_ID, A FROM FACT WHERE FACT.TYPE=0

The generated SQL will be:

SELECT DISTINCT
  FACT_D.A,
  DIM.B
FROM
  DIM RIGHT OUTER JOIN (
  SELECT DIM_ID, A FROM FACT WHERE FACT.TYPE=0
  ) FACT_D
  ON (DIM.TYPE=0  AND  FACT_D.DIM_ID=DIM.DIM_ID)

A Solution when SELFJOINS_IN_WHERE=Yes

Replace DIM with a derived table DIM_D

SELECT DIM_ID, B FROM DIM WHERE DIM.TYPE=0

The generated SQL will be:

SELECT DISTINCT
  FACT.A,
  DIM_D.B
FROM
  (
  SELECT DIM_ID, B FROM DIM WHERE DIM.TYPE=0
  ) DIM_D RIGHT OUTER JOIN FACT
  ON (FACT.DIM_ID=DIM_D.DIM_ID)
WHERE
  ( FACT.TYPE=0 )

Is the use of Enterprise SDKs in a thick-client/desktop application supported

Question:

BusinessObjects Enterprise XI, Crystal Reports Server XI, and Crystal Enterprise contain COM, .NET, and Java SDKs. Is the use of these SDKs in a thick-client or desktop application supported?

Answer:

No, the use of BusinessObjects Enterprise SDKs is not supported in a thick-client or desktop application because the BusinessObjects Enterprise SDK is only intended for use in web applications. To build BI platform thick-client or desktop applications, use Business Objects web services.

 Explanation:

  • Thick client applications are not supported because of the CORBA implementation we use with the Enterprise services.
  • Thick client applications are typically installed on many client systems. The large install base would put a strain on the CMS because an individual CORBA connection would be created for each client logon to the CMS server.
  • Web applications don’t present this problem because the application server will only create one CORBA connection to the CMS server for all the client sessions initiated.
  • While the thick client application will likely work without error, there is no escalation path to the technical development team for any issues specifically related to the thick client application. Any issue must be reproduceable in a web environment in order to be tracked as a bug.
  • Only the Enterprise Web Services SDK is supported in a thick client application.

Source:

SAP note 1219135 and related discussion

BusinessObjects Enterprise XI 3.1 – Supported Platforms

Links

Search on SAP

Supported Browsers BOE XI 3.1 SP3

Supported Browsers BOE XI 3.1 SP5

See the SAP documentation for details.

Removing the Failed Instances Manually From the Database

The error in BO XI 3.1 SP3 causes millions of failed instances generated (SAP note 1448881 “Multiple instances spawned after daylight savings time change”). If the problem is not solved timely, the BO is getting slow, services is starting to fail often. It is usually possible to remove the instances programmically (SAP note 1568718 “How to delete all failed instances in XI3.1 programmatically”), however this script does not work if the number of the failed instances large – millions of records.

SAP note 1654183 “How to delete all the failed instances in SAP BusinessObjects Enterprise manually” is not that clear and more over it is incorrect. The correct script (for Oracle) is given below.

1. Stop SIA.
2. Make backup of CMS database and FileStore folder.
3. Execute the following script:

CREATE TABLE cms_infoobjects6_temp AS (
    SELECT * FROM cms_infoobjects6
    WHERE schedulestatus != 3 
    OR schedulestatus IS NULL);

TRUNCATE TABLE cms_infoobjects6;

INSERT INTO cms_infoobjects6 
    SELECT * FROM cms_infoobjects6_temp;

COMMIT;

DROP TABLE cms_infoobjects6_temp;

4. Start SIA and test the system.

How to Upload an Excel File to CMS Programmatically Using BO Java SDK

static public void uploadFile(IInfoStore infoStore, String filename, String title, int parentId)
    throws SDKException
{
    IInfoObjects infoObjects = infoStore.newInfoObjectCollection();
    IInfoObject newInfoObject = infoObjects.add(CeKind.EXCEL);
    newInfoObject.setTitle(title);
    newInfoObject.getFiles().addFile(filename);
    newInfoObject.setParentID(parentId);
    infoStore.commit(infoObjects);
}

Example of Token Generation

The following JSP page generates a token and logs on to the InfoView with the token.

The following file logonAuto.jsp can be placed into the folder:

[BOInstallationFolder]\Tomcat55\webapps\InfoViewApp

logonAuto.jsp

<%@ page language="java" contentType="text/html;charset=UTF-8"%>
<%@ page import="com.crystaldecisions.sdk.exception.SDKException"%>
<%@ page import="com.crystaldecisions.sdk.framework.CrystalEnterprise"%>
<%@ page import="com.crystaldecisions.sdk.framework.IEnterpriseSession"%>
<%@ page import="com.crystaldecisions.sdk.framework.ISessionMgr"%>
<%@ page import="com.crystaldecisions.sdk.occa.security.ILogonTokenMgr"%>
<%
    String url = "http://servername:8080";
    IEnterpriseSession enterpriseSession = null;
    String token = "";
    try {
        ISessionMgr sessionMgr = CrystalEnterprise.getSessionMgr();
        enterpriseSession = sessionMgr.logon("Administrator",
        "", "localhost", "secEnterprise");
        ILogonTokenMgr logonTokenMgr = enterpriseSession.getLogonTokenMgr();
        token = logonTokenMgr.createLogonToken("", 60, 1);
    } catch (SDKException ex) {
        ex.printStackTrace();
    } finally {
        if (enterpriseSession != null)
            enterpriseSession.logoff();
    }
%>
<html>
    <head>
        <meta http-equiv="REFRESH"
        content="0;url=<%=url%>/InfoViewApp/logon/start.do?ivsLogonToken=<%=token%>"/>
    </head>
    <body>
    </body>
</html>

CMS operation timed out after 9 minutes

The error “CMS operation timed out after 9 minutes” (see below) means that the BO was not able to complete a query to a CMS database. This could be the case when the CMS database became too large (e.g. if the system is affected by the issue described on the SAP note 1448881). A workaround is to increase the timeout in the registry from 9 minutes (which is the default value) to, say, 60 minutes.

HKEY_LOCAL_MACHINE\SOFTWARE\Business Objects\Suite 12.0\CMS\Instances\<instance name>.cms

For 64bit machine:

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Business Objects\Suite 12.0\CMS\Instances\<instance name>.cms
Continue reading

Undocumented parameters of BIAR Command Line Tool

There are a number of undocumented parameters of BIAR Command Line Tool. You might find some of them interesting.

Documented Parameter Default Comment
yes action  null importXML/exportXML
yes userName  null
yes password  null
yes CMS  null
yes authentication  null
yes includeSecurity  true
yes exportBiarLocation  null
yes exportDependencies  false
yes importBiarLocation  null
yes exportQuery
yes exportQueriesTotal
no exportFileLocation  null  ?
no importFileLocation  null  ?
no importXmlLocation  null  ?
no exportXmlLocation  null  ?
no exportXsdLocation  null  ?
no rootFolderCUID  null  ?
no useLegacyEngine  false  ?
no token  null
no resolveDuplicateNames  false  ?
no importFileToFRS  true  ?
no exportFileFromFRS  true  ?
no exportStrict  true  ?
no exportWSStrict  false  ?
no includeHash  false  ?
no importRelationsNotDelta  false  ?
no xsdDelta  false  ?
no validateXML  false  ?
no enforceUnimportable  false  ?
no exportCallPlugins  false  ?
no importCallPlugins  false  ?
no outputIds  false
no twoStepImport  false  ?
no validateParents  true  ?
no printEvents  false  ?
no stacktrace  false