Showing posts with label RCU for OAS. Show all posts
Showing posts with label RCU for OAS. Show all posts

Saturday, July 4, 2020

Run RCU for Oracle Analytics Server in Silent Mode

Namste!!! 🙏Welcome to My FMW Experiments blog!!! This is the "Learning OracleAnalyticsServer Administering series -3". If you are first time visitor please have a look on the series posts:

In this post, I would like to share the run RCU against Oracle Analytics Server. The creation of a Repository using rcu utility made much flexible and easier than ever before. Generally, the rcu works in two options GUI mode and command line silent mode. Automations required the second option that is the silent mode,

Prerequisites

  • Oracle Database (19c used in this experiemnt)
  • SYSDBA Role user created to run the RCU

Assumption:
Oracle database is started and ready to use, that is service which is used for this experiment is PDB that is ON status.

Run RCU for Oracle Analytics Server in Silent mode


1. Creating OAS Repositories

a. Create a DB User for OAS RCU execution

Creation of DBA user to run RCU a. Connect to the Target DATABASE with DBA role
sqlplus sys/manager@ORCLPDB1 as sysdba
then after connected run the following to create another DBA Role user.
CREATE USER OASDEMOUSR IDENTIFIED BY welcome1;
grant connect, resource to OASDEMOUSR;
grant SYSDBA to OASDEMOUSR;

b. Running the RCU to create a repository for OAS

 We can use create the repository with the following parameter.
  • Database Host, Port, and Service Name to form a connection  string
  • A DB user that have SYSDBA role
  • The PREFIX that will be separate from all other schemas
  • The schema names used for OAS are:
    1. STB         
    2. IAU_APPEND  
    3. OPSS        
    4. BIPLATFORM  
    5. IAU         
    6. MDS         
    7. IAU_VIEWER  
    8. WLS         
#!/bin/bash
##########################################################################
# FileName      :   createRCU.sh
# Description   :   This script is used to run the rcu in silent mode
#                   Sample is for OAS product which will work for MDS, ORASDPM, SOAINFRA, BAM
# Author        :   Pavan Devarakonda
##########################################################################

RCU_HOME=$MW_HOME/oracle_common/bin
RCU_LOG_LOCATION=/tmp/logs
read -p "Please enter Database Host" DBHOST
read -p "Please enter Database PORT" DBPORT
read -p "Please enter DB SCHEMA"  SERVICE
read -p "Please enter DB USER" DBUSER
read -p "Please enter RCU PREFIX" PREFIX
#CONNSTR='192.168.33.250:1521:ORCLPDB1'
CONNSTR="$DBHOST:$DBPORT:$SERVICE"
PASS_INPUT="passwdfile.txt"
 
echo "Running RCU for OAS BI Platform"
$RCU_HOME/rcu -silent -createRepository -databaseType ORACLE \
-connectString $CONNSTR \
-dbUser $DBUSER -dbRole SYSDBA \
-schemaPrefix $PREFIX \
 -component MDS \
 -component STB \
 -component WLS \
 -component BIPLATFORM \
 -component IAU_VIEWER \
 -component IAU_APPEND \
  -component IAU \
 -component OPSS -f < $PASS_INPUT
echo "RCU Execution Status: " $?
Screenshot 1:
RCU for OAS Output

c. Validation of RCU Schemas on the Database

Connect to the target database machine via sqlplus or SQLDeverloper tool. Run the following all settings and formatting commands in the sqlplus, for SQLDeveloper you don't need to set or format only execute the SQL Query to get all RCU schema status.

column COMP_NAME format a35
column OWNER format a20
column VERSION format a20
set pagesize 100
SELECT comp_name, owner, version FROM schema_version_registry WHERE OWNER LIKE '%DEV%';
Screenshot 2: RCU VALIDATION FOR OAS


2. List of RCU created Schema

To fetch the list of schemas from the Database you can run the following to confirm. 
The example shows the list of OAS specific schema names

rcu -silent -listSchemas -connectString 192.168.33.250:1521:ORCLPDB1 -dbUser OAS_USER -dbRole sysdba
List of RCU Schema for Oracle Analytics Server


