Thursday, July 25, 2013

OBIEE Client Connectivity setup

If you are using OBIEE 11g client tools to create your own RPD or connecting to a Database to import metadata or trying to open the RPD online, you need to first configure the connectivity options for the OBIEE client.

You can connect to a DB source using either ODBC or OCI. If you want to connect via OCI, follow these steps.

  1. Install a Database client on your client machine. e.g. Oracle Database client for 11g. You can also install Oracle XE on your local machine.
  2. Make sure the database client libraries are available in the system path. If not, append this to the System path. Alternately you can set it in the bi_init.bat located at C:\Program Files\Oracle Business Intelligence Enterprise Edition Plus Client\oraclebi\orahome\bifoundation\server\bin

    OBIEEClient01

  3. Locate where your tnsnames.ora file is present (Usually you can find it in  D:\app\Administrator\product\11.2.0\client_1\network\admin).In the tnsnames.ora file create an entry for the DB you want to connect to. For example to connect to the local Database on my laptop, the entry is shown.
    ORCL11GRT = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl11grt) ) )
  4. copy the tnsnames.ora file from your Database location to the OBIEE client location. This is usually in C:\Program Files\Oracle Business Intelligence Enterprise Edition Plus Client\oraclebi\orahome\network\admin

    Note: If the network –> admin directories are not present, you must create them.

  5. Restart the BIAdminTool and try to import the metadata from the server mentioned in the tns entry. If the configuration is correct and there is no network problems, you should be able to connect and import the metadata in your RPD.

Wednesday, July 24, 2013

Reset sys password in Oracle DB

If you have forgotten the sys password for an Oracle Database, you can reset it by logging in as an OS user belonging to the dba group. Here is how to do it.

First you need to login to the Database server. In my case this was a Windows server and I logged in as the Administrator user though Remote Desktop.

Open a command prompt window and type in

C:\>sqlplus /nolog

you should get a sqlplus command prompt. type away the following commands to change the password.

SQL> connect /@POP as sysdba

SQL> alter user sys identified by newpwd;

the /@POP is to connect to the POP instance of the database. I had multiple instances on my Server.

“newpwd” is the new password for the sys user.

Monday, July 22, 2013

[nQSError: 17003] Oracle gateway error: OCIEnvNlsCreate or OCIEnvInit failed to initialize environment.

 

Happened to get this error out of the blue on a working OBIEE box.  Reason: somebody somehow messed up with the database client HOME path.

The exact error message:

[nQSError: 17003] Oracle gateway error: OCIEnvNlsCreate or OCIEnvInit failed to  initialize environment. Please check your Oracle Client installation and make sure the correct version of OCI libraries are in the library path.

  1. If you are getting this error when you are testing a test/production OBIEE box, check the oracle database home path is correctly set.
  2. If you are connecting through database client, check if the OCI client libraries path is  set.
  3. If you are using the BIAdmin Tool and trying to import  metadata using a connection pool, check the OCI library path is correctly set. If it is, then check if the BIAdmin tool was correctly initialized during startup. this script is called bi-init.cmd located in $INSTANCE_HOME\bifoundation\OracleBIApplication\coreapplication\setup

In my case it was because of the BIAdmin tool, initialization. you can manually run the initialization script in a Command Window and then start the BIAdmin tool from that Command windows –> like this:

C:\OBIEE11g_Home\Oracle_BI1\bifoundation\server\bin>C:\OBIEE11g_Home\instances\instance1\bifoundation\OracleBIApplication\cor
eapplication\setup\bi-init.cmd

C:\OBIEE11g_Home\Oracle_BI1\bifoundation\server\bin>admintool.exe

After this,  the problem disappears and you can import the meta data using the connection pool in the RPD using the BI Admin Tool.

If you don’t want to initialize BI Admin tool manually every time, On Windows systems jut make sure that the shortcut to BIAdmin tool is configured like this in the “Target” part.

C:\Windows\system32\cmd.exe "/cC:\OBIEE11G_HOME\instances\instance1\bifoundation\OracleBIApplication\coreapplication\setup\bi-init.cmd coreapplication_obis1 2 && C:\OBIEE11G_HOME\Oracle_BI1\bifoundation\server\bin\AdminTool.exe"

BIAdminTool_properties

Wednesday, July 17, 2013

OBIEE 11g Security part 1

Handling of security in 11g is very different from how it was done in 10g. The differences are due to the integration of OBIEE 11g with the Oracle Fusion Middleware. In OBIEE 11g you have to deal with users –> Groups –> Application Roles –> Application policies. To know more about these terms please refer to the Official Oracle docs.

Managing security is carried out using the following tools.

  1. WebLogic console –> manage users, groups and providers.
  2. Fusion Middleware enterprise manager –> mange Application Roles and Policies
  3. BI Administration Tool –> Manage RPD level security, Row Level Access, Data restriction, Logical column restriction, etc.
  4. Administration page in Analytics –> restrict features of OBIEE Analytics, Subject Area Access.

