STEP BY STEP PROCEDURE OF GI UPGRADE FROM 11.2.0.3 TO 11.2.0.4 USING CLI OR SILENT MODE

Step by step procedure of GI upgrade from 11.2.0.3 to 11.2.0.4 using CLI or SILENT mODE

 

In this section we will guide you how to upgrade the GI using cli.

  • Step 1: Before upgrade the ‘HAS’ shows version 11.2.0.3 for release and software version.

$ crsctl query has releaseversion

Oracle High Availability Services release version on the local node is [11.2.0.3.0]

$ crsctl query has softwareversion

Oracle High Availability Services version on the local node is [11.2.0.3.0]

  • Step 2: Create a directory to for new GI home.

unzip /home/oracle/ora_patch_11_2_0_4/ p13390677_112040_Linux-x86-64_3of7.zip

                  mkdir -p /u01/app/grid/product/11.2.0.4/grid

chown oracle:oinstall -R /u01/app/grid/product/11.2.0.4/grid

chmod -R 755 /u01/app/grid/product/11.2.0.4/grid

  • Step 3: Before installing the new 11.2.0.4 GI check in the /u01/app/oraInventory/ContentsXML/inventory.xml has crs=true against the existing GI home. In some cases, crs=true is missing, usually if GI was installed with software only and later converted to HAS.

            In this case crs=true is missing.

             If there’s no crs=true against the GI home the new version fails to detect the existing  clusterware. You may encounter               the below error while upgrading:
             [FATAL] [INS-40406] The installer detects no existing Oracle Grid Infrastructure software on the  system.
             To resolve this issue, we need to update the inventory information by running the following command specifying the                  existing GI home and crs=true

 

$ cd /u01/app/grid/product/11.2.0/grid/oui/bin/

$ ./runInstaller -updateNodeList ORACLE_HOME=”/u01/app/grid/product/11.2.0/grid” CRS=true

  • Step 4: We will now start the GI upgrade in silent mode from the software location.

$ cd grid

         Set the environment:

 

export ORACLE_HOME=/u01/app/grid/product/11.2.0.4/grid

export PATH=$ORACLE_HOME/bin:$PATH

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

export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib

export ORACLE_SID=+ASM

./runInstaller -silent -ignoreSysPrereqs -ignorePrereq  -responseFile  /home/oracle/ora_patch_11_2_0_4/grid/response/grid_install.rsp  ORACLE_HOME=”/u01/app/grid/product/11.2.0.4/grid” oracle.install.option=”UPGRADE” oracle.install.asm.OSDBA=dba oracle.install.asm.OSOPER=dba oracle.install.asm.OSASM=oinstall

  • Login as root user

# cd /u01/app/grid/product/11.2.0.4/grid/

# ./rootupgrade.sh

           Login as Oracle user

$ cd /u01/app/grid/cfgtoollogs

$ vi /tmp/conf.rsp

oracle.assistants.asm|S_ASMPASSWORD=GPBDASMPWD#

oracle.assistants.asm|S_ASMMONITORPASSWORD=GPBDASMMON#

 

$ . /u01/app/grid/product/11.2.0.4/grid/cfgtoollogs/configToolAllCommands RESPONSE_FILE=/tmp/conf.rsp

  •   Check the log file:

oracle@ORCLDB(+ASM) :/home/oracle# cat /u01/app/grid/product/11.2.0.4/grid/install/root_ORCL_2018-03-19_13-                   45-41.log

              Performing root user operation for Oracle 11g

 

              The following environment variables are set as:

 

               ORACLE_OWNER= oracle
                ORACLE_HOME= /u01/app/grid/product/11.2.0.4/grid
                Copying dbhome to /usr/local/bin …
                Copying oraenv to /usr/local/bin …
                Copying coraenv to /usr/local/bin …
                 Entries will be added to the /etc/oratab file as needed by
                 Database Configuration Assistant when a database is created
                 Finished running generic part of root script.
                 Now product-specific root actions will be performed.
                  Using configuration parameter file:/u01/app/grid/product/11.2.0.4/grid/crs/install/crsconfig_params
                  Creating trace directory
                  ASM Configuration upgraded successfully.
                   Creating OCR keys for user ‘oracle’, privgrp ‘oinstall’..
                   Operation successful.
                   LOCAL ONLY MODE
                   Successfully accumulated necessary OCR keys.
                    Creating OCR keys for user ‘root’, privgrp ‘root’..
                    Operation successful.
                     CRS-4664: Node ORCL successfully pinned.
                      Replacing Clusterware entries in upstart
                      Replacing Clusterware entries in upstart
                     ORCL     2018/03/19 13:50:50     /u01/app/grid/product/11.2.0.4/grid/cdata/ORCL/backup_20180319_135050.olr
                     ORCL     2016/12/22 06:34:53     /u01/app/grid/product/11.2.0/grid/cdata/ORCL/backup_20161222_063453.olr
                     Successfully configured Oracle Grid Infrastructure for a Standalone Server

 

  • Step 5: Post Checks:

                      We will now check the Inventory.xml file again

                      Now we will start the databases:

 

srvctl start database -d ORCLDB

srvctl start database -d ORCLDB

                    Check the version:

 

$ crsctl query has softwareversion

Oracle High Availability Services version on the local node is [11.2.0.4.0]

$ crsctl query has releaseversion

Oracle High Availability Services release version on the local node is [11.2.0.4.0]

Installation of Oracle 12c RAC Flex cluster infrastructure on Virtual Box

Introduction

This document will help to guide you for installation of Oracle 12cR1 RAC Flex cluster infrastructure on Virtual Box which is very popular because of shared storage simulation feature.
Below is overall requirement in nut-shell.

We need 3 servers for now.I will install RAC on First 2 servers and 3rd server will act as DNS server.My desktop RAM is 16 GB.

Hostname:-rac1.example.com

Physical IP:-192.168.50.110
Private IP:-192.168.1.101
RAM:-4GB
/u01 mount point 100GB

Hostname:-rac2.example.com

Physical IP:-192.168.50.111
Private IP:-192.168.1.102
RAM:-4GB
/u01 mount point 100GB

Hostname:-dns.example.com

Physical IP:192.168.50.113

RAM:-1 GB
/ mount point 20 GB
SCAN name should be resolved by GNS.The name would be :-rac-scan.gns.rac.example.com
Virtual IP should be assigned from DHCP and DNS.
GNS name:-gns.rac.example.com

Download Software

Download the following software.
Depending on your version of VirtualBox and  Linux, there may be some slight variation in how the screen shots look.

 

VirtualBox Network Setup

We need to make sure a host-only network is configured and check/modify the IP range for that network. This will be the public network for our RAC installation.
  • Start VirtualBox from the menu.
  • Select the “File > Preferences” menu option.
  • Click “Network” in the left pane and click the “Host-only Networks” tab.
  • Click the “Adds new host-only network” button on the right size of the screen. Depending on the host OS, a network called “vboxnet0” or “VirtualBox Host-Only Ethernet Adapter” will be created.
  • Click the “Edits selected host-only network.” button on the right size of the screen.
  • If you want to use a different subnet for your public addresses you can change the network details here. Just make sure the subnet you choose doesn’t match any real subnets on your network. I’ve decided to choose “192.168.50.X”.
  • Please go to DHCP server tab and do not select DHCP as we are building seperate DHCP server

 

Virtual Machine Setup

Now we must define the two virtual RAC nodes. We can save time by defining one VM, then cloning it when it is installed.

 

Start VirtualBox and click the “New” button on the toolbar. Enter the name “rac1”, OS “Linux” and Version “Oracle (64 bit)”, then click the “Next” button.

Please select to allocate 4 GB RAM.

Next section, please select the following option

Please select “vdi” option

Please select first option “Dynamically Allocated”

Please select prefer location to create the disk and select 30GB size

 

Now press “create” button and your virtual machine is ready.

The “rac1” VM will appear on the left hand pane. Scroll down the details on the right and click on the “Network” link.
Make sure “Adapter 1” is enabled, set to “NAT”, then click on the “Adapter 2” tab.

Make sure “Adapter 2” is enabled, set to “Host-only Adapter”, then click on the “Adapter 3” tab.

Now in adapter 3,please select following:-

Move “Hard Disk” to the top of the boot order and uncheck the “Floppy” option, then click the “OK” button.

Guest Operating System Installation in all the VM .

Please use any standard note to install Oracle Linux 6.

You can choose 100GB mount point for /u01 in RAC1 and RAC2 .You can choose 30 GB root mount point for DNS server.

Configure YUM repository in all the VM

With the new VM highlighted, click the “Start” button on the toolbar. On the “Select start-up disk” screen, choose the relevant Linux ISO image and click the “Start” button.y folder. For my case, I am copying to /home/debasis/SOFT  folder.
Please configure yum repository by creating following file.Login as root user.
Go to /etc/yum.repos.d

[root@rac1 yum.repos.d]# cat rhel.repo
[rhel.repo]
gpgcheck = 0
enabled = 1
baseurl = file:///home/debasis/SOFT
name = rhel-repo

 

[root@rac1 yum.repos.d]# yum clean all

Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-
: manager

This system is not registered with an entitlement server. You can use subscription-manager to register.
Cleaning repos: rhel.repo
Cleaning up everything

Maybe you want: rm -rf /var/cache/yum, to also free up space taken by orphaned data from disabled or removed repos

[root@rac1 yum.repos.d]# yum repolist

Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-
: manager

This system is not registered with an entitlement server. You can use subscription-manager to register.
rhel.repo | 4.1 kB 00:00
(1/2): rhel.repo/group_gz | 137 kB 00:00
(2/2): rhel.repo/primary_db | 4.0 MB 00:00
repo id repo name status
rhel.repo rhel-repo 4,986
repolist: 4,986

This part will help to configure DHCP and DNS for NAME server DNS( 192.168.50.113)

Please change /etc/sysconfig/network-scripts/ifcfg-eth1 parameter BOOTPROTO=dhcp

configure DHCP server:-

DHCP server will be used to provide dynamic IP for VIP and SCAN IP. There has to be a package which provides the service, and sure enough this is called  dhcp. The dhcp client normally is installed already which makes it easy to avoid confusion.

Step 1:-Install DHCP server

yum install dhcp*

Step 2:-Configure DHCP server

vi /etc/dhcp/dhcpd.conf

Please add following entry

ddns-update-style interim;
ignore client-updates;
subnet 192.168.50.0 netmask 255.255.255.0 {
 option subnet-mask              255.255.255.0;
 option domain-name              “rac.example.com”;
 range  192.168.50.117 192.168.50.130;
 default-lease-time 21600;
 max-lease-time 43200;
 option routers 192.168.50.1;
 option ip-forwarding off;
 option domain-name-servers 192.168.50.113;
 option broadcast-address 192.168.50.255;
}

I am explaining major parameters

domain-name-servers is name or dns server ip (192.168.50.113)

router is default gateway (192.168.50.1)

range is between 192.168.50.117 and 192.168.50.130.So all DHCP IP will be assigned from that range.

Configure NAME server:-

DNS for GNS

We need to configure DNS first and then we have to delegate the subdomain to GNS,  which involves a little bit of work on the DNS server. Also, we need to put a virtual IP address for GNS into DNS, but that address must not be in use. I also created a dedicated server for DNS and bind,  on 192.168.50.113. The configuration changes I made are as follows:

