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: 

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.