Tuesday, March 27, 2012

AYA Upgrade (install) OBIEE to Linux (from Windows)

This post was made when I found out how much time can one not too experienced OBI DBA loose to find out all details for performing OBIEE migration from Windows to Linux . This is nothing special but mine way of making all receipts to one place are more useful to me for any further reference.

In mine case I had Windows 2003 x86 SP2 (source server) with OBIEE 10.3.4.1 installation in standard locations:
  • c:\OracleBI
  • c:\OracleBIData
This installation has huge problems with Windows, described in one of mine previous posts, client agreed to move to Linux CentOS 5.8 i586 (target server) and upgrade to OBIEE 10.3.1.4.2 (latest 10g version in this moment).
I will assume that Linux is installed with non required but nice tools:
vnceserver
Setup VNC server on CentOS:
http://wiki.centos.org/HowTos/VNC-Server

Enable on server (GUI part)
http://bobpeers.com/linux/vnc
Desktop > Preferences > Remote Desktop

For windows vnc viewer:
http://www.realvnc.com/cgi-bin/download.cgi

rlwrap
as root:
yum install readline-devel

Download the latest version of GNU readline from http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html  At the time of writing, this is readline-6.0.tar.gz

Unpack the gzipped tar file under /tmp
cd /tmp
tar -zxvf readline-6.0.tar.gz

Change to the directory this creates and run configure:
cd readline-6.0
./configure

If you do not have write access to the /usr/local/ hierarchy, then you can install the files somewhere else:
./configure --prefix=/home/my-user-name/packages

Now build the readline library
make
and install (become superuser first if installing under /usr/local)

make install
---------------------------------      
install rlwrap:
gunzip rlwrap*.gz
tar -xvf rlwrap*.tar
cd rlwrap*
./configure
make
make check
make install
-----------------------------------
The process will be done in next steps:
  • Source server backup data
  • Setup install environment on target server
  • Install JAVA on target server
  • Install OBI EE on target server
  • Install Oracle client
  • Install OBI EE client side on Windows host
  • Fix some bugs in new OBI EE installation
  • Setup BI Publisher
  • Apply backup files/settings to target server
  • Add additional fonts
  • Create OBI start/stop script (boot start) on target server

Source server backup data

On source server, of next two source directories:
  1. make zip files of catalog directory (in mine case "c:\OracleBIData\web\catalog\samplesales")
  2. backup repository file (in mine case c:\OracleBI\server\Repository\AZM.rpd)
If you have aditional BI Publisher reports you might find them in:
  • C:\OracleBI\xmlp\XMLP\Users
directory, where exact directory depend on your definition. Zip them with subdirs.

Beside that, according Oracle documentation chapter "Backing Up Business Intelligence Folders and Files", recommended backup of some other files. If you have some other custom changes (some terms change to something els i.e. "SUM" to "Total sum" or some translations to local language) find those files to edit them on target server as well.

Setup install environment on target server

In mince case I'll install OBIEE under oracle user which belongs to dba group.
groupadd -G dba:501
useradd -g dba oracle
passwd oracle
After creation, login once as oracle to create env files. Then append then to the ".bash_profile" of the oracle user important stuff. here is an example Add entries in .bash_profile (for Oracle 10g and OBIEE 10g) so complete profile for oracle user looks like:
# .bash_profile
# 

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
 . ~/.bashrc
fi

# rlwrap
#---------------------------
alias sql='rlwrap sqlplus'
alias rlrman='rlwrap rman'
#===========================

# User specific environment and general
#---------------------------

if [ $USER = "oracle" ]; then
  if [ $SHELL = "/bin/ksh" ]; then
    ulimit -p 16384
    ulimit -n 65536
  else
    ulimit -u 16384 -n 65536
  fi
fi

TMP=/var/tmp 
export TMP

TMPDIR=$TMP
export TMPDIR

TEMP=$TMP; 
export TEMP

# Local Binary
PATH=$PATH:$HOME/bin
export PATH
#===========================


# Oracle general Parameters
#---------------------------
ORACLE_BASE=/oracle
export ORACLE_BASE

# Java Home
JAVA_HOME=/usr/java/jdk1.7.0_02
export JAVA_HOME
#===========================