Step 1:-Install bind packages

yum install bind*

Step 2:-Make configuration change in /etc/named.conf

options
{
/* make named use port 53 for the source of all queries, to allow
* firewalls to block all ports except 53:
*/
query-source port 53;
query-source-v6 port 53;

// Put files that named is allowed to write in the data/ directory:
directory “/var/named”; // the default
dump-file “data/cache_dump.db”;
statistics-file “data/named_stats.txt”;
memstatistics-file “data/named_mem_stats.txt”;

allow-transfer {“none”;};
zone-statistics yes;
};

logging
{
channel default_debug {
file “data/named.run”;
severity dynamic;
};
};

zone “example.com” IN {
type master;
file “/var/named/example.com.db”;
allow-transfer { 192.168.50.113; };
};

zone “50.168.192.in-addr.arpa” IN {
type master;
file “/var/named/192.168.50.db”;
};

// named.rfc1912.zones here….

Step 3:=Now you need to create example.com.db and 192.168.50.db under /var/named

[root@dns dhcp]#vi /var/named/example.com.db

$TTL 86400
$ORIGIN example.com.
@ 1D IN SOA dns.example.com. hostmaster.example.com. (
2002022401 ; serial
3H ; refresh
15 ; retry
1w ; expire
3h ; minimum
)
; main domain name servers
IN NS dns
dns IN A 192.168.50.113
; A record for mail server above
mail IN A 192.168.1.113

rac1 IN A 192.168.50.110
rac2 IN A 192.168.50.111
example.com. A 192.168.50.113

; sub-domain definitions
$ORIGIN rac.example.com.
@ IN NS gns.rac.example.com.
IN NS dns.example.com.
; sub-domain address records for name server only – glue record
gns IN A 192.168.50.115 ; ‘glue’ record

[root@dns dhcp]#vi /var/named/192.168.50.db

$TTL 86400 ; 24 hours could have been written as 24h or 1d
@ 1D IN SOA dns.example.com. hostmaster.example.com. (
2002022401 ; serial
3H ; refresh
15 ; retry
1w ; expire
3h ; minimum
)
IN NS dns.example.com.
dns IN A 192.168.56.113
110 IN PTR rac1.example.com.
111 IN PTR rac2.example.com.
115 IN PTR gns.rac.example.com.

Step 3:-Restart the named server

service named restart

Reference:-

DNS and DHCP Setup Example for Grid Infrastructure GNS (Doc ID 946452.1)

Please stop network manager for all servers so that /etc/resolv.conf will not be updated automatically.

service NetworkManager stop

chkconfig NetworkManager off

Please make entry in /etc/resolv.conf in all servers so that it connects to named server

options attempts: 2

options timeout: 1

search example.com rac.example.com

nameserver 192.168.50.113

VM Guest installation for mouse and keyboard integration.You can do for all VM.

Please install following package to correctly install vm guest edition.

yum install kernel-devel*
yum install gcc*
Please click Run button.

Configure SSH now in ALL VM

Now you can ping  but can not ssh You need to configure ssh . You need to login as root.
enable  PermitRootLogin to yes in  /etc/ssh/sshd_config.
[root@rac1 yum.repos.d]# service sshd restart
Redirecting to /bin/systemctl restart sshd.service
Do this step for all servers

Install following package in RAC1

yum install -y binutils.x86_64 glibc.x86_64 libgcc.x86_64 libstdc++.x86_64 libaio.x86_64 \
libXext.x86_64 libXtst.x86_64 libX11.x86_64 libXau.x86_64 ksh.x86_64 libxcb.x86_64 libXi.x86_64 \
make.x86_64 sysstat.x86_64 compat-libcap1.x86_64 compat-libstdc++- 33.x86_64 gcc.x86_64 gcc-c++.x86_64 \
glibc-devel.x86_64 libstdc++-devel.x86_64 libaio-devel.x86_64 cloog-ppl.x86_64 cpp.x86_64 \
glibc-headers.x86_64 kernel-headers.x86_64 mpfr.x86_64 ppl.x86_64 xterm.x86_64 xorg-x11- xauth \
xclock X11 xorg-x11- server-utils xorg-x11- xauth xclock X11 xorg-x11- server-utils psmisc.x86_64

 

Now all kernel parameters need to be added in /etc/sysctl.conf in RAC1

 

fs.file-max = 6815744
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
kernel.shmall = 1073741824
kernel.shmmax = 4398046511104
kernel.panic_on_oops = 1
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
net.ipv4.conf.all.rp_filter = 2
net.ipv4.conf.default.rp_filter = 2
fs.aio-max-nr = 1048576
net.ipv4.ip_local_port_range = 9000 65500
Run the following command to change the current kernel parameters.
/sbin/sysctl -p

Add the following lines to a file called “/etc/security/limits.d/oracle-rdbms-server-12cR1-preinstall.conf” file in RAC1.

oracle   soft   nofile    1024
oracle   hard   nofile    65536
oracle   soft   nproc    16384
oracle   hard   nproc    16384
oracle   soft   stack    10240
oracle   hard   stack    32768
oracle   hard   memlock    134217728
oracle   soft   memlock    134217728
grid soft nofile 1024
grid hard nofile 65536
grid soft nproc 16384
grid hard nproc 16384
grid soft stack 10240
grid hard stack 32768
grid hard memlock 134217728
grid soft memlock 134217728

Please create below groups and user GRID and ORACLE in RAC1.

 

groupadd -g 54321 oinstall
groupadd -g 54322 dba
groupadd -g 54323 oper
groupadd -g 54325 asmdba
groupadd -g 54328 asmadmin
groupadd -g 54329 asmoper
useradd -u 54322 -g oinstall -G asmadmin,asmdba,asmoper,dba -d /home/grid -m -c  “User for Oracle Grid Infrastructure Software”  -s /bin/bash grid
useradd -u 54321 -g oinstall -G dba,asmdba,oper,asmadmin -d /home/oracle -m -c “User for Oracle Database Software” -s /bin/bash oracle

Please modify below files to make compatible for RAC installation in RAC1

/etc/selinux/config
SELINUX= permissive
/etc/systemd/logind.conf
RemoveIPC=no
/etc/sysconfig/network
NOZEROCONF=yes

Disable firewall services for all VM

service iptables stop
chkconfig iptables off

Please add following entry in /etc/pam.d/login in RAC1

session required /lib64/security/pam_limits.so
session required pam_limits.so

Please create following directory and change the permissions in RAC1

mkdir -p /u01/oemcc
mkdir -p /u01/app/grid
mkdir -p /u01/app/product
mkdir -p /u01/app/oraInventory
mkdir -p /u01/app/oracle
chown -R oracle:oinstall /u01
chown -R grid:oinstall /u01/app/oraInventory
chown -R grid:oinstall /u01/app/grid
chmod -R 775 /u01/
chmod -R 770 /u01/app/oraInventory
chown -R oracle:oinstall /u01
chown -R grid:oinstall /u01/app/oraInventory
chown -R grid:oinstall /u01/app/grid
chmod -R 775 /u01/
chmod -R 770 /u01/app/oraInventory

Please add/modify .bash_profile under oracle user in /home/oracle in RAC1

 

# .bash_profile

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

# User specific environment and startup programs

PATH=$PATH:$HOME/bin

export PATH

export ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=$ORACLE_BASE/product/12c/db_1
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
LD_LIBRARY_PATH_64=$ORACLE_HOME/lib
export ORACLE_BASE ORACLE_HOME LD_LIBRARY_PATH LD_LIBRARY_PATH_64

TNS_ADMIN=$ORACLE_HOME/network/admin
LIB_PATH=$ORACLE_HOME/lib
SQLPATH=$ORACLE_HOME/lib
CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
export ORACLE_PROCDIR ORACLE_PATH ORACLE_PROC ORA_NLS10 NLS_LANG TNS_ADMIN LIB_PATH SQLPATH CLASSPATH

PATH=$PATH:$ORACLE_HOME/bin:/usr/ccs/bin:/usr/bin:/etc:/usr/openwin/bin:/usr/sbin:/usr/ucb/bin:/usr/local/bin/:/usr/sfw/bin
export PATH
ORACLE_SID=ORCL1
export ORACLE_SID

Please add/modify .bash_profile under grid user in /home/grid in RAC1

 

# .bash_profile

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

# User specific environment and startup programs

PATH=$PATH:$HOME/bin

export PATH

export ORACLE_BASE=/u01/app/grid
ORACLE_HOME=$ORACLE_BASE/product/grid
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
LD_LIBRARY_PATH_64=$ORACLE_HOME/lib
export ORACLE_BASE ORACLE_HOME LD_LIBRARY_PATH LD_LIBRARY_PATH_64

TNS_ADMIN=$ORACLE_HOME/network/admin
LIB_PATH=$ORACLE_HOME/lib
SQLPATH=$ORACLE_HOME/lib
CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
export ORACLE_PROCDIR ORACLE_PATH ORACLE_PROC ORA_NLS10 NLS_LANG TNS_ADMIN LIB_PATH SQLPATH CLASSPATH

PATH=$PATH:$ORACLE_HOME/bin:/usr/ccs/bin:/usr/bin:/etc:/usr/openwin/bin:/usr/sbin:/usr/ucb/bin:/usr/local/bin/:/usr/sfw/bin
export PATH
ORACLE_SID=+ASM1
export ORACLE_SID

 

Please add following entry in /etc/hosts in RAC1

/etc/hosts

127.0.0.1       localhost.localdomain   localhost
# Public
192.168.50.110   rac1.example.com  rac1
192.168.50.111   rac2.example.com rac2
# Private
192.168.1.101   rac1-priv
192.168.1.102   rac2-priv

 

Now you need to configure shared storage which is requirement for ASM disks to be available from both RAC node.

Open command prompt from your laptop after coming out from Linux node.You may choose either D: or C: to store raw ASM disk.
mkdir D:\VirtualBox\ol6-121-ra
cd:
cd C:\VirtualBox\ol6-121-rac
“c:\Program Files\Oracle\VirtualBox\VBoxManage” createhd –filename asm1.vdi –size 5120 –format VDI –variant Fixed
“c:\Program Files\Oracle\VirtualBox\VBoxManage” storageattach rac1 –storagectl “SATA” –port 1 –device 0 –type hdd –medium asm1.vdi –mtype shareable
“c:\Program Files\Oracle\VirtualBox\VBoxManage” storageattach rac1 –storagectl “SATA” –port 2 –device 0 –type hdd –medium asm2.vdi –mtype shareable
“c:\Program Files\Oracle\VirtualBox\VBoxManage” storageattach rac1 –storagectl “SATA” –port 3 –device 0 –type hdd –medium asm3.vdi –mtype shareable
“c:\Program Files\Oracle\VirtualBox\VBoxManage” storageattach rac1 –storagectl “SATA” –port 4 –device 0 –type hdd –medium asm4.vdi –mtype shareable
“c:\Program Files\Oracle\VirtualBox\VBoxManage” modifyhd asm1.vdi –type shareable
“c:\Program Files\Oracle\VirtualBox\VBoxManage” modifyhd asm2.vdi –type shareable
“c:\Program Files\Oracle\VirtualBox\VBoxManage” modifyhd asm3.vdi –type shareable
“c:\Program Files\Oracle\VirtualBox\VBoxManage” modifyhd asm4.vdi –type shareable
Please proceed with disk partitioning using fdisk after connecting with root user to node 1
[root@rac1 dev]# fdisk /dev/sdb

