Repository Creation Utility for FMW in Silent Mode
Recent developments in Oracle FMW 12.2.1 gives more changes in the RCU execution as well. Here I am using the e-delivery SOA Suite which is hosted on top of Infrastructure.
New Learnings -- The component list increased and changed the sequence MDS, OPSS, IAU_APPEND, IAU_VIEWER, IAU, WLS, UCSUMS, SOAINFRA
Assumptions: Create SOAADM user with SYSDBA role. You might use a different ORACLE_HOME installation path. Instead of entering the many passwords in the passwordfile.txt we can use the same password for all schema users which can be done with -useSamePasswordForAllSchemaUsers option.
|
The Oracle Fusion Middleware Repository Creation Utility in silent mode |
For automation or usage in containerization, this would be preferable option.
export ORACLE_HOME=/home/oracle/products/12.2.1/Oracle_Home
clear
export RCU_HOME=$ORACLE_HOME/oracle_common
export RCU_LOG_LOCATION=$RCU_HOME/rcu/log
CONNSTR='192.168.33.17:1521:orcl12c'
PASS_INPUT="passwdfile.txt"
echo "Running RCU for SOA Suite"
$RCU_HOME/bin/rcu -silent -createRepository -useSamePasswordForAllSchemaUsers true -databaseType ORACLE \
-connectString $CONNSTR \
-dbUser SOAADM-dbRole SYSDBA \
-schemaPrefix DEV \
-component MDS \
-component OPSS \
-component IAU_APPEND \
-component IAU_VIEWER \
-component IAU \
-component WLS \
-component UCSUMS \
-component SOAINFRA \
-f < $PASS_INPUT
echo $?
RUNNING REPOSITORY CREATION UTILITY on FMW 12.1.3 in Silent mode
First, connect as sys then create the user for SOA as SOADEMO user. then next step is to grant the privileges - connect, resource (optional), SYSDBA(must have) for SOADEMO database user You need the same as SYS Privileges. You cannot proceed without this in most of the Production environments.
When you run rcu utility, it has two options to execute:
1. Silent mode
2. GUI mode
In both cases, it will ask for DB host, port, sid, SYS username, password.
Now this RCU is a big giant sql script(s), that creates Schema, Tablespaces, Users, Tables, Views, Sequences, etc. Hence RCU needs SYS details.
you can run RCU from any OS like Windows very simple because it uses GUI when you use remote Linux box then you feel OMG!! Again for this we have two options using Xwindows running remote machine windows in your system using third party software like hamming bird Exceed or XMing, moboXterm. Another option using -silent option.So in your learning purpose or to quickly test for POC use Windows.
Preparation for running RCU
- Oracle XE on Vagrant Ubuntu box RAM 1024MB with a hostonly IP
- FMW RCU zip file with enough diskspace minimum 20GB
Here is my Vagrantfile modifications snippet that suites your RCU basic setup needs for you :
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "precise64"
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
config.vm.hostname = "oracle.vybhava.com"
config.vm.synced_folder ".", "/home/vagrant/vagrant-ubuntu-oracle-xe", :mount_options => ["dmode=777","fmode=666"]
config.vm.network "private_network", ip: "192.168.33.115"
config.vm.network :forwarded_port, guest: 1521, host: 1521
config.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id,
"--name", "oracle",
# Oracle claims to need 512MB of memory available minimum
"--memory", "1024",
# Enable DNS behind NAT
"--natdnshostresolver1", "on"]
end
After the above snippet remaining code in the Vagrant file let it be the same!
Now execute the vagrant up command to keep running the Oracle XE DB on precise Ubuntu.
F:\workspace-wls\vagrant-ubuntu-oracle-xe>vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
default: Adapter 2: hostonly
==> default: Forwarding ports...
default: 1521 => 1521 (adapter 1)
default: 22 => 2222 (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
default: Warning: Connection timeout. Retrying...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
default: The guest additions on this VM do not match the installed version of
default: VirtualBox! In most cases this is fine, but in rare cases it can
default: prevent things such as shared folders from working properly. If you see
default: shared folder errors, please make sure the guest additions within the
default: virtual machine match the version of VirtualBox you have installed on
default: your host and reload your VM.
default:
default: Guest Additions Version: 4.2.0
default: VirtualBox Version: 4.3
==> default: Setting hostname...
==> default: Configuring and enabling network interfaces...
==> default: Mounting shared folders...
default: /tmp/vagrant-puppet-3/modules-0 => F:/workspace-wls/vagrant-ubuntu-oracle-xe/modules
default: /tmp/vagrant-puppet-3/manifests => F:/workspace-wls/vagrant-ubuntu-oracle-xe/manifests
default: /home/vagrant/vagrant-ubuntu-oracle-xe => F:/workspace-wls/vagrant-ubuntu-oracle-xe
==> default: Machine already provisioned. Run `vagrant provision` or use the `--provision`
==> default: to force provisioning. Provisioners marked to run always will still run.
All you need here are : db host, port, sid, SYS username, SYS password. Thats all!
sqlplus sys as sysdba
manager -- password
SQL> CREATE USER SOADEMO IDENTIFIED BY welcome1;
User created.
SQL> grant connect, resource to SOADEMO;
Grant succeeded.
SQL> grant SYSDBA to SOADEMO;
Grant succeeded.
SQL> Disconnected from Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production
Now press Ctrl+D - disconnect from the sqlplus
vagrant@oracle:~$ sqlplus soademo as sysdba
SQL*Plus: Release 11.2.0.2.0 Production on Sun Aug 16 01:56:50 2015
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Enter password:
Connected to:
Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production
SQL> show user
USER is "SYS"
If we want to use Oracle as a database, then we should update the database parameters once after the installation.
Set the SESSION, PROCESSES parameter to >=200 using the following instructions.
show parameter session
show parameter processes
alter system reset sessions scope=spfile sid=’*’;
alter system set processes=200 scope=spfile;
shutdown immediate
startup
show parameter session
show parameter processes
Running RCU for SOA Schema from Shell Script
Here is my generic approach for silent mode installation command-line options kept in a shell script.
Unzip RCU file
In precise Ubuntu unzip command didn't worked, then installed the unzip
sudo apt-get install unzip
Now we can unzip the rcu file...
vagrant@mydev:~$ unzip /u01/app/software/SOA/ofm_rcu_linux_11.1.1.7.0_64_disk1_1of1.zip -d .
Archive: /u01/app/software/SOA/ofm_rcu_linux_11.1.1.7.0_64_disk1_1of1.zip
inflating: ./readme.html
creating: ./rcuHome/
The shell script uses silent mode installation for SOA Suite 11.1.1.7.0 schemas.
#!/bin/bash
# FileName : createRCU.sh
# Description : This script is used to run the rcu in silent mode
# Sample is for SOA product which will work for MDS, ORASDPM, SOAINFRA, BAM
# Author : Pavan Devarakonda
#
clear
export RCU_HOME=/home/vagrant/rcuHome
export RCU_LOG_LOCATION=$RCU_HOME/rcu/log
CONNSTR='192.168.33.115:1521:XE'
PASS_INPUT="passwdfile.txt"
echo "Running RCU for SOA Suite"
$RCU_HOME/bin/rcu -silent -createRepository -databaseType ORACLE \
-connectString $CONNSTR \
-dbUser SOADEMO -dbRole SYSDBA \
-schemaPrefix DEV \
-component MDS \
-component ORASDPM \
-component SOAINFRA \
-component BAM -f < $PASS_INPUT
echo $?
The passwdfile.txt contains pasword for the SYSBA user then for the remaining component wise passwords given in each line.
welcome1
welcome1
welcome1
welcome1
welcome1
The RCU script execution is as follows:
vagrant@mydev:~$ ./creatercu.sh
Running RCU for SOA Suite
Failed to initialize logger with location :/home/vagrant/rcuHome/rcu/log/logdir.2015-08-16_09-59/rcu.log
Initializing logger using the following location :/tmp/logdir.2015-08-16_09-59/rcu.log
Processing command line ....
Repository Creation Utility - Checking Prerequisites
Checking Global Prerequisites
The database you are connecting is not a supported version. Refer to the certification matrix for supported DB versions.
Repository Creation Utility - Checking Prerequisites
Checking Component Prerequisites
Repository Creation Utility - Creating Tablespaces
Validating and Creating Tablespaces
Repository Creation Utility - Create
Repository Create in progress.
Percent Complete: 0
Percent Complete: 5
Percent Complete: 10
Percent Complete: 10
Percent Complete: 31
Percent Complete: 31
Percent Complete: 34
Percent Complete: 37
Percent Complete: 40
Percent Complete: 40
Percent Complete: 51
Percent Complete: 51
Percent Complete: 54
Percent Complete: 57
Percent Complete: 57
Percent Complete: 69
Percent Complete: 69
Percent Complete: 72
Percent Complete: 75
Percent Complete: 75
Percent Complete: 87
Percent Complete: 100
Repository Creation Utility: Create - Completion Summary
Database details:
Host Name : 192.168.33.115
Port : 1521
Service Name : XE
Connected As : SOADEMO
Prefix for (prefixable) Schema Owners : DEV
RCU Logfile : /tmp/logdir.2015-08-16_09-59/rcu.log
Component schemas created:
Component Status Logfile
Metadata Services Success /tmp/logdir.2015-08-16_09-59/mds.log
SOA Infrastructure Success /tmp/logdir.2015-08-16_09-59/soainfra.log
Business Activity Monitoring Success /tmp/logdir.2015-08-16_09-59/bam.log
User Messaging Service Success /tmp/logdir.2015-08-16_09-59/orasdpm.log
Repository Creation Utility - Create : Operation Completed
0
SQL confirmation
Now its validation time, run the following SQL command to check whether all SOA component schema are created :
SELECT comp_name, owner, version FROM schema_version_registry;
OFMW Product wise RCU component selection
- SOA/OSB - SOAINFRA, ORASDPM, BAM by default you will be get MDS
You can see all RCU schema scripts available
vagrant@mydev:~/rcuHome/rcu/integration$ ls
activities biscorecard commssds ess jive-crawler oid rtd
apm biserver contentserver11 iau mds oif sdpm
bam bishiphome contentserver11search iauoes oaam oim sn
biplatform common dc ipm oam opss soainfra
bipublisher commsls deploymentserver irm odi portal urm
bischeduler commspresence epm jive oes portlet webcenter
Troubleshooting RCU issue
You might encounter some of the RCU Level errors. one of them addressed here.
Processing command line ....
Invalid username/password.
Please enter valid username/password
RCU-6090:Skipping Main operation: Failed in Connection step validation
1
Solution:
When connection failed please double check your database user must have SYSDBA role and the passwd for this user can be passed first then for other schemas.
Reference: