Tuesday, June 27, 2017

Migrate OBIEE 11g instance to OBIEE 12c.

This step will migrate Catalog, rpd and security components from 11g to 12c. 

export ORACLE_HOME=/test1ap/obiee/fmw/Middleware_11g/Oracle_BI1
export JAVA_HOME=/test1ap/obiee/fmw/jdk1.8.0_111
export PATH=$ORACLE_HOME/bin:$JAVA_HOME/bin:$PATH


create a migration tool jar file from target server.

cd $ORACLE_HOME/user_projects/domains/bi/bitools/bin
-bash-4.1$  ./migration-tool.sh package bi-migration-tool.jar 

copy the migration tool jar file to 11g server or domain to create export jar of it 
-bash-4.1$ scp bi-migration-tool.jar vikas@test1ap.dev.com:$HOME on 11g server change the permission to 777 of bi-migration-tool.jar -bash-4.1$ chmod 777 bi-migration-tool.jar 

-bash-4.1$ java -jar bi-migration-tool.jar out $ORACLE_HOME /test1ap/obiee/fmw/Middleware_11g/user_projects/domains/bifoundation_domain1 /test1ap/obiee/obiapp/export12c.jar

Oracle BI Migration Tool

Logging to: /test1ap/obiee/fmw/Middleware_11g/user_projects/domains/bifoundation_domain1/bilogs/migration/migration-2016-03-03-18-21-18.log
Performing export with top-level install directory /test1ap/obiee/fmw/Middleware_11g, domain home=/test1ap/obiee/fmw/Middleware_11g/user_projects/domains/bifoundation_domain1, output file = /test1ap/obiee/obiapp/export12c.jar
Removed the node credstore
Removed the node keystore
Find the policy store node policystore.xml
Removed the node audit
Removed the node trust
Removed the node pdp.service
Removed the node attribute
Removed the node idstore.ldap
true-
Successfully created file /test1ap/obiee/fmw/Middleware_11g/user_projects/domains/bifoundation_domain1/config/fmwconfig/jps-config-migration.xml
Migration policy store executed successfully: [policyStore, /test1ap/obiee/fmw/Middleware_11g/user_projects/domains/bifoundation_domain1/config/fmwconfig/jps-config-migration.xml, default, policystore_dest_context]
Export succeeded
Migration action succeeded

copy the export jar file to 12c server.

-bash-4.1$ scp export12c.jar vikas@test12c.dev.com:/tmp

-bash-4.1$ export TZ='UTC'     -  if you are working on Linux server.

stop obiee server using stop.sh located in $ORACLE_HOME/user_projects/domains/bi/bitools/bin
Before import, find the service instance name. By default it is ssi and mine too.

Import jar file into 12c providing permission of 777 to jar file (export12c.jar)
-bash-4.1$ ./migration-tool.sh in /tmp/export12c.jar ssi 


Start bi server using start.sh
 -bash-4.1$ ./start.sh

Tune OBIEE 12c Admin and Managed server JVM Heap size.

This doc is to tune 64bit Java Virtual Machines (JVM) for Admin and BI server of OBIEE 12c.

To increase Admin Server Heap size.


create a backup of setStartupEnv.sh in $Oracle_Home/user_projects/domains/bi12c/bin  
Edit setStartupEnv.sh and update to the following lines highlighted in bold
inside "${STARTUP_GROUP}" = " AdminServerStartupGroup" section  of  # Startup parameters for STARTUP_GROUP AdminServerStartupGroup"   

# 64 bit JVM memory settings
SERVER_MEM_ARGS_64="-Xms1024m -Xmx2048m"
export SERVER_MEM_ARGS_64
SERVER_MEM_ARGS_64HotSpot="-Xms1024m -Xmx2048m"
export SERVER_MEM_ARGS_64HotSpot
SERVER_MEM_ARGS_64JRockit="-Xms1024m -Xmx2048m"
export SERVER_MEM_ARGS_64JRockit

To increase Managed Server (bi_server1) Server Heap size.

Backup setStartupEnv.sh in $Oracle_Home/user_projects/domains/bi12c/bin

 "update to the following lines highlighted in bold