Welcome to fdisk (util-linux 2.23.2).

 

Changes will remain in memory only, until you decide to write them.

Be careful before using the write command.

 

Device does not contain a recognized partition table

Building a new DOS disklabel with disk identifier 0x184caae5.

 

Command (m for help): n

Partition type:

p   primary (0 primary, 0 extended, 4 free)

e   extended

Select (default p): p

Partition number (1-4, default 1):

First sector (2048-10485759, default 2048):

Using default value 2048

Last sector, +sectors or +size{K,M,G} (2048-10485759, default 10485759):

Using default value 10485759

Partition 1 of type Linux and of size 5 GiB is set

 

Command (m for help): w

The partition table has been altered!

 

Calling ioctl() to re-read partition table.

Syncing disks.

 

Please add following entry to enable SCSI

Add the following to the “/etc/scsi_id.config” file to configure SCSI devices as trusted. Create the file if it doesn’t already exist.
options=-g

 

Please identify SCSI ID using following command for each individual disk of ASM which is added and shared.

[root@rac1 dev]# /usr/lib/udev/scsi_id -g -u -d /dev/sdb
1ATA_VBOX_HARDDISK_VB7a401c0f-c528452b

Please create a file 99-ASM.rules under /etc/udev/rules.d and make following entry. RESULT should be followed by SCSI ID retrieved from previous step

KERNEL==”sd?1″, BUS==”scsi”, PROGRAM==”/sbin/scsi_id -g -u -d /dev/$parent”, RESULT==”1ATA_VBOX_HARDDISK_VB1bb0c812-29a5f87c”, NAME=”asm-disk1″, OWNER=”oracle”, GROUP=”dba”, MODE=”0660″

Please restart udev

# /sbin/udevadm control –reload-rules # /sbin/start_udev

Now you need to use partprobe to refresh new partitions

[root@rac1 dev]# /sbin/partprobe /dev/sdb1

Now you need to clone the RAC1 virtual machine to RAC2 using below steps

 

Remove all ASM storage device from storage option from VM Virtual box and share the ASM disk already created and attached with RAC1.
Please stop both virtual box RAC1 and RAC2 and run following command from command  prompt from your host laptop/desktop.
“c:\Program Files\Oracle\VirtualBox\VBoxManage” storageattach ora_linux6_12c_n2 –storagectl “SATA” –port 1 –device 0 –type hdd –medium asm1.vdi –mtype shareable

Please re-initialize all IP in cloned node after logging into cloned VM (Say RAC2)

Log in to the “rac2” virtual machine as the “root” user so we can reconfigure the network settings to match the following.

  • hostname: rac2.example.com
  • eth0: DHCP (*Not* Connect Automatically)
  • eth1: IP=192.168.50.110, Subnet=255.255.255.0, Gateway=192.168.50.1, DNS=192.168.50.113, Search=example.com (Connect Automatically)
  • eth2: IP=192.168.1.102, Subnet=255.255.255.0, Gateway=<blank>, DNS=<blank>, Search=<blank> (Connect Automatically)

Amend the hostname in the “/etc/sysconfig/network” file.

NETWORKING=yes
HOSTNAME=rac2.example.com

Check the MAC address of each of the available network connections. Don’t worry that they are listed as “eth3” to “eth5”. These are dynamically created connections because the MAC address of the “eth0” to “eth2” connections are incorrect.

# ifconfig -a | grep eth
eth3      Link encap:Ethernet  HWaddr 08:00:27:43:41:74  
eth4      Link encap:Ethernet  HWaddr 08:00:27:4B:4F:0F  
eth5      Link encap:Ethernet  HWaddr 08:00:27:E8:70:17
#

Edit the “/etc/sysconfig/network-scripts/ifcfg-eth0”, amending only the HWADDR setting as follows and deleting the UUID entry. Note, the HWADDR value comes from the “eth3” interface displayed above.Please change the HWADDR and interface name to “eth0”

HWADDR=08:00:27:43:41:74

Edit the “/etc/sysconfig/network-scripts/ifcfg-eth1”, amending only the IPADDR and HWADDR settings as follows and deleting the UUID entry. Note, the HWADDR value comes from the “eth4” interface displayed above.Please change the HWADDR and interface name to “eth1”

HWADDR=08:00:27:4B:4F:0F
IPADDR=192.168.50.111

Edit the “/etc/sysconfig/network-scripts/ifcfg-eth2”, amending only the IPADDR and HWADDR settings as follows and deleting the UUID entry. Note, the HWADDR value comes from the “eth5” interface displayed above.Please change the HWADDR and interface name to “eth2”

HWADDR=08:00:27:E8:70:17 IPADDR=192.168.1.102

Also please check rules related to network under /etc/udev/rules.d/90-persistent.rules file and change
interface name accordingly

 

Please share the local folder where you have kept all the installable files or you can ftp to rac1

Open mobaxterm to fetch GUI in local.

Please unzip the grid installation binaries under /u01/app/grid.
Now you need to go to /u01/app/grid/grid

Now please wait and your runInstaller will open the GUI. Select the “Install and Configure Oracle Grid Infrastructure for a Cluster” option, then click the “Next” button.

Accept the “Configure a Flexcluster” option by clicking the “Next” button.

Select the “Advance Installation” option, then click the “Next” button.

You can select your own language preference.

Please provide cluster name,scan name and port. GNS IP should be 192.168.50.115 (This is configured in /var/named/example.com.db in DNS server)

Enter the details of the second node in the cluster, then click the “OK” button.

Click the “SSH Connectivity…” button and enter the password for the “grid” user. Click the “Setup” button to configure SSH connectivity, and the “Test” button to test it once it is complete. Once the test is complete, click the “Next” button.
Please select public and private network interface which you defined earlier for corresponding interface name.

ASM configuration should start now.

Please select 2 disks for OCR,Voting disk and management DB.
Allocation Unit Size 4 MB (For any Diskgroup you may create)

Please set the password for ASMSNMP

Please use following option.

Please select the group as below

Please select ORACLE_BASE and ORACLE_HOME

Please select oracle inventory as following

Please do not select automatic execution of root.sh rather I would prefer to run manually.

The validation check will result as below:-

Please install the following package downloded manually in both rac1 and rac2 node.

https://drive.google.com/open?id=0B8-3R318F39hNl9BOEVGekVuU0U

yum install compat-libstdc++-33-3.2.3-71.el7.x86_64.rpm

Please run the verification again.

After installation progress,you will get following screen where it has been instructed to run the following script.

[root@rac1 ~]# /u01/app/oraInventory/orainstRoot.sh

Changing permissions of /u01/app/oraInventory.

Adding read,write permissions for group.

Removing read,write,execute permissions for world.

Changing groupname of /u01/app/oraInventory to oinstall.

The execution of the script is complete.

 

Please execute root.sh for rac1
[root@rac1 ~]# /u01/app/grid/product/grid/root.sh
Performing root user operation.
The following environment variables are set as:
ORACLE_OWNER= grid
ORACLE_HOME=  /u01/app/grid/product/grid
Enter the full pathname of the local bin directory: [/usr/local/bin]:
Copying dbhome to /usr/local/bin …
Copying oraenv to /usr/local/bin …
Copying coraenv to /usr/local/bin …
Creating /etc/oratab file…
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Using configuration parameter file: /u01/app/grid/product/grid/crs/install/crsconfig_params
2017/11/07 06:46:21 CLSRSC-4001: Installing Oracle Trace File Analyzer (TFA) Collector.
2017/11/07 06:46:56 CLSRSC-4002: Successfully installed Oracle Trace File Analyzer (TFA) Collector.
2017/11/07 06:46:58 CLSRSC-363: User ignored prerequisites during installation
OLR initialization – successful
root wallet
root wallet cert
root cert export
peer wallet
profile reader wallet
pa wallet
peer wallet keys
pa wallet keys
peer cert request
pa cert request
peer cert
pa cert
peer root cert TP
profile reader root cert TP
pa root cert TP
peer pa cert TP
pa peer cert TP
profile reader pa cert TP
profile reader peer cert TP
peer user cert
pa user cert
2017/11/07 06:47:56 CLSRSC-330: Adding Clusterware entries to file ‘oracle-ohasd.service’
CRS-4133: Oracle High Availability Services has been stopped.
CRS-4123: Oracle High Availability Services has been started.
CRS-4133: Oracle High Availability Services has been stopped.
CRS-4123: Oracle High Availability Services has been started.
CRS-2672: Attempting to start ‘ora.evmd’ on ‘rac1’
CRS-2672: Attempting to start ‘ora.mdnsd’ on ‘rac1’
CRS-2676: Start of ‘ora.mdnsd’ on ‘rac1’ succeeded
CRS-2676: Start of ‘ora.evmd’ on ‘rac1’ succeeded
CRS-2672: Attempting to start ‘ora.gpnpd’ on ‘rac1’
CRS-2676: Start of ‘ora.gpnpd’ on ‘rac1’ succeeded
CRS-2672: Attempting to start ‘ora.cssdmonitor’ on ‘rac1’
CRS-2672: Attempting to start ‘ora.gipcd’ on ‘rac1’
CRS-2676: Start of ‘ora.cssdmonitor’ on ‘rac1’ succeeded
CRS-2676: Start of ‘ora.gipcd’ on ‘rac1’ succeeded
CRS-2672: Attempting to start ‘ora.cssd’ on ‘rac1’
CRS-2672: Attempting to start ‘ora.diskmon’ on ‘rac1’
CRS-2676: Start of ‘ora.diskmon’ on ‘rac1’ succeeded
CRS-2676: Start of ‘ora.cssd’ on ‘rac1’ succeeded
2017/11/07 07:01:34 CLSRSC-343: Successfully started Oracle Clusterware stack
2017/11/07 07:02:19 CLSRSC-325: Configure Oracle Grid Infrastructure for a Cluster … succeeded
Please proceed with next steps. It may take another 15 minutes to 30 minutes to complete.

 

Please check over-all status using below command:-
[root@rac1 ~]# . oraenv
ORACLE_SID = [root] ? +ASM1
The Oracle base has been set to /u01/app/oracle

[root@rac1 ~]# crsctl stat res -t

——————————————————————————–
Name           Target  State        Server                   State details
——————————————————————————–
Local Resources
——————————————————————————–
ora.ASMNET1LSNR_ASM.lsnr
               ONLINE  ONLINE       rac1                     STABLE
               ONLINE  ONLINE       rac2                     STABLE
ora.DATA.dg
               ONLINE  ONLINE       rac1                     STABLE
               ONLINE  ONLINE       rac2                     STABLE
ora.LISTENER.lsnr
               ONLINE  ONLINE       rac1                     STABLE
               ONLINE  ONLINE       rac2                     STABLE
ora.net1.network
               ONLINE  ONLINE       rac1                     STABLE
               ONLINE  ONLINE       rac2                     STABLE
ora.ons
               ONLINE  ONLINE       rac1                     STABLE
               ONLINE  ONLINE       rac2                     STABLE
——————————————————————————–
Cluster Resources
——————————————————————————–
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       rac2                     STABLE
ora.LISTENER_SCAN2.lsnr
      1        ONLINE  ONLINE       rac1                     STABLE