Discussing or covering up the entire topics on security is an overkill for a blog post and so I am going to cover it in parts. This part deals with row level access or showing different sets of data for different users based on their access rights.

Summary of row-level security access.

  1. Import the database table which has got information about the data access rights.
  2. create a session variable and define corresponding initialization block or row-wise initialization blocks in case multiple values have to be used in the filter.
  3. apply filter condition at the Application role level to restrict data.
  4. bounce the services and test the security access.

I’m making use of the BISAMPLE schema that is provided by Oracle.

create a database table that contains the mappings for the users and their access rights. In this case, I’m creating a table for users who have access to specific Regions. You can create this table in the BISAMPLE schema.

create table RT_USER_REGION ( username varchar(255) NOT NULL, region varchar(25) NOT NULL, CONSTRAINT userregion_unique UNIQUE(username, region) );

populate some data into this table.

insert into rt_user_region VALUES('rtuser1','AMERICAS'); insert into rt_user_region VALUES('rtuser2','APAC'); insert into rt_user_region VALUES('rtuser3','APAC'); insert into rt_user_region VALUES('rtuser3','EMEA');

create users rtuser1, rtuser2 and rtuser3 in the WebLogic administration console. create group called RTUSERS for these users and add all these users into this group. Using the enterprise manager, add this group to a newly created SalesPersonnel Application Role.

Open your RPD using the BI Admin Tool. Import this table into the physical layer. Also create a new connection pool to be used later for session variable initialization.security01

create a session variable USER_REGION and its corresponding initialization blocksecurity02

in the initialization block dialog, click ‘Edit Source Data’ button and select the connection pool you created earlier. give the default initialization string as

select region from rt_user_region where upper(username) = upper(':USER')

Note: the above query assumes that a single value is returned. If we have users assigned to multiple regions, then we should use a row-wise initialization block, I will show this at the end of this blog post. rtuser3 is specifically created for this purpose.

please see below the screen shot of the completed initialization block dialog.security03

In the BI Admin tool go to Manage –> Identity and select the Application Role you have created earlier.

security04

Double click or right click –> properties on the SalesPersonnel Application Role, then click the Permissions button.

security05

In the User/Application Role Permissions dialog box, click the green color ‘Plus’ Add button.

security06

Next, you will apply the filter: you can apply the filter at the presentation level or at the logical model level.

  1. If applied to the table at the presentation level,  the filter is applied only to the table that belongs to that specific subject area, even if you have multiple subject areas from the same logical model.
    1. If we apply the filter to the D3 Customers table (where the Region column is present), then the filter is applied to an analysis which contains columns from the D3 Customers table.
    2. If you want to filter the analysis even if no columns from D3 Customers was selected , then you should apply the filter to the associated fact table which in this case is F1 Revenue.
  2. If applied at the logical model level, then the filter will be applied to every subject area that uses that logical table from the model.

In this scenario, Apply the filter the Logical Model level, so that the access restriction is enforced throughout (and in any future analyses). Double click on D3 Customers or use the select button.

security07

define the expression by clicking the white area under the Data Filter heading clicking the edit expression button.

security08

use this expression.

"RTSales"."D3 Customers"."REGION" = VALUEOF(NQ_SESSION."USER_REGIONS")

 security09

Click on OK and finish the steps and save your RPD. Bounce the BI Services and test the data security access you just implemented.

logging in as rtuser1 will only show the Region values for AMERICAS. logging in as rtuser2 will only show APAC values.

security10

security11

Row wise initialization block:

If multiple regions are allocated to the Sales Personnel, then you will have to use the row wise initialization block so that the the multiple values returned by the query are available to be used as the filter.

follow these steps for using row-wise initialization block. This concept is also used in this blog post.

In the BI Admin Tool, go to Manage –> Variables. In the left hand side part of the dialog box select Session –> Initialization blocks.

create a new session initialization block by right clicking on an empty area on the right hand side and selecting the menu option.

click the ‘Edit Data Source’ button and select the connection pool as shown

security12

give the default initialization string as

select 'USER_REGIONS', region from rt_user_region where upper(username) = upper(':USER')

The variable is automatically defined in the ‘USER_REGIONS’ part of the query. The completed dialog box looks like this.

security13

if you login as rtuser3 you will be able to view regions APAC and EMEA.

security14

Wednesday, June 26, 2013

Cannot Start OBIEE Presentation service

[OBIPS] [ERROR:1] Cannot create new catalog while running in update GUID or recover mode

There are many reasons why the presentation service will not start, but this one was interesting because this happened when somebody tinkered with the server configuration settings while migrating RPD and catalog from another similar specs environment.