# Oracle BIEE Parameters
#---------------------------
OBI_HOME=/oracle/product/obi10g/OracleBI
export OBI_HOME

OBI_DATA_HOME=/oracle/product/obi10g/OracleBIData
export OBI_DATA_HOME

# OBI Setup Script
PATH=$PATH:$OBI_HOME/setup
export PATH
#===========================


# Oracle DB Parameters
#---------------------------
ORACLE_HOME=/oracle/client/10g
export ORACLE_HOME

TNS_ADMIN=/oracle/client/10g/network/admin
export TNS_ADMIN

PATH=$ORACLE_HOME/bin:$PATH
export PATH

LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH
#===========================

Install JAVA on target server

In this case I have decided to install latest java SE 7u2 version. However SE 6 is far enough,
  1. Download jdk-7-linux-i586.rpm from page
  2. cd [download directory]
  3. rpm -ivh jdk-7-linux-i586.rpm
  4. cd /etc/alternatives/java
  5. alternatives --config java
  6. alternatives --install /usr/bin/java java /usr/java/jdk1.7.0_02 3
  7. alternatives --config java
Here is some output after:
[root@app-srv ~]# alternatives --config java

There are 3 programs which provide 'java'.

  Selection    Command
-----------------------------------------------
   1           /usr/lib/jvm/jre-1.4.2-gcj/bin/java
*  2           /usr/lib/jvm/jre-1.6.0-sun/bin/java
 + 3           /usr/java/jdk1.7.0_02/bin/java

Enter to keep the current selection[+], or type selection number: 3
[root@app-srv ~]# java -version
java version "1.7.0_02"
Java(TM) SE Runtime Environment (build 1.7.0_02-b13)
Java HotSpot(TM) Server VM (build 22.0-b10, mixed mode)
[root@app-srv ~]#

Install OBI EE on target server

as root:
mkdir -p $OBI_HOME
chown -R oracle:dba $OBI_HOME
chmod -R 775 $OBI_DATA_HOME
mkdir -p $OBI_DATA_HOME
chown -R oracle:dba $OBI_DATA_HOME
chmod -R 775 $OBI_DATA_HOME
as root
Make sure that /dev/random and /dev/urandom are available
[root@oel11g ~]# cd /dev
[root@oel11g dev]# ls *random
random  urandom
as root
chmod -R 777 $JAVA_HOME
as oracle
change directory to the installation directory.
./setup.sh -console
as root
chmod -R 755 $JAVA_HOME
Change mem preferences:
vi  $OBI_HOME/oc4j_bi/bin/oc4j 
and change -Xmx512m to something more "serious". In mine case 756M was quite enough.
JVMARGS="-Djava.library.path=/usr/local/OracleBI/server/Bin:/usr/local/OracleBI/web/bin -DSAROOTDIR=/usr/local/OracleBI -DSADATADIR=/usr/local/OracleBIData -XX:MaxPermSize=128m -Xmx512m $OC4J_JVM_ARGS"
else
JVMARGS="-Djava.library.path=/usr/local/OracleBI/server/Bin:/usr/local/OracleBI/web/bin -DSAROOTDIR=/usr/local/OracleBI -DSADATADIR=/usr/local/OracleBIData -XX:MaxPermSize=128m -Xmx756m"

Install Oracle client