inside "${STARTUP_GROUP}"="BISUITE-MAN-SVR"" section of     # Startup parameters for STARTUP_GROUP BISUITE-MAN-SVR" 

# 64 bit JVM memory settings
SERVER_MEM_ARGS_64="-Xms1024m -Xmx8192m"
export SERVER_MEM_ARGS_64
SERVER_MEM_ARGS_64HotSpot="-Xms1024m -Xmx8192m"
export SERVER_MEM_ARGS_64HotSpot
SERVER_MEM_ARGS_64JRockit="-Xms1024m -Xmx8192m"
export SERVER_MEM_ARGS_64JRockit"  

Once done restart the server using (stop.sh and start.sh)  from $Oracle_Home/user_projects/domains/bi12c/bitools/bin.

Migrate application roles in OBIEE 11g

Create a xml file (jps-config.xml) for the migration purpose. change the file locations as per your  understanding.


Below are the steps to be performed on target server. - copy your source  system-jazn-data.xml in /tmp/src    -- from source server or Domain.
- copy your taget system-jazn-data.xml in /tmp/tgt
- provide 777 to /tmp/src and /tmp/tgt 
- create a backup of the target system-jazn-data.xml. you can get it from  $DOAMIN_HOME/config/fmwconfig/system-jazn-data.xml

create a xml file named jps-config.xml and place the below xml  contents in it, be sure modify the location of the files as per according.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<jpsConfig xmlns="http://xmlns.oracle.com/oracleas/schema/11/jps-config-11_1.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.oracle.com/oracleas/schema/11/jps-config-11_1.xsd"
schema-major-version="11" schema-minor-version="1">
<!-- This property is for jaas mode. Possible values are "off", "doas" and "doasprivileged" -->
<property name="oracle.security.jps.jaas.mode" value="off"/>
 <propertySets>
<!-- SAML Trusted Issuer -->
<propertySet name="saml.trusted.issuers.1">
<property name="name" value="www.oracle.com"/>
</propertySet> </propertySets>
 <serviceProviders>
<serviceProvider type="POLICY_STORE" name="policystore.xml.provider" class="oracle.security.jps.internal.policystore.xml.XmlPolicyStoreProvider"> <description>XML-based
 PolicyStore Provider</description> </serviceProvider> </serviceProviders>
 <serviceInstances>
 <!-- JPS XML Policy Store Service Instance -->
<serviceInstance name="srcpolicystore.xml" provider="policystore.xml.provider" location="/tmp/src/system-jazn-data.xml">
<description>File Based Policy Store Service Instance</description>
</serviceInstance>
 <serviceInstance name="policystore.xml" provider="policystore.xml.provider" location="/tmp/tgt/system-jazn-data.xml">
<description>File Based Policy Store Service Instance</description>
</serviceInstance>
 </serviceInstances>
 <jpsContexts default="default">
<!-- This is the default JPS context. All the mandatory services and Login Modules must be configured in this default context -->
<jpsContext name="sourceFileStore">
<serviceInstanceRef ref="srcpolicystore.xml"/>
</jpsContext> <jpsContext name="targetFileStore">
<serviceInstanceRef ref="policystore.xml"/>
</jpsContext>
</jpsContexts>
</jpsConfig> 


Invoke wlst prompt.

$MIDDLEWARE_HOME/oracle_common/common/bin/wlst.sh

Connect to Admin server.
connect ('weblogic','Welcome1','t3://testbiserver.dev.com:34201')

Migrate application roles.
migrateSecurityStore(type="policystore", configFile="/tmp/jps-config.xml", src="sourceFileStore", dst="targetFileStore")

move system-jazn-data.xml from /tmp/tgt to $DOAMIN_HOME/config/fmwconfig   on target location.

Automate Cache purge for OBIEE 12c.

-- create a shell script file

#!/bin/bash

TODAY=$(date)
HOST=$(hostname)
echo "-----------------------------------------------------------------"
echo "Date: $TODAY                     Host: $HOST"
echo "-----------------------------------------------------------------"