This error occurs while deploying a new RPD and creating the corresponding new catalog for it.

just make sure:

  1. in the NQSConfig.INI file

    FMW_UPDATE_ROLE_AND_USER_REF_GUIDS = NO;

    don’t comment the above line, and don’t set the value to YES.

  2. in the instanceconfig.xml file

    <Catalog>
             <UpgradeAndExit>false</UpgradeAndExit>
             <!-- <UpdateAccountGUIDs>UpdateAndStartNormally</UpdateAccountGUIDs> -->
    </Catalog>

    I have commented the line with UpdateAccountGUIDs, this is required only if you want to refresh the GUIDs.

  3. bounce OPMN services and the presentation service will be up.

opmn status

Monday, May 27, 2013

uninstalling OBIEE

updated: 13 Feb 2014

Includes information about version 11.1.1.7 and Windows registry entries.

Summary of de-installation from Oracle docs.

  1. Run the deinstall script and select the Deinstall instances managed by a WebLogic domain option.
  2. Stop all Oracle Business Intelligence processes and servers, including all OPMNcontrolled components and JEE components.
  3. Drop the Metadata Services (MDS) and Business Intelligence Platform (BIPLATFORM) schemas using RCU.
  4. Run the deinstall script and select the Deinstall the Oracle home option.
  5. Deinstall the Oracle Common home manually or by running the deinstall script that it contains.
  6. Use the Oracle WebLogic Server uninstaller to uninstall WebLogic Server.
  7. Remove the Oracle home (if necessary).
  8. Remove the Middleware home and any other homes (Domain home, Applications home, and Instance home) that might have been installed outside of the

Deinstall weblogic server managed instances:

Run the deinstall script and select the Deinstall instances managed by a WebLogic domain option. Make sure OBIEE services are running, before you proceed.

Go to $ORACLE_HOME\oui\bin (e.g. D:\OBIEE11g\Oracle_BI1\oui\bin ) and execute this command

D:\OBIEE11g\Oracle_BI1\oui\bin>setup –deinstall

image

image

image

image

uninstallOBIEE01

uninstallOBIEE02

uninstallOBIEE03

uninstallOBIEE04

Stop all OBIEE services.

Go to http://localhost:7001/em - > Business Intelligence -> core application and stop all components.

Go to http://localhost:7001/console

Domain structure -> deployments link -> control tab

Select all components and stop them

image

Customize the table to display all process (all 61 processes) and then select all. It will stop the processes and exclude the libraries. This is ok.

Note: On Windows machine you can stop all services from the services control panel.

Drop the Metadata Services (MDS) and Business Intelligence Platform (BIPLATFORM) schemas using RCU.

Run RCU.bat file from RCU_HOME\bin (e.g. F:\OBIEEInstall\rcuHome\BIN ).

image

image

image

image

image

image

image

image

image

Remove the oracle home (oracle BI HOME).

Run the deinstall script and select the Deinstall the Oracle home option.

Got to D:\OBIEE11g\Oracle_BI1\oui\bin and run setup.exe –deinstall

 

image

image

image

image

image

Deinstall the Oracle Common home

Go to MW_HOME\oracle_common\oui\bin   (e.g. D:\OBIEE11g\oracle_common\oui\bin )

Run

setup.exe -deinstall -jreLoc full_path_of_jre_or_jdk

specify the JDK directory that was created by Oracle Business Intelligence 11g Installer in the Middleware home. (in my case D:\OBIEE11g\jdk160_24)

D:\OBIEE11g\oracle_common\oui\bin>setup.exe -deinstall -jreLoc D:\OBIEE11g\jdk16

0_24

note:

  1. You can specify any compatible jdk path. But the uninstall utility has a problem with spaces in the file path,  therefore ensure that jdk is installed in a path without spaces.
  2. I noticed while uninstalling 11.1.1.7.0 the jdk directory is deleted by the uninstaller. In such cases you can install a compatible jdk into a directory without spaces and specify this new path in the deinstall command above.

image

image

image

image

uninstall WebLogic Server

if you are uninstalling on Windows,

run uninstallNodeMgrSvc.cmd from the following directory in your WebLogic Home:

WL_HOME\server\bin\uninstallNodeMgrSvc.cmd  (for example : D:\OBIEE11g\wlserver_10.3\server\bin\uninstallNodeMgrSvc.cmd )

Open a command prompt and go to Middleware Home -> utils –> uninstall, and execute “uninstall  -mode=console”

D:\OBIEE11g\wlserver_10.3\server\bin>cd D:\OBIEE11g\utils\uninstall

D:\OBIEE11g\utils\uninstall>uninstall -mode=console

image

image

image

Note: If you get a message like “The system cannot find the path specified.”, it means the uninstaller cannot find the path to the java home that is set in the uninstall.cmd file. you should edit this file to make it point to the new jdk home.