3. Dropping Repository for OAS


To drop the repository schemas for OAS from the database you need to provide the following inputs
a. Database connection string
b. Database username
c. The PREFIX that used for creating a OAS repository
d. prompts for the database user password which as used to create


#!/bin/bash
##########################################################################
# FileName      :   drop_rcu.sh
# Description   :   This script is used to run the rcu droprepository in silent mode
#                   Sample is for OAS product which will work for MDS, ORASDPM, SOAINFRA, BAM
# Author        :   Pavan Devarakonda
##########################################################################

RCU_HOME=$MW_HOME/oracle_common/bin
RCU_LOG_LOCATION=/tmp/logs
read -p "Please enter Database Host:" DBHOST
read -p "Please enter Database PORT:" DBPORT
read -p "Please enter DB SERVICE:"  SERVICE
read -p "Please enter DB USER:" DBUSER
read -p "Please enter RCU PREFIX:" PREFIX
#CONNSTR='192.168.33.250:1521:ORCLPDB1'
CONNSTR="$DBHOST:$DBPORT:$SERVICE"
#PASS_INPUT="passwdfile.txt"

echo "Running RCU for drop OAS Repository"
$RCU_HOME/rcu -silent -dropRepository -connectString $CONNSTR \
 -dbUser $DBUSER -dbRole SYSDBA \
 -schemaPrefix $PREFIX \
 -component MDS \
 -component STB \
 -component WLS \
 -component BIPLATFORM \
 -component IAU_VIEWER \
 -component IAU_APPEND \
  -component IAU \
 -component OPSS
 echo "RCU Execution Status: " $?
  
The dropping repository for OAS the last screen shot as follows:
Dropping repository for OAS



Troubleshooting points for RCU

While running the RCU for OAS got the following error:


ERROR assistants.common.dbutil.jdbc.JDBCEngine: oracle.sysman.assistants.common.dbutil.jdbc.JDBCEngine::onException: SQLException: ORA-00059: maximum number of DB_FILES exceeded
Solution:
First assess how many are in the system level parameters, if they are in PDB multi-tenant system check at CDB level. Increase it if it is at default value 200, change to 1000 suggested for multiple OAS environments are hosted on the same Database.

What next target post on OAS?

  • Configure OAS Domain
  • OAS domain start and stop services 

Thanks for being with me! Share with your teams and friends, Keep writing your comments how do you feel about this?

Oracle Document References: 

Thursday, May 7, 2020

Troubleshooting: Installation and Configurations of FMW

Issue#1: CFGFWK-60324: Location is not a directory

Domain Configuration time issue


Solution:


Check the domain path which you enter already in use or correct one.

Issue #2: some system prerequisites failed



Extracting the installer . . . . . . . . . . . . . . . . . . Done
Checking if CPU speed is above 300 MHz.   Actual 2194.910 MHz    Passed
Checking swap space: must be greater than 512 MB.   Actual 0 MB    Failed <<<<
Checking if this platform requires a 64-bit JVM.   Actual 64    Passed (64-bit not required)
Checking temp space: must be greater than 300 MB.   Actual 11624 MB    Passed

Some system prerequisite checks failed.
You must fulfill these requirements before continuing.
The log is located here: /tmp/OraInstall2020-05-06_11-54-32PM/launcher2020-05-06_11-54-32PM.log.

To Fix this simple you look in to the above output, what check it got failed that is shown with "Failed <<<<" Just use at the end -ignoreSysPrereqs
   java -jar  /u02/fmw_12.2.1.3.0_infrastructure.jar -silent -responseFile /u02/fmw12213_infra.rsp -invPtrLoc /u02/oraInst.loc -ignoreSysPrereqs

Issue: the error message: java.io.IOException: Error writing to server