ora.LISTENER_SCAN3.lsnr
      1        ONLINE  ONLINE       rac1                     STABLE
ora.MGMTLSNR
      1        ONLINE  ONLINE       rac1                     169.254.9.67 192.168
                                                             .1.100,STABLE
ora.asm
      1        ONLINE  ONLINE       rac1                     Started,STABLE
      2        ONLINE  ONLINE       rac2                     Started,STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.cvu
      1        ONLINE  ONLINE       rac1                     STABLE
ora.gns
      1        ONLINE  ONLINE       rac1                     STABLE
ora.gns.vip
      1        ONLINE  ONLINE       rac1                     STABLE
ora.mgmtdb
      1        ONLINE  ONLINE       rac1                     Open,STABLE
ora.oc4j
      1        ONLINE  ONLINE       rac1                     STABLE
ora.rac1.vip
      1        ONLINE  ONLINE       rac1                     STABLE
ora.rac2.vip
      1        ONLINE  ONLINE       rac2                     STABLE
ora.scan1.vip
      1        ONLINE  ONLINE       rac2                     STABLE
ora.scan2.vip
      1        ONLINE  ONLINE       rac1                     STABLE
ora.scan3.vip
      1        ONLINE  ONLINE       rac1                     STABLE
——————————————————————————–

Basic oracle database creation and maintenance in windows and Linux

 

DB CREATION STEPS IN WINDOWS

SETTING AN ENVIRONMENT(FOR WINDOWS)

ORADIM -new -sid <new_sid> -intpwd oracle -startmode AUTO -pfile c:\oracle\admin\<new_sid>\pfile\init<new_sid>.ora

 

PASSWORD FILE MANAGEMENT

 

Check in the initclone.ora REMOTE_LOGIN_PASSWORDFILE is set to    exclusive or shared.  If this is set, then a valid passwordfile should exist in ORACLE_HOME/dbs or created using orapwd  as

orapwd file=/u01/oracle/V816/dbs/orapwV722 password=oracle entries=1

 STARTING UP WITH NOMOUNT OPTION

SQL>STARTUP NOMOUNT PFILE=’c:\oracle\admin\mbb\pfile\init.ora’;

THE CRATE DATABASE COMMAND in win NT:-

SQL>CREATE DATABASE “mbb”
CONTROLFILE REUSE
LOGFILE GROUP 1
(‘c:/oracle/oradata/mbb/redo01.log’)
SIZE 5M REUSE,
GROUP 2
(‘c:/oracle/oradata/mbb/redo02.log’) SIZE 5M REUSE
MAXLOGFILES 4
MAXLOGMEMBERS 2
MAXLOGHISTORY 0
MAXDATAFILES 254
MAXINSTANCES 1
NOARCHIVELOG
CHARACTER SET “WE8MSWIN1252”
NATIONAL CHARACTER SET “AL16UTF16”
DATAFILE ‘c:/oracle/oradata/mbb/system01.dbf’ SIZE 80m
AUTOEXTEND ON NEXT 5M MAXSIZE UNLIMITED
UNDO TABLESPACE UNDOTBS
DATAFILE ‘c:/oracle/oradata/mbb/undo01.dbf’ SIZE 35m
DEFAULT TEMPORARY TABLESPACE TEMP
TEMPFILE ‘c:/oracle/oradata/mbb/temp01.dbf’ SIZE 20M;

 

DB CREATION STEPS FOR LINUX

The Instance, the Database, and the Data Dictionary
==================================================

An Oracle server is an instance and a database; the two are separate, but connected. The instance is memory structures and processes, in your RAM and on your CPU(s); its existence is transient; it can be started and stopped. The database is files on disk; once created, it persists until it is deleted. Creating an instance is nothing more than building the memory structures and starting the processes. Creating a database is done by the instance as a once-off operation, and the instance can then open and close it many times subsequently. The database is worthless without the instance.

Within the database there is a set of tables and other segments called the data dictionary. The data dictionary describes all the logical and physical structures in the database, including all the segments that store user data.

The process of database creation is creating the bare minimum of physical structures needed to store the data dictionary, and then creating the data dictionary within them.

An instance is defined by an instance parameter file. The parameter file contains directives that define how the instance should be built in memory: the size of the memory structures, the behavior of the background processes. After building the instance, it is said to be in no mount mode. In no mount mode, the instance exists but has not connected to a database. Indeed, the database may not even exist at this point.

All parameters, either specified by the parameter file or implied, have defaults, except for one: the parameter DB_NAME. The DB_NAME parameter names the database to which the instance will connect. This name is also embedded in the controlfile. There is one parameter, CONTROL_FILES, that tells the instance the location of the controlfile. This parameter defines the connection between the instance and the database. When the instance reads the controlfile (which it will find by reading the CONTROL_FILES parameter) if there is a mismatch in database names, the database will not mount. In mount mode, the instance has successfully connected to the controlfile. If the controlfile is damaged or non-existent, it will be impossible to mount the database. The controlfile is small, but vital

Within the controlfile, there are pointers to the other files (the online redo log files and the datafiles) that make up the rest of the database. Having mounted the database, the instance can open the database by locating and opening these other files. An open database is a database where the instance has opened all the available online redo log files and datafiles. Also within the controlfile, there is a mapping of datafiles to tablespaces. This lets the instance identify the datafile(s) that make(s) up the SYSTEM tablespace. In the SYSTEM tablespace, it will find the data dictionary. The data dictionary lets the instance resolve references to objects referred to in SQL code to the segments in which they reside, and work out where, physically, the objects are.

The creation of a database server must therefore involve these steps:

Create the instance.

Create the database.

Create the data dictionary.

In practice, the steps are divided slightly differently:

Create the instance.

Create the database and the data dictionary objects.

Create the data dictionary views.

The data dictionary as initially created with the database is fully functional but unusable. It has the capability for defining and managing user data but cannot by used by normal human beings because its structure is too abstruse. Before users (or DBAs) can actually use the database, a set of views must be created on top of the data dictionary that will present it in a human-understandable form.

The data dictionary itself is created by running a set of SQL scripts that exist in the ORACLE_HOME/rdbms/admin directory. These are called by the CREATE DATABASE command. The first is sql.bsq, which then calls several other scripts. These scripts issue a series of commands that create all the tables and other objects that make up the data dictionary.

The views and other objects that make the database usable are generated with more scripts in the ORACLE_HOME/rdbms/admin directory, prefixed with “cat”. Examples of these are catalog.sql and catproc.sql, which should always be run immediately after database creation. There are many other optional “cat” scripts that will enable certain features—some of these can be run at creation time; others might be run subsequently to install the features at a later date.

DB Installation in silent mode
==============================

nohup ./runInstaller -silent -force \
FROM_LOCATION=/home/oracle/database/stage/products.xml \
oracle.install.option=INSTALL_DB_SWONLY \
UNIX_GROUP_NAME=oinstall \
INVENTORY_LOCATION=/opt/oracle/oraInventory \
ORACLE_HOME=/opt/oracle/11g/product/11.2.2 \
ORACLE_HOME_NAME=”OraDb11g22_Home1″ \
ORACLE_BASE=/opt/oracle \
oracle.install.db.InstallEdition=EE \
oracle.install.db.isCustomInstall=false \
oracle.install.db.DBA_GROUP=oinstall \
oracle.install.db.OPER_GROUP=oinstall \
DECLINE_SECURITY_UPDATES=true &

 

Using the DBCA to Create a Database
===================================

export DISPLAY=10.10.10.65:0.0

To launch the DBCA on Linux, first set the environment variables that should always be set for any Linux DBA session: ORACLE_BASE, ORACLE_HOME, PATH, and LD_LIBRARY_PATH. This is an example of a script that will do this:

export ORACLE_BASE=/u02/app/db11g
export ORACLE_HOME=$ORACLE_BASE/product/11.1.0/db_1
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH

These are the steps to follow to create a database:

Create a parameter file and (optionally) a password file.

Use the parameter file to build an instance in memory.

Issue the CREATE DATABASE command. This will generate, as a minimum, a controlfile, two online redo log files, two datafiles for the SYSTEM and SYSAUX tablespaces, and a data dictionary.

Run SQL scripts to generate the data dictionary views and the supplied PL/ SQL packages.

Run SQL scripts to generate the Enterprise Manager Database Control, and any options (such as Java) that the database will require.

On Windows systems, there is an additional step because Oracle runs as a Windows service. Oracle provides a utility, oradim.exe, to assist you in creating this service.

SETTING AN ENVIRONMENT(FOR LINUX)

 

% setenv ORACLE_SID mynewdb

(A) Change the working directory to /etc and edit the oratab file to put the entry for CLOBE instance.

(B) Setup login profile for the Oracle user having dba group.

ORACLE_SID=CLONE

Export ORACLE_SID

Or .oraenv

The CREATE DATABASE Command
===========================

This is an example of the CreateDB.sql script:

connect “SYS”/”&&sysPassword” as SYSDBA
set echo on
spool D:\oracle\app\admin\ocp11g\scripts\CreateDB.log
startup nomount pfile=”D:\oracle\app\admin\ocp11g\scripts\init.ora”;
CREATE DATABASE “ocp11g”
MAXINSTANCES 8
MAXLOGHISTORY 1
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
DATAFILE ‘D:\oracle\app\oradata\ocp11g\system01.dbf’
SIZE 300M REUSE AUTOEXTEND ON NEXT 10240K MAXSIZE UNLIMITED
EXTENT MANAGEMENT LOCAL
SYSAUX DATAFILE ‘D:\oracle\app\oradata\ocp11g\sysaux01.dbf’
SIZE 120M REUSE AUTOEXTEND ON NEXT 10240K MAXSIZE UNLIMITED
SMALLFILE DEFAULT TEMPORARY TABLESPACE TEMP TEMPFILE
‘D:\oracle\app\oradata\ocp11g\temp01.dbf’ SIZE 20M REUSE
AUTOEXTEND ON NEXT 640K MAXSIZE UNLIMITED
SMALLFILE UNDO TABLESPACE “UNDOTBS1” DATAFILE
‘D:\oracle\app\oradata\ocp11g\undotbs01.dbf’ SIZE 200M REUSE
AUTOEXTEND ON NEXT 5120K MAXSIZE UNLIMITED
CHARACTER SET WE8MSWIN1252
NATIONAL CHARACTER SET AL16UTF16
LOGFILE GROUP 1 (‘D:\oracle\app\oradata\ocp11g\redo01.log’) SIZE 51200K,
GROUP 2 (‘D:\oracle\app\oradata\ocp11g\redo02.log’) SIZE 51200K,
GROUP 3 (‘D:\oracle\app\oradata\ocp11g\redo03.log’) SIZE 51200K
USER SYS IDENTIFIED BY “&&sysPassword”
USER SYSTEM IDENTIFIED BY “&&systemPassword”;
spool off

CREATE DATABASE USING DBCA SILENTLY

================================

dbca -silent \
-createDatabase \
-templateName /u01/app/oracle/product/12.1.0/db_1/assistants/dbca/templates/General_Purpose.dbc \
-gdbName EEOCMSC.tdenopcl.internal \
-sid EEOCMSC \
-SysPassword 3ricss0n \
-SystemPassword 3ricss0n \
-emConfiguration NONE \
-redoLogFileSize 100 \
-recoveryAreaDestination FRA \
-storageType ASM \
-asmSysPassword 3ricss0n \
-diskGroupName DATA \
-characterSet AL32UTF8 \
-nationalCharacterSet AL16UTF16 \
-totalMemory 4072 \
-databaseType MULTIPURPOSE

EMCTL start
===========

To start Database Control, use the emctl utility. This will be located in the ORACLE_HOME/bin directory. The three commands to start or stop Database Control and to check its status are

emctl start dbconsole
emctl stop dbconsole
emctl status dbconsole

The ORACLE_HOME and ORACLE_SID are needed so that emctl can find the Database Control configuration files. These are in three places: the directory ORACLE_HOME/sysman/config has general configuration directives that will apply to all Database Control instances running from the Oracle Home (one per database), and also ORACLE_HOME/hostname_sid/sysman/config and a similarly named directory beneath

To identify the port, you can use emctl. As shown in Figure 5–1, the output of emctl status dbconsole shows the port on which Database Control should be running. Alternatively, you can look in the file ORACLE_HOME/install/portlist.ini, which lists all the ports configured by the OUI and DBCA.

DB shutdown and startup
=======================

So use of the SYSDBA privilege logs you on to the instance as user SYS, the most powerful user in the database and the owner of the data dictionary. Use of the SYSOPER privilege connects you as a user PUBLIC. PUBLIC is not a user in any normal sense—he/she is a notional user with administration privileges, but (by default) with no privileges that let him/her see or manipulate data. You should connect with either of these privileges only when you need to carry out procedures that no normal user can do.

When the database is SHUTDOWN, all files are closed and the instance does not exist. In NOMOUNT mode, the instance has been built in memory (the SGA has been created and the background processes started, according to whatever is specified in its parameter file), but no connection has been made to a database. It is indeed possible that the database does not yet exist. In MOUNT mode, the instance locates and reads the database control file. In OPEN mode, all database files are located and opened and the database is made available for use by end users. The startup process is staged: whenever you issue a startup command, it will go through these stages. It is possible to stop the startup part way. For example, if your control file is damaged, or a multiplexed copy is missing, you will not be able to mount the database, but by stopping in NOMOUNT mode you may be able to repair the damage. Similarly, if there are problems with any datafiles or redo log files, you may be able to repair them in MOUNT mode before transitioning the database to OPEN mode.

At any stage, how does the instance find the files it needs, and exactly what happens? Start with NOMOUNT. When you issue a startup command, Oracle will attempt to locate a parameter file. There are three default filenames. On Unix they are

$ORACLE_HOME/dbs/spfileSID.ora
$ORACLE_HOME/dbs/spfile.ora
$ORACLE_HOME/dbs/initSID.ora

Transactional No new user connections are permitted; existing sessions that are not in a transaction will be terminated; sessions currently in a transaction are allowed to complete the transaction and will then be terminated. Once all sessions are terminated, the database will shut down.

Immediate No new sessions are permitted, and all currently connected sessions are terminated. Any active transactions are rolled back, and the database will then shut down.

Abort As far as Oracle is concerned, this is the equivalent of a power cut. The instance terminates immediately. Nothing is written to disk, no file handles are closed, and there is no attempt to terminate transactions that be in progress in any orderly fashion.

Shutdown and startup procedure
==============================

Use SQL*Plus to start an instance and open a database, then Database Control to shut it down. If the database is already open, do this in the other order. Note that if you are working on Windows, the Windows service for the database must be running. It will have a name of the form OracleServiceSID, where SID is the name of the instance.

Log on to the computer as a member of the operating system group that owns the ORACLE_HOME, and set the environment variables appropriately for ORACLE_HOME and PATH and ORACLE_SID, as described in Chapter 4.

Check the status of the database listener, and start it if necessary. From an operating system prompt:

lsnrctl status
lsnrctl start

Check the status of the Database Control console, and start it if necessary. From an operating system prompt:

emctl status dbconsole
emctl start dbconsole
Launch SQL*Plus, using the /nolog switch to prevent an immediate logon prompt:

sqlplus /nolog

Connect as SYS with operating system authentication:

connect / as sysdba

Start the instance only:

startup nomount;

Mount the database:

alter database mount;

Open the database:

alter database open;

Confirm that the database is open by querying a data dictionary view:

select count(*) from dba_data_files;

Parameter files
===============

select name,value from v$parameter order by name;
select name,value from v$spparameter order by name;

create spfile [=’spfilename’] from pfile [=’pfilename’];
create pfile [=’pfilename’] from spfile [=’spfilename’] ;

select s.name,s.value
from v$spparameter s join v$parameter p on s.name=p.name
where p.isbasic=’TRUE’ order by name;

SELECT DECODE(value, NULL, ‘PFILE’, ‘SPFILE’) “Init File Type”
FROM sys.v_$parameter WHERE name = ‘spfile’;

You can also use the V$SPPARAMETER view to check if you are using a PFILE or not: if the “value” column is NULL for all parameters, you are using a PFILE.

SQL> ALTER SYSTEM RESET timed_statistics SCOPE=SPFILE SID=‘*’;
SQL> ALTER SYSTEM SET timed_statistics = ” SCOPE=SPFILE;

ISDEFAULT VARCHAR2(9) Indicates whether the parameter is set to the default value (TRUE) or the parameter value was specified in the parameter file (FALSE)

ISSES_MODIFIABLE VARCHAR2(5) Indicates whether the parameter can be changed with ALTER SESSION (TRUE) or not (FALSE)

ISSYS_MODIFIABLE VARCHAR2(9) Indicates whether the parameter can be changed with ALTER SYSTEM and when the change takes effect:
•IMMEDIATE – Parameter can be changed with ALTER SYSTEM regardless of the type of parameter file used to start the instance. The change takes effect immediately.
•DEFERRED – Parameter can be changed with ALTER SYSTEM regardless of the type of parameter file used to start the instance. The change takes effect in subsequent sessions.
•FALSE – Parameter cannot be changed with ALTER SYSTEM unless a server parameter file was used to start the instance. The change takes effect in subsequent instances.

ISINSTANCE_MODIFIABLE VARCHAR2(5) For parameters that can be changed with ALTER SYSTEm, indicates whether the value of the parameter can be different for every instance (TRUE) or whether the parameter must have the same value for all Real Application Clusters instances (FALSE). If the ISSYS_MODIFIABLE column is FALSE, then this column is always FALSE.

ISMODIFIED VARCHAR2(10) Indicates whether the parameter has been modified after instance startup:
•MODIFIED – Parameter has been modified with ALTER SESSION
•SYSTEM_MOD – Parameter has been modified with ALTER SYSTEM (which causes all the currently logged in sessions’ values to be modified)
•FALSE – Parameter has not been modified after instance startup

ISADJUSTED VARCHAR2(5) Indicates whether Oracle adjusted the input value to a more suitable value (for example, the parameter value should be prime, but the user input a non-prime number, so Oracle adjusted the value to the next prime number)

Viewing Information About the Database
======================================

DATABASE_PROPERTIES Displays permanent database properties
GLOBAL_NAME Displays the global database name
V$DATABASE Contains database information from the control file

 

 

 

Oracle Database 12c Release 1 (12.1) RAC GRID Infrastructure RHEL Redhat linux 7 VirtualBox

Introduction

This document will help to guide you for installation of Oracle 12cR1 RAC grid infrastructure on Virtual Box which is very popular because of shared storage simulation feature.
Below is overall requirement in nut-shell.
Hostname:-rac1
Physical IP:-192.168.56.101
Private IP:-192.168.100.101
Virtual IP:- 192.168.56.103
Hostname:-rac2
Physical IP:-192.168.56.102
Private IP:-192.168.100.102
Virtual IP:- 192.168.56.104
SCAN name should be resolved by following 3 IP.
192.168.56.105   rac-scan
192.168.56.106   rac-scan
192.168.56.107   rac-scan
We need 4 ASM disks each 5 GB shared by both nodes.

 

Download Software

Download the following software.
Depending on your version of VirtualBox and  Linux, there may be some slight variation in how the screen shots look.

 

VirtualBox Network Setup

We need to make sure a host-only network is configured and check/modify the IP range for that network. This will be the public network for our RAC installation.
  • Start VirtualBox from the menu.
  • Select the “File > Preferences” menu option.
  • Click “Network” in the left pane and click the “Host-only Networks” tab.

  • Click the “Adds new host-only network” button on the right size of the screen. Depending on the host OS, a network called “vboxnet0” or “VirtualBox Host-Only Ethernet Adapter” will be created.

  • Click the “Edits selected host-only network.” button on the right size of the screen.
  • If you want to use a different subnet for your public addresses you can change the network details here. Just make sure the subnet you choose doesn’t match any real subnets on your network. I’ve decided to stick with the default, which for me is “192.168.56.X”.

 

Virtual Machine Setup

Now we must define the two virtual RAC nodes. We can save time by defining one VM, then cloning it when it is installed.
Start VirtualBox and click the “New” button on the toolbar. Enter the name “rac1”, OS “Linux” and Version “Red Hat (64 bit)”, then click the “Next” button.

Please select to allocate 4 GB RAM.

Next section, please select the following option

Please select “vdi” option

Please select first option “Dynamically Allocated”

Please select prefer location to create the disk and select 30GB size

 

Now press “create” button and your virtual machine is ready.

The “rac1” VM will appear on the left hand pane. Scroll down the details on the right and click on the “Network” link.
Make sure “Adapter 1” is enabled, set to “NAT”, then click on the “Adapter 2” tab.

Make sure “Adapter 2” is enabled, set to “Host-only Adapter”, then click on the “Adapter 3” tab.

Now in adapter 3,please select following:-

Move “Hard Disk” to the top of the boot order and uncheck the “Floppy” option, then click the “OK” button.

Guest Operating System Installation

With the new VM highlighted, click the “Start” button on the toolbar. On the “Select start-up disk” screen, choose the relevant Linux ISO image and click the “Start” button.

Please select following option to start installation:-

Please select prefer language as “English”

Now in the customization screen, Please select “Installation Destination” to reconfigure disk configuration.

Please select following option to configure disk partitions yourself.

Please select LVM and add new partition using “+” button below:-

The following is example to create and mention partition name and size.

The customized partition will now look like below:-

Now you need to “Accept Changes”

Once you press “Done” on upper side of screen,You will again come to customization menu.You need to select “Software Selection” to customize installation.Other wise it will be minimum installation without GUI.

Please select below option :-

Again you need to press “Done” button and now you need to re-configure network setting: –

First virtual ethernet setting should be default but enabled with automatic DHCP.

For second ethernet card, you need to specify following IP and gateway. This is public ip.

for third network interface, only put IP do not use gateway. This is private ip.

Now change hostname to “rac1” as below:-

Please select root password:-

The installation will continue now:-

 

It will take almost 30 minutes to finish installation.
After installation, please accept the license and perform post installation configuration.

 

Please configure yum to configure package installation

Please mount RHEL disk and copy all it’s content to any folder. For my case, I am copying to /home/debasis/SOFT  folder.
Please configure yum repository by creating following file.Login as root user.
Go to /etc/yum.repos.d

[root@rac1 yum.repos.d]# cat rhel.repo

[rhel.repo]
 gpgcheck = 0
 enabled = 1
 baseurl = file:///home/debasis/SOFT
 name = rhel-repo

 

[root@rac1 yum.repos.d]# yum clean all

Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-
 : manager

This system is not registered with an entitlement server. You can use subscription-manager to register.
 Cleaning repos: rhel.repo
 Cleaning up everything

Maybe you want: rm -rf /var/cache/yum, to also free up space taken by orphaned data from disabled or removed repos

[root@rac1 yum.repos.d]# yum repolist

Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-
 : manager

This system is not registered with an entitlement server. You can use subscription-manager to register.
 rhel.repo | 4.1 kB 00:00
 (1/2): rhel.repo/group_gz | 137 kB 00:00
 (2/2): rhel.repo/primary_db | 4.0 MB 00:00
 repo id repo name status
 rhel.repo rhel-repo 4,986
 repolist: 4,986

 

 

VM Guest installation for mouse and keyboard integration.(This step may create problem in RHEL 7.4.I have seen blank screen after installation of guest edition. You may ignore this step.)

 

Please install following package to correctly install vm guest edition.

yum install kernel-devel*

yum install gcc*

Please click Run button.

Configure SSH now

Now you can ping 192.168.56.101 but can not ssh You need to configure ssh . You need to login as root.
enable  PermitRootLogin to yes in  /etc/ssh/sshd_config.
[root@rac1 yum.repos.d]# service sshd restart
Redirecting to /bin/systemctl restart sshd.service

 

Install following package

 

yum install -y binutils.x86_64 glibc.x86_64 libgcc.x86_64 libstdc++.x86_64 libaio.x86_64 \
libXext.x86_64 libXtst.x86_64 libX11.x86_64 libXau.x86_64 ksh.x86_64 libxcb.x86_64 libXi.x86_64 \
make.x86_64 sysstat.x86_64 compat-libcap1.x86_64 compat-libstdc++- 33.x86_64 gcc.x86_64 gcc-c++.x86_64 \
glibc-devel.x86_64 libstdc++-devel.x86_64 libaio-devel.x86_64 cloog-ppl.x86_64 cpp.x86_64 \
glibc-headers.x86_64 kernel-headers.x86_64 mpfr.x86_64 ppl.x86_64 xterm.x86_64 xorg-x11- xauth \
xclock X11 xorg-x11- server-utils xorg-x11- xauth xclock X11 xorg-x11- server-utils psmisc.x86_64

 

Now all kernel parameters need to be added in /etc/sysctl.conf

 

fs.file-max = 6815744
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
kernel.shmall = 1073741824
kernel.shmmax = 4398046511104
kernel.panic_on_oops = 1
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
net.ipv4.conf.all.rp_filter = 2
net.ipv4.conf.default.rp_filter = 2
fs.aio-max-nr = 1048576
net.ipv4.ip_local_port_range = 9000 65500
Run the following command to change the current kernel parameters.
/sbin/sysctl -p

Add the following lines to a file called “/etc/security/limits.d/oracle-rdbms-server-12cR1-reinstall.conf” file.

oracle   soft   nofile    1024

oracle   hard   nofile    65536

oracle   soft   nproc    16384

oracle   hard   nproc    16384

oracle   soft   stack    10240

oracle   hard   stack    32768

oracle   hard   memlock    134217728

oracle   soft   memlock    134217728

grid soft nofile 1024

grid hard nofile 65536

grid soft nproc 16384

grid hard nproc 16384

grid soft stack 10240

grid hard stack 32768

grid hard memlock 134217728

grid soft memlock 134217728

Please create below groups and user GRID and ORACLE.

 

groupadd -g 54321 oinstall

groupadd -g 54322 dba

groupadd -g 54323 oper

groupadd -g 54325 asmdba

groupadd -g 54328 asmadmin

groupadd -g 54329 asmoper

useradd -u 54322 -g oinstall -G asmadmin,asmdba,asmoper,dba -d /home/grid -m -c "User for oracle grid infra" -s /bin/bash grid

useradd -u 54321 -g oinstall -G dba,asmdba,oper,asmadmin -d /home/oracle -m -c "User for Oracle Database Software" -s /bin/bash oracle

Please modify below files to make compatible for RAC installation

/etc/selinux/config
SELINUX= permissive
/etc/systemd/logind.conf
RemoveIPC=no
/etc/sysconfig/network
NOZEROCONF=yes

Disable firewall services

systemctl stop firewalld.service
systemctl disable firewalld.service

Please add following entry in /etc/pam.d/login

session required /lib64/security/pam_limits.so
session required pam_limits.so

Please create following directory and change the permissions

mkdir -p /u01/oemcc
mkdir -p /u01/app/grid
mkdir -p /u01/app/product
mkdir -p /u01/app/oraInventory
mkdir -p /u01/app/oracle
chown -R oracle:oinstall /u01
chown -R grid:oinstall /u01/app/oraInventory
chown -R grid:oinstall /u01/app/grid
chmod -R 775 /u01/
chmod -R 770 /u01/app/oraInventory
chown -R oracle:oinstall /u01
chown -R grid:oinstall /u01/app/oraInventory
chown -R grid:oinstall /u01/app/grid
chmod -R 775 /u01/
chmod -R 770 /u01/app/oraInventory

 

Please add/modify .bash_profile under oracle user in /home/oracle

 

# .bash_profile

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

# User specific environment and startup programs

PATH=$PATH:$HOME/bin

export PATH

export ORACLE_BASE=/u01/app/oracle
 ORACLE_HOME=$ORACLE_BASE/product/12c/db_1
 LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
 LD_LIBRARY_PATH_64=$ORACLE_HOME/lib
 export ORACLE_BASE ORACLE_HOME LD_LIBRARY_PATH LD_LIBRARY_PATH_64

TNS_ADMIN=$ORACLE_HOME/network/admin
 LIB_PATH=$ORACLE_HOME/lib
 SQLPATH=$ORACLE_HOME/lib
 CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
 export ORACLE_PROCDIR ORACLE_PATH ORACLE_PROC ORA_NLS10 NLS_LANG TNS_ADMIN LIB_PATH SQLPATH CLASSPATH

PATH=$PATH:$ORACLE_HOME/bin:/usr/ccs/bin:/usr/bin:/etc:/usr/openwin/bin:/usr/sbin:/usr/ucb/bin:/usr/local/bin/:/usr/sfw/bin
 export PATH
 ORACLE_SID=ORCL1
 export ORACLE_SID

Please add/modify .bash_profile under grid user in /home/grid

 

# .bash_profile

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

# User specific environment and startup programs

PATH=$PATH:$HOME/bin

export PATH

export ORACLE_BASE=/u01/app/grid
 ORACLE_HOME=$ORACLE_BASE/product/grid
 LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
 LD_LIBRARY_PATH_64=$ORACLE_HOME/lib
 export ORACLE_BASE ORACLE_HOME LD_LIBRARY_PATH LD_LIBRARY_PATH_64

TNS_ADMIN=$ORACLE_HOME/network/admin
 LIB_PATH=$ORACLE_HOME/lib
 SQLPATH=$ORACLE_HOME/lib
 CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
 export ORACLE_PROCDIR ORACLE_PATH ORACLE_PROC ORA_NLS10 NLS_LANG TNS_ADMIN LIB_PATH SQLPATH CLASSPATH

PATH=$PATH:$ORACLE_HOME/bin:/usr/ccs/bin:/usr/bin:/etc:/usr/openwin/bin:/usr/sbin:/usr/ucb/bin:/usr/local/bin/:/usr/sfw/bin
 export PATH
 ORACLE_SID=+ASM1
 export ORACLE_SID

 

Please add following entry in /etc/hosts

/etc/hosts

127.0.0.1       localhost.localdomain   localhost
# Public
192.168.56.101   rac1
192.168.56.102   rac2
# Private
192.168.100.101   rac1-priv
192.168.100.102   rac2-priv
# Virtual
192.168.56.103   rac1-vip
192.168.56.104   rac2-vip
# SCAN
192.168.56.105   rac-scan
192.168.56.106   rac-scan
192.168.56.107   rac-scan

 

Now you need to configure shared storage which is requirement for ASM disks to be available from both node.The node needs to be stopped during this activity.

Open command prompt from your laptop after coming out from Linux node.You may choose either D: or C: to store raw ASM disk.
mkdir D:\VirtualBox\ol7-121-ra
cd:
cd C:\VirtualBox\ol7-121-rac

"c:\Program Files\Oracle\VirtualBox\VBoxManage" createhd --filename asm1.vdi --size 5120 --format VDI --variant Fixed

"c:\Program Files\Oracle\VirtualBox\VBoxManage" createhd --filename asm2.vdi --size 5120 --format VDI --variant Fixed

"c:\Program Files\Oracle\VirtualBox\VBoxManage" createhd --filename asm3.vdi --size 5120 --format VDI --variant Fixed

"c:\Program Files\Oracle\VirtualBox\VBoxManage" createhd --filename asm4.vdi --size 5120 --format VDI --variant Fixed

"c:\Program Files\Oracle\VirtualBox\VBoxManage" storageattach rac1 --storagectl "SATA" --port 1 --device 0 --type hdd --medium asm1.vdi --mtype shareable

"c:\Program Files\Oracle\VirtualBox\VBoxManage" storageattach rac1 --storagectl "SATA" --port 2 --device 0 --type hdd --medium asm2.vdi --mtype shareable

"c:\Program Files\Oracle\VirtualBox\VBoxManage" storageattach rac1 --storagectl "SATA" --port 3 --device 0 --type hdd --medium asm3.vdi --mtype shareable

"c:\Program Files\Oracle\VirtualBox\VBoxManage" storageattach rac1 --storagectl "SATA" --port 4 --device 0 --type hdd --medium asm4.vdi --mtype shareable

"c:\Program Files\Oracle\VirtualBox\VBoxManage" modifyhd asm1.vdi --type shareable

"c:\Program Files\Oracle\VirtualBox\VBoxManage" modifyhd asm2.vdi --type shareable

"c:\Program Files\Oracle\VirtualBox\VBoxManage" modifyhd asm3.vdi --type shareable

"c:\Program Files\Oracle\VirtualBox\VBoxManage" modifyhd asm4.vdi --type shareable
Please proceed with disk partitioning using fdisk after connecting with root user to node 1
[root@rac1 dev]# fdisk /dev/sdb

Welcome to fdisk (util-linux 2.23.2).

 

Changes will remain in memory only, until you decide to write them.

Be careful before using the write command.

 

Device does not contain a recognized partition table

Building a new DOS disklabel with disk identifier 0x184caae5.

 

Command (m for help): n

Partition type:

p   primary (0 primary, 0 extended, 4 free)

e   extended

Select (default p): p

Partition number (1-4, default 1):

First sector (2048-10485759, default 2048):

Using default value 2048

Last sector, +sectors or +size{K,M,G} (2048-10485759, default 10485759):

Using default value 10485759

Partition 1 of type Linux and of size 5 GiB is set

 

Command (m for help): w

The partition table has been altered!

 

Calling ioctl() to re-read partition table.

Syncing disks.

 

Please add following entry to enable SCSI

Add the following to the “/etc/scsi_id.config” file to configure SCSI devices as trusted. Create the file if it doesn’t already exist.
options=-g

 

Please identify SCSI ID using following command for each individual disk of ASM which is added and shared.

[root@rac1 dev]# /usr/lib/udev/scsi_id -g -u -d /dev/sdb

1ATA_VBOX_HARDDISK_VB7a401c0f-c528452b

[root@rac1 dev]# /usr/lib/udev/scsi_id -g -u -d /dev/sdc

1ATA_VBOX_HARDDISK_VB7a276b42-ba7c6f30

[root@rac1 dev]# /usr/lib/udev/scsi_id -g -u -d /dev/sdd

1ATA_VBOX_HARDDISK_VBf3184451-5fe33178

[root@rac1 dev]# /usr/lib/udev/scsi_id -g -u -d /dev/sde

1ATA_VBOX_HARDDISK_VB8548ed60-cf05012b

Please create a file 99-ASM.rules under /etc/udev/rules.d and make following entry. RESULT should be followed by SCSI ID retrieved from previous step

KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="1ATA_VBOX_HARDDISK_VB96eadf26-399d1fed", SYMLINK+="oracleasm/asm-disk1", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="1ATA_VBOX_HARDDISK_VB6233f8cc-70f59a49", SYMLINK+="oracleasm/asm-disk2", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="1ATA_VBOX_HARDDISK_VBa903d07b-739bbeee", SYMLINK+="oracleasm/asm-disk3", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="1ATA_VBOX_HARDDISK_VBba6aa7c3-7b993224", SYMLINK+="oracleasm/asm-disk4", OWNER="grid", GROUP="asmadmin", MODE="0660"

Please restart udev

# /sbin/udevadm control –reload-rules

Now you need to use partprobe to refresh new partitions

[root@rac1 dev]# /sbin/partprobe /dev/sdb1
[root@rac1 dev]# /sbin/partprobe /dev/sdc1
[root@rac1 dev]# /sbin/partprobe /dev/sdd1
[root@rac1 dev]# /sbin/partprobe /dev/sde1

Now you need to clone the RAC1 virtual machine to RAC2 using below steps

 

Remove all ASM storage device from storage option from VM Virtual box and share the ASM disk already created and attached with RAC1.
Please stop both virtual box RAC1 and RAC2 and run following command from command  prompt from your host laptop/desktop.
"c:\Program Files\Oracle\VirtualBox\VBoxManage" storageattach ora_linux7_12c_n2 --storagectl "SATA" --port 1 --device 0 --type hdd --medium asm1.vdi --mtype shareable

"c:\Program Files\Oracle\VirtualBox\VBoxManage" storageattach ora_linux7_12c_n2 --storagectl "SATA" --port 2 --device 0 --type hdd --medium asm2.vdi --mtype shareable

"c:\Program Files\Oracle\VirtualBox\VBoxManage" storageattach ora_linux7_12c_n2 --storagectl "SATA" --port 3 --device 0 --type hdd --medium asm3.vdi --mtype shareable

"c:\Program Files\Oracle\VirtualBox\VBoxManage" storageattach ora_linux7_12c_n2 --storagectl "SATA" --port 4 --device 0 --type hdd --medium asm4.vdi --mtype shareable

Please re-initialize all IP in cloned node after logging into cloned VM (Say RAC2)

 

Hostname needs  change now to rac2:-

hostnamectl set-hostname rac2

Please share the local folder where you have kept all the installable files or you can ftp to rac1

Open mobaxterm to fetch GUI in local.

Please unzip the grid installation binaries under /u01/app/grid.
Now you need to go to /u01/app/grid/grid

Now please wait and your runInstaller will open the GUI. Select the “Install and Configure Oracle Grid Infrastructure for a Cluster” option, then click the “Next” button.

Accept the “Configure a Standard cluster” option by clicking the “Next” button.

Select the “Advance Installation” option, then click the “Next” button.

You can select your own language preference.

Please provide cluster name,scan name and port. Scan name should be in /etc/hosts.

Enter the details of the second node in the cluster, then click the “OK” button.

Click the “SSH Connectivity…” button and enter the password for the “grid” user. Click the “Setup” button to configure SSH connectivity, and the “Test” button to test it once it is complete. Once the test is complete, click the “Next” button.

Please select public and private network interface which you defined earlier for corresponding interface name.

ASM configuration should start now.

Please select 2 disks for OCR,Voting disk and management DB.
Allocation Unit Size 4 MB (For any Diskgroup you may create)

Please set the password for ASMSNMP

Please use following option.

Please select the group as below

Please select ORACLE_BASE and ORACLE_HOME

Please select oracle inventory as following

Please do not select automatic execution of root.sh rather I would prefer to run manually.

The validation check will result as below:-

Please install the following package downloded manually in both rac1 and rac2 node.

https://drive.google.com/open?id=0B8-3R318F39hNl9BOEVGekVuU0U

yum install compat-libstdc++-33-3.2.3-71.el7.x86_64.rpm

Please run the verification again.

After installation progress,you will get following screen where it has been instructed to run the following script.

[root@rac1 ~]# /u01/app/oraInventory/orainstRoot.sh

Changing permissions of /u01/app/oraInventory.

Adding read,write permissions for group.

Removing read,write,execute permissions for world.

Changing groupname of /u01/app/oraInventory to oinstall.

The execution of the script is complete.

 

Please execute root.sh for rac1
[root@rac1 ~]# /u01/app/grid/product/grid/root.sh
Performing root user operation.
The following environment variables are set as:
ORACLE_OWNER= grid
ORACLE_HOME=  /u01/app/grid/product/grid
Enter the full pathname of the local bin directory: [/usr/local/bin]:
Copying dbhome to /usr/local/bin …
Copying oraenv to /usr/local/bin …
Copying coraenv to /usr/local/bin …
Creating /etc/oratab file…
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Using configuration parameter file: /u01/app/grid/product/grid/crs/install/crsconfig_params
2017/11/07 06:46:21 CLSRSC-4001: Installing Oracle Trace File Analyzer (TFA) Collector.
2017/11/07 06:46:56 CLSRSC-4002: Successfully installed Oracle Trace File Analyzer (TFA) Collector.
2017/11/07 06:46:58 CLSRSC-363: User ignored prerequisites during installation
OLR initialization – successful
root wallet
root wallet cert
root cert export
peer wallet
profile reader wallet
pa wallet
peer wallet keys
pa wallet keys
peer cert request
pa cert request
peer cert
pa cert
peer root cert TP
profile reader root cert TP
pa root cert TP
peer pa cert TP
pa peer cert TP
profile reader pa cert TP
profile reader peer cert TP
peer user cert
pa user cert
2017/11/07 06:47:56 CLSRSC-330: Adding Clusterware entries to file ‘oracle-ohasd.service’
CRS-4133: Oracle High Availability Services has been stopped.
CRS-4123: Oracle High Availability Services has been started.
CRS-4133: Oracle High Availability Services has been stopped.
CRS-4123: Oracle High Availability Services has been started.
CRS-2672: Attempting to start ‘ora.evmd’ on ‘rac1’
CRS-2672: Attempting to start ‘ora.mdnsd’ on ‘rac1’
CRS-2676: Start of ‘ora.mdnsd’ on ‘rac1’ succeeded
CRS-2676: Start of ‘ora.evmd’ on ‘rac1’ succeeded
CRS-2672: Attempting to start ‘ora.gpnpd’ on ‘rac1’
CRS-2676: Start of ‘ora.gpnpd’ on ‘rac1’ succeeded
CRS-2672: Attempting to start ‘ora.cssdmonitor’ on ‘rac1’
CRS-2672: Attempting to start ‘ora.gipcd’ on ‘rac1’
CRS-2676: Start of ‘ora.cssdmonitor’ on ‘rac1’ succeeded
CRS-2676: Start of ‘ora.gipcd’ on ‘rac1’ succeeded
CRS-2672: Attempting to start ‘ora.cssd’ on ‘rac1’
CRS-2672: Attempting to start ‘ora.diskmon’ on ‘rac1’
CRS-2676: Start of ‘ora.diskmon’ on ‘rac1’ succeeded
CRS-2676: Start of ‘ora.cssd’ on ‘rac1’ succeeded
ASM created and started successfully.
Disk Group DATA created successfully.
CRS-2672: Attempting to start ‘ora.crf’ on ‘rac1’
CRS-2672: Attempting to start ‘ora.storage’ on ‘rac1’
CRS-2676: Start of ‘ora.storage’ on ‘rac1’ succeeded
CRS-2676: Start of ‘ora.crf’ on ‘rac1’ succeeded
CRS-2672: Attempting to start ‘ora.crsd’ on ‘rac1’
CRS-2676: Start of ‘ora.crsd’ on ‘rac1’ succeeded
CRS-4256: Updating the profile
Successful addition of voting disk 78f988ac52054fc0bf4c1ec23aa8cc15.
Successfully replaced voting disk group with +DATA.
CRS-4256: Updating the profile
CRS-4266: Voting file(s) successfully replaced
##  STATE    File Universal Id                File Name Disk group
—  —–    —————–                ——— ———
  1. ONLINE 78f988ac52054fc0bf4c1ec23aa8cc15 (/dev/sdb1) [DATA]
Located 1 voting disk(s).
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on ‘rac1’
CRS-2673: Attempting to stop ‘ora.crsd’ on ‘rac1’
CRS-2677: Stop of ‘ora.crsd’ on ‘rac1’ succeeded
CRS-2673: Attempting to stop ‘ora.ctssd’ on ‘rac1’
CRS-2673: Attempting to stop ‘ora.evmd’ on ‘rac1’
CRS-2673: Attempting to stop ‘ora.storage’ on ‘rac1’
CRS-2673: Attempting to stop ‘ora.mdnsd’ on ‘rac1’
CRS-2673: Attempting to stop ‘ora.gpnpd’ on ‘rac1’
CRS-2677: Stop of ‘ora.storage’ on ‘rac1’ succeeded
CRS-2673: Attempting to stop ‘ora.asm’ on ‘rac1’
CRS-2677: Stop of ‘ora.ctssd’ on ‘rac1’ succeeded
CRS-2677: Stop of ‘ora.mdnsd’ on ‘rac1’ succeeded
CRS-2677: Stop of ‘ora.gpnpd’ on ‘rac1’ succeeded
CRS-2677: Stop of ‘ora.evmd’ on ‘rac1’ succeeded
CRS-2677: Stop of ‘ora.asm’ on ‘rac1’ succeeded
CRS-2673: Attempting to stop ‘ora.cluster_interconnect.haip’ on ‘rac1’
CRS-2677: Stop of ‘ora.cluster_interconnect.haip’ on ‘rac1’ succeeded
CRS-2673: Attempting to stop ‘ora.cssd’ on ‘rac1’
CRS-2677: Stop of ‘ora.cssd’ on ‘rac1’ succeeded
CRS-2673: Attempting to stop ‘ora.crf’ on ‘rac1’
CRS-2677: Stop of ‘ora.crf’ on ‘rac1’ succeeded
CRS-2673: Attempting to stop ‘ora.gipcd’ on ‘rac1’
CRS-2677: Stop of ‘ora.gipcd’ on ‘rac1’ succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on ‘rac1’ has completed
CRS-4133: Oracle High Availability Services has been stopped.
CRS-4123: Starting Oracle High Availability Services-managed resources
CRS-2672: Attempting to start ‘ora.mdnsd’ on ‘rac1’
CRS-2672: Attempting to start ‘ora.evmd’ on ‘rac1’
CRS-2676: Start of ‘ora.mdnsd’ on ‘rac1’ succeeded
CRS-2676: Start of ‘ora.evmd’ on ‘rac1’ succeeded
CRS-2672: Attempting to start ‘ora.gpnpd’ on ‘rac1’
CRS-2676: Start of ‘ora.gpnpd’ on ‘rac1’ succeeded
CRS-2672: Attempting to start ‘ora.gipcd’ on ‘rac1’
CRS-2676: Start of ‘ora.gipcd’ on ‘rac1’ succeeded
CRS-2672: Attempting to start ‘ora.cssdmonitor’ on ‘rac1’
CRS-2676: Start of ‘ora.cssdmonitor’ on ‘rac1’ succeeded
CRS-2672: Attempting to start ‘ora.cssd’ on ‘rac1’
CRS-2672: Attempting to start ‘ora.diskmon’ on ‘rac1’
CRS-2676: Start of ‘ora.diskmon’ on ‘rac1’ succeeded
CRS-2676: Start of ‘ora.cssd’ on ‘rac1’ succeeded
CRS-2672: Attempting to start ‘ora.cluster_interconnect.haip’ on ‘rac1’
CRS-2672: Attempting to start ‘ora.ctssd’ on ‘rac1’
CRS-2676: Start of ‘ora.ctssd’ on ‘rac1’ succeeded
CRS-2676: Start of ‘ora.cluster_interconnect.haip’ on ‘rac1’ succeeded
CRS-2672: Attempting to start ‘ora.asm’ on ‘rac1’
CRS-2676: Start of ‘ora.asm’ on ‘rac1’ succeeded
CRS-2672: Attempting to start ‘ora.storage’ on ‘rac1’
CRS-2676: Start of ‘ora.storage’ on ‘rac1’ succeeded
CRS-2672: Attempting to start ‘ora.crf’ on ‘rac1’
CRS-2676: Start of ‘ora.crf’ on ‘rac1’ succeeded
CRS-2672: Attempting to start ‘ora.crsd’ on ‘rac1’
CRS-2676: Start of ‘ora.crsd’ on ‘rac1’ succeeded
CRS-6023: Starting Oracle Cluster Ready Services-managed resources
CRS-6017: Processing resource auto-start for servers: rac1
CRS-6016: Resource auto-start has completed for server rac1
CRS-6024: Completed start of Oracle Cluster Ready Services-managed resources
CRS-4123: Oracle High Availability Services has been started.
2017/11/07 06:52:44 CLSRSC-343: Successfully started Oracle Clusterware stack
CRS-2672: Attempting to start ‘ora.asm’ on ‘rac1’
CRS-2676: Start of ‘ora.asm’ on ‘rac1’ succeeded
CRS-2672: Attempting to start ‘ora.DATA.dg’ on ‘rac1’
CRS-2676: Start of ‘ora.DATA.dg’ on ‘rac1’ succeeded
2017/11/07 06:54:42 CLSRSC-325: Configure Oracle Grid Infrastructure for a Cluster … succeeded
Please execute root.sh for rac2
[root@rac2 grid]# /u01/app/grid/product/grid/root.sh
Performing root user operation.
The following environment variables are set as:
ORACLE_OWNER= grid
ORACLE_HOME=  /u01/app/grid/product/grid
Enter the full pathname of the local bin directory: [/usr/local/bin]:
Copying dbhome to /usr/local/bin …
Copying oraenv to /usr/local/bin …
Copying coraenv to /usr/local/bin …
Creating /etc/oratab file…
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Using configuration parameter file: /u01/app/grid/product/grid/crs/install/crsconfig_params
2017/11/07 06:55:57 CLSRSC-4001: Installing Oracle Trace File Analyzer (TFA) Collector.
2017/11/07 06:56:31 CLSRSC-4002: Successfully installed Oracle Trace File Analyzer (TFA) Collector.
2017/11/07 06:56:32 CLSRSC-363: User ignored prerequisites during installation
OLR initialization – successful
2017/11/07 06:58:10 CLSRSC-330: Adding Clusterware entries to file ‘oracle-ohasd.service’
CRS-4133: Oracle High Availability Services has been stopped.
CRS-4123: Oracle High Availability Services has been started.
CRS-4133: Oracle High Availability Services has been stopped.
CRS-4123: Oracle High Availability Services has been started.
CRS-4133: Oracle High Availability Services has been stopped.
CRS-4123: Starting Oracle High Availability Services-managed resources
CRS-2672: Attempting to start ‘ora.mdnsd’ on ‘rac2’
CRS-2672: Attempting to start ‘ora.evmd’ on ‘rac2’
CRS-2676: Start of ‘ora.mdnsd’ on ‘rac2’ succeeded
CRS-2676: Start of ‘ora.evmd’ on ‘rac2’ succeeded
CRS-2672: Attempting to start ‘ora.gpnpd’ on ‘rac2’
CRS-2676: Start of ‘ora.gpnpd’ on ‘rac2’ succeeded
CRS-2672: Attempting to start ‘ora.gipcd’ on ‘rac2’
CRS-2676: Start of ‘ora.gipcd’ on ‘rac2’ succeeded
CRS-2672: Attempting to start ‘ora.cssdmonitor’ on ‘rac2’
CRS-2676: Start of ‘ora.cssdmonitor’ on ‘rac2’ succeeded
CRS-2672: Attempting to start ‘ora.cssd’ on ‘rac2’
CRS-2672: Attempting to start ‘ora.diskmon’ on ‘rac2’
CRS-2676: Start of ‘ora.diskmon’ on ‘rac2’ succeeded
CRS-2676: Start of ‘ora.cssd’ on ‘rac2’ succeeded
CRS-2672: Attempting to start ‘ora.cluster_interconnect.haip’ on ‘rac2’
CRS-2672: Attempting to start ‘ora.ctssd’ on ‘rac2’
CRS-2676: Start of ‘ora.ctssd’ on ‘rac2’ succeeded
CRS-2676: Start of ‘ora.cluster_interconnect.haip’ on ‘rac2’ succeeded
CRS-2672: Attempting to start ‘ora.asm’ on ‘rac2’
CRS-2676: Start of ‘ora.asm’ on ‘rac2’ succeeded
CRS-2672: Attempting to start ‘ora.storage’ on ‘rac2’
CRS-2676: Start of ‘ora.storage’ on ‘rac2’ succeeded
CRS-2672: Attempting to start ‘ora.crf’ on ‘rac2’
CRS-2676: Start of ‘ora.crf’ on ‘rac2’ succeeded
CRS-2672: Attempting to start ‘ora.crsd’ on ‘rac2’
CRS-2676: Start of ‘ora.crsd’ on ‘rac2’ succeeded
CRS-6017: Processing resource auto-start for servers: rac2
CRS-2673: Attempting to stop ‘ora.LISTENER_SCAN1.lsnr’ on ‘rac1’
CRS-2672: Attempting to start ‘ora.net1.network’ on ‘rac2’
CRS-2677: Stop of ‘ora.LISTENER_SCAN1.lsnr’ on ‘rac1’ succeeded
CRS-2676: Start of ‘ora.net1.network’ on ‘rac2’ succeeded
CRS-2673: Attempting to stop ‘ora.scan1.vip’ on ‘rac1’
CRS-2672: Attempting to start ‘ora.ons’ on ‘rac2’
CRS-2677: Stop of ‘ora.scan1.vip’ on ‘rac1’ succeeded
CRS-2672: Attempting to start ‘ora.scan1.vip’ on ‘rac2’
CRS-2676: Start of ‘ora.scan1.vip’ on ‘rac2’ succeeded
CRS-2672: Attempting to start ‘ora.LISTENER_SCAN1.lsnr’ on ‘rac2’
CRS-2676: Start of ‘ora.ons’ on ‘rac2’ succeeded
CRS-2676: Start of ‘ora.LISTENER_SCAN1.lsnr’ on ‘rac2’ succeeded
CRS-6016: Resource auto-start has completed for server rac2
CRS-6024: Completed start of Oracle Cluster Ready Services-managed resources
CRS-4123: Oracle High Availability Services has been started.
2017/11/07 07:01:34 CLSRSC-343: Successfully started Oracle Clusterware stack
2017/11/07 07:02:19 CLSRSC-325: Configure Oracle Grid Infrastructure for a Cluster … succeeded
Please proceed with next steps. It may take another 15 minutes to 30 minutes to complete.

 

Please check over-all status using below command:-
[root@rac1 ~]# . oraenv
ORACLE_SID = [root] ? +ASM1
The Oracle base has been set to /u01/app/oracle
[root@rac1 ~]# crsctl stat res -t
——————————————————————————–
Name           Target  State        Server                   State details
——————————————————————————–
Local Resources
——————————————————————————–
ora.DATA.dg
ONLINE  ONLINE       rac1                     STABLE
ONLINE  ONLINE       rac2                     STABLE
ora.LISTENER.lsnr
ONLINE  ONLINE       rac1                     STABLE
ONLINE  ONLINE       rac2                     STABLE
ora.asm
ONLINE  ONLINE       rac1                     Started,STABLE
ONLINE  ONLINE       rac2                     Started,STABLE
ora.net1.network
ONLINE  ONLINE       rac1                     STABLE
ONLINE  ONLINE       rac2                     STABLE
ora.ons
ONLINE  ONLINE       rac1                     STABLE
ONLINE  ONLINE       rac2                     STABLE
——————————————————————————–
Cluster Resources
——————————————————————————–
ora.LISTENER_SCAN1.lsnr
1        ONLINE  ONLINE       rac2                     STABLE
ora.LISTENER_SCAN2.lsnr
1        ONLINE  ONLINE       rac1                     STABLE
ora.LISTENER_SCAN3.lsnr
1        ONLINE  ONLINE       rac1                     STABLE
ora.MGMTLSNR
1        ONLINE  ONLINE       rac1                     169.254.24.21 192.16
8.100.101,STABLE
ora.cvu
1        ONLINE  ONLINE       rac1                     STABLE
ora.mgmtdb
1        ONLINE  ONLINE       rac1                     Open,STABLE
ora.oc4j
1        ONLINE  ONLINE       rac1                     STABLE
ora.rac1.vip
1        ONLINE  ONLINE       rac1                     STABLE
ora.rac2.vip
1        ONLINE  ONLINE       rac2                     STABLE
ora.scan1.vip
1        ONLINE  ONLINE       rac2                     STABLE
ora.scan2.vip
1        ONLINE  ONLINE       rac1                     STABLE
ora.scan3.vip
1        ONLINE  ONLINE       rac1                     STABLE

Now I will proceed for Oracle 12 database binary installation:-
Please invoke runInstaller after extracting binaries for database
[oracle@rac1 ~]$ ls -ltr
total 2625048
drwxr-xr-x. 7 oracle oinstall 136 Jul 11 2014 database
-rw-r–r–. 1 oracle oinstall 1014527110 Feb 16 2016 p17694377_121020_Linux-x86-64_2of8.zip
-rw-r–r–. 1 oracle oinstall 1673517582 Feb 16 2016 p17694377_121020_Linux-x86-64_1of8.zip

 

 

For testing purpose I am selecting this option.But for production please select 2nd option to install database first and then create database using DBCA

Please select Server class

Please select 2nd option

Please select admin managed database

Please select both node of the RAC

Please select SSH connectivity to establish SSH password less connection between 2 nodes for binary file transfer
/u01/app/product/ora12c/db_1
Please ignore the warning and proceed.