update for uninstall java home error

Manually delete the MW_HOME (middleware home) directory. On Windows you may want to use a program like ccleaner to clean up your system and reboot.

Cleaning up the Windows Registry Entries:

  • It is advisable to make registry backup before you do this.
  • go to HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI and delete the stale and unnecessary odbc entries (like coreapplication_OH1974671976).
  • also delete similar entries in HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\ODBC Data Sources
  • listed below the key HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI delete all driver entries that were installed by OBIEE.
  • After deleting the entries, you can verify by checking that these entries are no longer listed in the system DSN tab of the ODBC dialog box(which can be opened from the Windows control panel)

Monday, May 20, 2013

OBIEE 11g important paths / locations

Here is a list of important OBIEE file paths.

component path example
middleware home MW_HOME the root installation directory of OBIEE D:\OBIEE11g
oracle home (bi) ORACLE_HOME $MW_HOME\Oracle_BI1 D:\OBIEE11g\Oracle_BI1
instance home INSTANCE_HOME $MW_HOME\instances\instance1 D:\OBIEE11g\instances\instance1
domain home DOMAIN_HOME $MW_HOME\user_projects\domains\bifoundation_domain D:\OBIEE11g\user_projects\domains\bifoundation_domain
weblogic home WEBLOGIC_HOME $MW_HOME\wlserver_10.3 D:\OBIEE11g\wlserver_10.3

rpd location:

$INSTANCE_HOME\bifoundation\OracleBIServerComponent\coreapplication_obis1\repository

Catalog location:

$INSTANCE_HOME\bifoundation\OracleBIPresentationServicesComponent\coreapplication_obips1\catalog

custom message XML files to be stored in : $ORACLE_HOME\bifoundation\web\msgdb\messages

BI Admin tool environment initialization script location:  $INSTANCE_HOME\bifoundation\OracleBIApplication\coreapplication\setup\bi-init.cmd

BI Admin tool executable location : $ORACLE_HOME\bifoundation\server\bin\admintool.exe

Script to specify tnsnames.ora file for connecting to Oracle data sources : $INSTANCE_HOME\bifoundation\OracleBIApplication\coreapplication\setup\user.cmd

Configuration file locations: $INSTANCE_HOME\config ( Here you will find individual directories for each component).

Script to start/stop OPMN services : $INSTANCE_HOME\bin\opmnctl.bat

Scripts to start/stop Admin and Managed Servers (Weblogic) : $DOMAIN_HOME\bin

Script to Manually start/stop NodeManager (installed as a service in Windows / needs to be manually run in Linux) :  $WEBLOGIC_HOME\server\bin\startNodeManager.cmd

Log file locations:

component path log file
OBIEE Installation C:\Program Files\Oracle\Inventory\logs install[datetime].log
Admin Server $DOMAIN_HOME\servers\AdminServer\logs AdminServer.log, AdminServer-diagnostic.log
Managed Server(s) $DOMAIN_HOME\servers\bi_server1\logs bi_server1.log, bi_server1-diagnostic.log
OPMN $INSTANCE_HOME\diagnostics\logs\OPMN\opmn opmn.log
Presentation Server $INSTANCE_HOME\diagnostics\logs\OracleBIPresentationServicesComponent\coreapplication_obips1 sawlog0.log
BI Server $INSTANCE_HOME\diagnostics\logs\OracleBIServerComponent\coreapplication_obis1 nqserver.log, nqquery.logs
BI Scheduler $INSTANCE_HOME\diagnostics\logs\OracleBISchedulerComponent\coreapplication_obisch1 nqscheduler.log

Cache Paths:

BIServer: $INSTANCE_HOME\bifoundation\OracleBIServerComponent\coreapplication_obis1\cache

Presentation Server: $INSTANCE_HOME\tmp\OracleBIPresentationServicesComponent\coreapplication_obips1\obis_temp

Did I miss anything? Please feel free to email me your comments.

Monday, May 6, 2013

OBIEE 11g: Web Catalog Permissions dialog not displayed

 

You come across this problem, especially when you migrate/move the catalog to another server.

permissiondialog01

Initially it might seem to be a browser problem, but it isn’t. Refer to the support doc [ID 1476105.1] to resolve this. The problem is because of the many invalid users that are still present in the catalog and you will need to clean them up.

Opening Catalog Manager in Online mode

If you are on a Windows system, go to Start Menu –> All Programs –> Oracle Business Intelligence –> Catalog Manager.

or you can go to $INSTANCE_HOME\bifoundation\OracleBIPresentationServicesComponent\coreapplication_obips1\catalogmanager and run the runcat.cmd script.

After the Catalog Manager window opens, click on File –> Open CatalogcatalogManager01

After login is successful you are able to view the catalog contents.

catalogManager02