/test1ap/obiee/fmw/Middleware_12c/user_projects/domains/bi12c/bitools/bin/nqcmd.sh -d AnalyticsWeb -u vikas -p Welcome1  -s /test1ap/obiee/obiadmin/scripts/purge_cache.txt

echo "Please find attached Cache purge log from Test server." |mailx -s "BI Test server Cache purge status." -a "/test1ap/obiee/obiapp/scripts/BIEE_test1_purge_cache.log"  vikas@test.com

-- Create a txt file (purge_cache.txt) for the command for the purge cache.

call SAPurgeAllCache()

-- provide 777 permission to all of the 2 files (sh and txt file).
-- schedule cron job.

/test1ap/obiee/obiapp/scripts/purge_cache.sh &> /test1ap/obiee/obiapp/scripts/BIEE_test1_purge_cache.log

Modify OBIEE 11g Login page banner of an instance for the lang English.

copy $ORACLE_HOME/bifoundation/web/msgdb/l_en/messages/productmessages.xml to $INSTANCE_HOME/bifoundation/OracleBIPresentationServicesComponent/coreapplication_obips1/msgdb/l_en/customMessages

if the below mentioned directory doesn't exists please create it.

msgdb/l_en/customMessages

edit productmessages.xml

-- To edit Login banner
change xml tag <WebMessage name="kmsgHeaderBIBrandName"><TEXT>Business Intelligence PROD </TEXT></WebMessage>


-- TO edit Dashboard banner.

<WebMessage name="kmsgProductPortal"><TEXT>Oracle BI Interactive Dashboards PROD</TEXT></WebMessage>

Restart OPMN services.

BAR file migration from BI 12c to upgraded version of 12c or another host.

1. Invoke wlst prompt

/test1ap/obiee/fmw/Middleware_12c/oracle_common/common/bin/wlst.sh

2. Source env. List current BI service instances.


listBIServiceInstances('/test1ap/obiee/fmw/Middleware_12c/user_projects/domains/bi')


3. create export BI Archive file (BAR file) of the source service instance - In this case everything would be exported, use command exportServiceInstance

- Domain Home: e.g. $OBIEE_HOME/user_projects/domains/bi   (in my case domain name is bi12c)
- Service Instance Key:  ssi   (default value is ssi and same in my case too)
- The working directory: -  /test1ap/obiee/obiapp/workdir
- The export directory:  -  /test1ap/obiee/obiapp/exportkdir
- There are then three unused parameters, might be reserved for future.
- Include Catalog Runtime Info: default value is set to ‘false’. Use ‘true’ if you want user info. This parameter is optional.
- Include Credentials: This is a password field to encrypt the database connection credentials in the RPD. This field is optional and if not included the connection credentials are not exported.

exportServiceInstance('/test1ap/obiee/fmw/Middleware_12c/user_projects/domains/bi12c','ssi','/test1ap/obiee/obiapp/workdir','/test1ap/obiee/obiapp/exportdir','','','',true,'Welcome1')

4. Move BAR file to the instance on which it is to be imported.
   
   scp ssi.bar vikas@test23bi.dev.com:/tmp

5. Target env. List current BI service instances.

listBIServiceInstances('/test2ap/obiee/fmw/Middleware_12c1/user_projects/domains/bi')

6. Import BAR file in a service instance - In this case everything would be exported, use command importServiceInstance


- Domain Home: e.g. $OBIEE_HOME/user_projects/domains/bi   (in my case domain name is bi)
- Service Instance Key: ssi (default value is ssi and in my case its same, it might be different)
- BAR file to import: The full path and filename of the BAR file
- Import the RPD?: The default value is true, change to false if not wanted.
- Import the WebCat?:  The default value is true, change to false if not wanted.
- Import the Security model: The default value is true, change to false if not wanted.
- Include Credentials: This is the password used to encrypt the database connection credentials in the RPD. If not provided the connection credentials will not be imported.

importServiceInstance('/test2ap/obiee/fmw/Middleware_12c1/user_projects/domains/bi','ssi','/tmp/ssi.bar',true,true,true,'Welcome1')