OBIEE must have 10g client installed. In this case Administrator type of installation is the best option.
as oracle
install oracle client (full)
./runInstaller -ignoreSysPrereqs
Bounce OBI services. This how correct services should look like (this doesn't mean that OBI is running correctly):
[oracle@app-srv ~]$ ps -ef|grep [j]ava
oracle   29400 29398  0 21:30 pts/1    00:00:12 /usr/java/jdk1.7.0_02/bin/java -Djava.library.path=/oracle/product/obi10g/OracleBI/server/Bin:/oracle/product/obi10g/OracleBI/web/bin -DSAROOTDIR=/oracle/product/obi10g/OracleBI -DSADATADIR=/oracle/product/obi10g/OracleBIData -XX:MaxPermSize=128m -Xmx1024m -jar /oracle/product/obi10g/OracleBI/oc4j_bi/j2ee/home/oc4j.jar -config /oracle/product/obi10g/OracleBI/oc4j_bi/j2ee/home/config/server.xml -userThreads
oracle   29590     1  0 21:32 pts/1    00:00:02 /usr/java/jdk1.7.0_02/bin/java -classpath /oracle/product/obi10g/OracleBI/web/javahost/lib/core/sautils.jar:/oracle/product/obi10g/OracleBI/web/javahost/lib/core/sawconnect.jar:/oracle/product/obi10g/OracleBI/web/javahost/lib/core/javahost.jar:/oracle/product/obi10g/OracleBI/web/javahost/lib/core/xalan-2.4.1.jar:/oracle/product/obi10g/OracleBI/web/javahost/lib/core/xercesImpl-2.6.2.jar:/oracle/product/obi10g/OracleBI/web/javahost/lib/core/xml-apis-2.6.2.jar -Xms128M -Xmx256M -Djava.awt.headless=true -Djava.util.logging.config.file=/oracle/product/obi10g/OracleBI/web/javahost/config/logconfig.txt -Doracle.bi.presentation.coreconfigdir=/oracle/product/obi10g/OracleBI/web/config -Doracle.bi.presentation.dataconfigdir=/oracle/product/obi10g/OracleBIData/web/config -Doracle.bi.rootdir=/oracle/product/obi10g/OracleBI -Doracle.bi.presentation.rootdir=/oracle/product/obi10g/OracleBI/web -Doracle.bi.tempdir=/oracle/product/obi10g/OracleBIData/tmp -Doracle.bi.javahostdir=/oracle/product/obi10g/OracleBI/web/javahost -Doracle.bi.presentation.cordaroot=/oracle/product/obi10g/OracleBI/corda50 com.siebel.analytics.javahost.standalone.Main /Config /oracle/product/obi10g/OracleBI/web/javahost/config/config.xml
[oracle@app-srv ~]$

Install OBI EE client side on Windows host

Because in OBIEE 10g there is no Admin Tool GUI part, this has to be installed on any Windows box. If you are upgrading, open .rpd (AZM.rpd) file with new Admin Tool and just save it under same name. Open and save is the only thing you need to do!

Transfer new rpd to $OBI_HOME/server/Repository directory on target server.

Fix some bugs in new OBI EE installation

There are several known bugs which must be fixed before continue installation. If you try to login to Answers through browser:
http://app-srv:9704/analytics/saw.dll?Answers
You'll get message "Unable to login"
This is because if you look in NQServer.log you'll find a cause:
tail /oracle/product/obi10g/OracleBI/server/Log/NQServer.log
 [nQSError: 47007] Invalid repository file: /oracle/product/obi10g/OracleBI/server/Repository/samplesales.rpd.
On Linux there is no preinstalled repository file (.rpd) (on Windows there is!).
[oracle@app-srv ~]$ ls -la $OBI_HOME/server/Repository
total 8
drwxr-x---  2 oracle dba 4096 Mar 17 20:55 .
drwxr-x--- 12 oracle dba 4096 Mar 17 20:55 ..
[oracle@app-srv ~]$
Next is to make some changes in $OBI_HOME/server/Config/NQSConfig.INI. Before that make a bakups of all files here for your safety.
vi $OBI_HOME/server/Config/NQSConfig.INI
[ REPOSITORY ]
Star    =       samplesales.rpd, DEFAULT;
[ REPOSITORY ]
Star    =       AZM.rpd, DEFAULT;
I reccomend to make some aditional changes in this file as well (if you are using racle OCI connection, file cache is uselles and slower then Oracle DB cache):
[ CACHE ]
# Vadas 01.07.2011 ENABLE = YES;
ENABLE = NO;
# Vadas 01.07.2011 DATA_STORAGE_PATHS = "/usr/local/OracleBIData/cache" 500 MB;
DATA_STORAGE_PATHS = "/usr/local/OracleBIData/cache" 1 MB;
# Vadas 01.07.2011 MAX_ROWS_PER_CACHE_ENTRY = 100000;  // 0 is unlimited size
MAX_ROWS_PER_CACHE_ENTRY = 1;  // 0 is unlimited size
# Vadas 01.07.2011 MAX_CACHE_ENTRIES = 1000
MAX_CACHE_ENTRIES = 1;
And one that is for mine country:
[ GENERAL ]
# Vadas SORT_ORDER_LOCALE = "English-usa";
SORT_ORDER_LOCALE = "Croatian";
Beside all, probably another error is shown in:
[oracle@app-srv Config]$ tail $OBI_DATA_HOME/web/log/sawserver.out.log
        saw.subsystem.security.checkAuthenticationImpl
        saw.threadPool
        saw.threads

Odbc driver returned an error (SQLDriverConnectW).
State: HY000.  Code: 10058.  [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred.
[nQSError: 12008] Unable to connect to port 9703 on machine LOCALHOST.
[nQSError: 12010] Communication error connecting to remote end point: address = LOCALHOST; port = 9703.
[nQSError: 12002] Socket communication error at call=: (Number=-1) Unknown error 4294967295 (HY000)
---------------------------------------
[oracle@app-srv Config]$
and is connected to previously shown problem with missing rpd.

Now it is time to unpack all files from initially backuped catalog directory. In mine case that was under samplesales directory:
cd $OBI_DATA_HOME/web/catalog/samplesales
unzip samplesales.zip

bounce OBI services

If you setup all in .bashprofile (like in mine case) then you do not need edit $OBI_HOME/setup/user.sh file. Otherwise do so as stated there

If you login to Dashboard through WEB and get error like:
500 Internal Error: - servlet error: An exception occurred. The current application deployment descriptors do not allow for including it in this response. Please consult the application log for details. 
Then problem is with port, which is fixed as:
1. vi $OBI_HOME/oc4j_bi/j2ee/home/applications/analytics/analytics/WEB-INF/web.xml
2. Replace the port as 9703 instead of 9710
3. run next statements
run-sa.sh stop 
wait for 10 seconds 
run-saw.sh stop 
wait for 10 seconds 
run-sa.sh start 
run-saw.sh start. 
Now click on the application Dashboard. It will work fine.

If you have upgrade oc4j then do not forget to change password after first start.
[oracle@app-srv ~]$ oc4j -start
Starting OC4J from /usr/local/OracleBI/oc4j_bi/j2ee/home ...
Mar 16, 2012 9:28:37 PM com.evermind.server.XMLDataSourcesConfig parseRootNode
INFO: Legacy datasource detected...attempting to convert to new syntax.
12/03/16 21:28:37 Set OC4J administrator's password (password text will not be displayed as it is entered)
Enter password:
Confirm password:
The password for OC4J administrator "oc4jadmin" has been set.
12/03/16 21:29:03 The OC4J administrator "oc4jadmin" account is activated.
Before making any change to next file do make a backup.
cd $OBI_DATA_HOME/web/config/
mkdir originals
cp -p *.* originals
vi $OBI_DATA_HOME/web/config/instanceconfig.xml 


   AnalyticsWeb


  
    1500
    2500
    5000000
    3000
  
300000
2000000
   AnalyticsWeb

Setup BI Publisher

When you start to setup BI publisher settings you might find next bugs (errors).

Missing Admin tab in Publisher

On first use in Publisher WEB page you'll find that Admnin tab is missing.
vi $OBI_HOME/xmlp/XMLP/Admin/Configuration/xmlp-server-config.xml


change to

Superuser setting

Alse check whether you have SUPERUSER_PASSWORD and SUPERUSER_USERNAME set (Administrator in default case).


Check for Administrator role

Check whether you the Administrator Role mapping is enabled there.
vi $OBI_HOME/xmlp/XMLP/Admin/Security/principals.xml


In XML Publisher (http://app-srv:9704/xmlpserver/servlet/report), under Admin tab make changes that reflect your environment:

For OCI database connection DWH check existence in $TNS_NAMES/tnsnames.ora file.

Admin>JDBC-add proper connection

Admin>Server Configuration

  • System Temporary Director->/var/tmp
  • Output Formats->Check all except MHTML

Admin>Runtime Configuration

  • Enable multithreading->true
  • Thread count-> nr of cores (4)
  • Enable scalable feature of XSLT processor->True
  • Enable XSLT runtime optimization->True
  • CSV delimiter->TAB(\t)

Add additional fonts

If you wish to install own fonts, place them (as root) in
cp -p arial*.ttf $JAVA_HOME/jre/lib/fonts
cd $JAVA_HOME/jre/lib/fonts
chown oracle:dba arial*.ttf
chmod 755  arial*.ttf
Admin>Font Mappings interface
Under RTF Templates set 4 times "Arial" for each font

Bounce OBI services and test some Answers or ready made BI Publisher report.

Create OBI start/stop script (boot start) on target server

Last, create start/stop/statu script which will run on boot as well as on demand. here is source:
#!/bin/sh 
#
# File   : obiee
# Purpose: Start and stop Oracle Business Intelligence 10g components
#          on CentOS 5.8 x86
#
# Author : Damir Vadas, TEB Informatika 2012
#               
#          cp -p obiee /etc/init.d
#          chmod +x /etc/init.d/obiee
#          ln -s /etc/init.d/obiee /etc/rc.d/rc5.d/S50obiee
#          ln -s /etc/init.d/obiee /etc/rc.d/rc5.d/K50obiee
#          ln -s /etc/init.d/obiee /home/oracle/obiee 
#        

if [ "$USER" != "oracle" ]; then
  OBI_HOME=/oracle/product/obi10g/OracleBI
  OBI_DATA_HOME=/oracle/product/obi10g/OracleBIData
fi

case "$1" in 
start) 
echo "Starting Oracle BI services in 3 steps ..." 
echo `date`
echo "Pokrecem oc4j (1/3) ... Trajanje 20-ak sek"
if [ "$USER" = "oracle" ]; then 
  oc4j -start > /dev/null 2>&1 &
else
  su - oracle -c "oc4j -start > /dev/null 2>&1 &"
fi
sleep 15
echo "--------------------------------------------------"
echo "Pokrecem nqsserver server (2/3) ... Trajanje cca 1-1.5 minuta."
if [ "$USER" = "oracle" ]; then 
  run-sa.sh start 
else
  su - oracle -c "run-sa.sh start" 
fi
sleep 15
echo "--------------------------------------------------"
echo "Pokrecem saw server (3/3) ... Trajanje cca 1 minuta."
if [ "$USER" = "oracle" ]; then 
  run-saw.sh start
else
  su - oracle -c "run-saw.sh start"
fi
sleep 15
echo "--------------------------------------------------"
echo `date`
;; 
stop)
echo `date`
echo "--------------------------------------------------"
echo "Spustam saw server (1/3)"
if [ "$USER" = "oracle" ]; then 
  run-saw.sh stop
else
  su - oracle -c "run-saw.sh stop"
fi
tail $OBI_DATA_HOME/web/log/javahost.out.log
sleep 5
echo "--------------------------------------------------"
echo "Spustam nqsserver server (2/3)"
if [ "$USER" = "oracle" ]; then 
  run-sa.sh stop
else
  su - oracle -c "run-sa.sh stop"
fi
sleep 15
echo "--------------------------------------------------"
echo "Spustam oc4j (3/3)"
if [ "$USER" = "oracle" ]; then 
  oc4j -shutdown -port 23971 -password oc4jadmin
else
  su - oracle -c "oc4j -shutdown -port 23971 -password oc4jadmin"
fi
sleep 3
kill -9 `ps auwwwx | grep [o]c4j | awk '{print $2}' | xargs`
echo `date`
;;
status)
echo "----- JAVA proceses ------------------------------"
echo `ps -ef|grep [j]ava`
echo "=================================================="
echo " "
echo "------ NQSERVER ----------------------------------"
ps -ef|grep [n]qsserver
tail -n 5 $OBI_HOME/server/Log/NQServer.log
echo "=================================================="
echo " "
echo "------ SAW SERVER --------------------------------"
ps -ef|grep [s]awserver
tail -n 5 $OBI_DATA_HOME/web/log/sawserver.out.log
echo "=================================================="
echo " "
;;
*) echo "Usage: $0 start|stop|status" 
exit 1 
;; 
esac 
exit 0 

The end

Hope this helps someone as me once...

Cheers!

No comments :

Post a Comment

Zagreb u srcu!

Copyright © 2009-2018 Damir Vadas

All rights reserved.


Sign by Danasoft - Get Your Sign