Navigate to bitools 
cd /opt/domains/bi_domain/bitools/bin
$ ./datamodel.sh uploadrpd -I /tmp/TEMPDIR/new_rpd/Sample.rpd -W MyRPDPassword \
-u weblogic -SI ssi -s localhost
Password:
Post uploadrpd REST with url: http://localhost:9502/api/lcm/v1/si/ssi/rpd/uploadrpd
Please check server logs, such as bi-lcm-rest.log.0 and obis1-diagnostic.log.. or refer to the error message: java.io.IOException: Error writing to server

Fix:
Check whether your bi_domain or OAS domain have the internal SSL enabled if yes, you can handle it two choices:
1. Create Keystore type as  KSS trust store and trust password
2. Disable the SSL from the bi_domain


  ./stop.sh
  ./start.sh
  ./status.sh
  
  ./ssl.sh internalssl false 
  
Now try the RPD deployment.

ODI Studio issue: 

Caused by: org.osgi.framework.BundleException: Exception in org.eclipse.osgi.framework.internal.core.SystemBundleActivator.start() of bundle org.eclipse.osgi.

The fix is here: 
In UNIX/Linux machine: Navigate to $HOME/.odi directory (.odi is a hidden directory).
Delete the "system<ODI version>" folder, with <ODI version> corresponding to your version of ODI, using:
rm -rf system ODIversion e.g ystem12.2.1.3.0
No worry it is just a cache folder

For example, for ODI 12.2.1.3.0, delete "system12.2.1.3.0".
 
Now you can restart ODI Studio by running 

cd $ODI_HOME/studio; ./odi.sh

A new folder system<ODI version> will be created in the home directory.

ODI-1424: Agent host or port cannot be reached

Issue: <ODI-2013> <Ping to agent OracleDIAgent failed with "oracle.odi.runtime.agent.invocation.InvocationException: 
ODI-1424: Agent host or port cannot be reached using

Fix: 
  1. Open the Oracle Data Integrator Studio (odi.sh in the Linux from VNC Viewer) In the left pane : Navigate to Topology >> Agent> oraclediagent
  2. Now check the WebLogic managed server connecting host, port values entered correctly or not if there is mismatch then update it. 
  3. Validate by Test Connection

Issue : CFGFWK-64062: Invalid Template - Parsing The Config-nodemanager.xml Failed!

After upgrade of the domain from FMW 12.1.3 to FMW 12.2.1 in place upgrade completed but the domain remains in the same old FWM installed path. 
To resolve this I've used following steps:
1. Using Configbuilder tool to create mydomain_template.jar 
2. Using config.sh that is configuraiton wizard created domain using 'Custom template" that was created in step 1. 
 
But it got the issue with reading domain template saying that " in loading config-nodemanager.xml file"
Solution:
As a workaound, remove the config-nodemanager.xml file from the generated template jar, then use that template to create a new domain.
 mkdir temp_jar; cd temp_jar # copy template jar here
  jar xvf mydomain_template.jar
  rm config-nodemanager.xml mydomain_template.jar
  jar cvf mydomain_template.jar ./* 
  

Issue boot properties not found for a managed server

If the managed server unable to start when there is no boot.properties found then it get failed to start. Solution: As a workaround for copy the security folder from the AdminServer copy to the managed server folder.
cp ../servers/AdminServer/security ../servers/ODI_server1/ -r
  ls -l ../servers/ODI_server1/
  

How to get the RCU DB Schema Password using WLST?

This is simple execute the $MW_HOME/oracle_common/common/bin/wlst.sh script to enter into WLST  shell. 

Simple 3 steps you need to perform.
  1. get the domain path into a variable 'domain'
  2. using the domain get the service
  3. Using the Weblogic security library run the decrypt function on service
  4. finally, print the clear text password

 domain = "/opt/12.1.3_odi_home/user_projects/domains/base_domain"
 service = weblogic.security.internal.SerializedSystemIni.getEncryptionService(domain)
 encryption = weblogic.security.internal.encryption.ClearOrEncryptedService(service)
 print encryption.decrypt("{AES}ysA9HONq3bVSNMvndUg2zLTnMkn93NQC6kk2BJDOC5g=")
 exit()
Note: The encrypted line picked from the WebLogic config.xml file.
WLST Decrypt