How to Install Oracle RAC 12c (12.1) on Linux with ASM

Background & Overview

The following documentation provides instructions for building an Oracle 12c database with ASM residing on RedHat. 12c comes with a number of new features and architecture changes. Flex ASM and Container Databases to name just two major changes. This guide shows how to install a standard clustered database, the type used in 11g. It does not make use of Flex ASM or Container Databases.

Further reference documentation about Oracle 12c and Oracle Linux is detailed in the Other References section below.

Assumptions

This document expects and assumes the following:

  • The instructions are carried out by a qualified DBA.
  • All necessary client software, e.g. Telnet and X-Server is available.
  • All references to SID should be replaced with correct database name as derived using a suitable database naming standard.
  • All $variable references assume the .profile as described in the File Listings section has been implemented and run.
  • For the purpose of this guide, it will be assumed that a 3 Node RAC cluster is being built
  • The RAC nodes will be called myhost1, myhost2 and myhost3
  • The guide will assume the RAC database being built is named MYDB00
  • The database instances supporting the RAC database will be named MYDB01, MYDB02 and MYDB03.
  • The following SUDO commands will be available or root access
Command
/u01/app/12.1.0/grid/bin/crsctl
/u01/app/12.1.0/grid/bin/appvipcfg
/u01/app/12.1.0/grid/bin/srvctl
/u01/app/12.1.0/grid/bin/acfsroot
/u01/app/12.1.0/grid/bin/acfsload
/u01/app/oraInventory/orainstRoot.sh
/u01/app/12.1.0/grid/root.sh
/u01/app/oracle/product/12.1.0/dbhome_1/root.sh
/u01/app/12.1.0/grid/OPatch/opatchauto

Useful Information

Software

File Name Description Byte Count MD5 Hash
linuxamd64_12102_database_1of2.zip Database Binaries File 1 1673544724 080435a40bd4c8dff6399b231a808e9a
linuxamd64_12102_database_2of2.zip Database Binaries File 2 1014530602 30f20ef9437442b8282ce3984546c982
linuxamd64_12102_grid_1of2.zip Grid Infrastructure Binaries File 1 1747043545 d793c2ba5db9008b79077bff8d27a219
linuxamd64_12102_grid_2of2.zip Grid Infrastructure Binaries File 2 646972897 0e18a9abb80427baf18f85865b1ecd5d
p20996835_121020_Linux-x86-64 Grid Infrastructure and DB PSU 1031691784 F32C00880F4311A20D6D2174ABE95C38
p6880880_121010_Linux-x86-64 OPatch Version 12.1.0.1.8 52853599 f3978f9d719f8f345ca8cca386683a59

Step-By-Step Guide - Pre-Requisites

1. Ensure the Oracle Linux version is 6 or higher.

  • cat /etc/*release*

2. Ensure the Oracle Linux Kernel version for both nodes is 2.6.32 or higher.

  • uname -r

3. As a minimum ensure RedHat has the following packages installed on all nodes.

Package
cvuqdisk (Distributed with the Oracle Binaries)
unzip (x86_64)
xorg-x11-utils-7.5-6.el6.x86_64
binutils-2.20.51.0.2-5.11.el6 (x86_64)
compat-libcap1-1.10-1 (x86_64)
compat-libstdc++-33-3.2.3-69.el6 (x86_64)
compat-libstdc++-33-3.2.3-69.el6 (i686)
gcc-4.4.4-13.el6 (x86_64)
gcc-c++-4.4.4-13.el6 (x86_64)
glibc-2.12-1.7.el6 (i686)
glibc-2.12-1.7.el6 (x86_64)
glibc-devel-2.12-1.7.el6 (x86_64)
glibc-devel-2.12-1.7.el6 (i686)
ksh
libgcc-4.4.4-13.el6 (i686)
libgcc-4.4.4-13.el6 (x86_64)
libstdc++-4.4.4-13.el6 (x86_64)
libstdc++-4.4.4-13.el6 (i686)
libstdc++-devel-4.4.4-13.el6 (x86_64)
libstdc++-devel-4.4.4-13.el6 (i686)
libaio-0.3.107-10.el6 (x86_64)
libaio-0.3.107-10.el6 (i686)
libaio-devel-0.3.107-10.el6 (x86_64)
libaio-devel-0.3.107-10.el6 (i686)
libXext-1.1 (x86_64)
libXext-1.1 (i686)
libXtst-1.0.99.2 (x86_64)
libXtst-1.0.99.2 (i686)
libX11-1.3 (x86_64)
libX11-1.3 (i686)
libXau-1.0.5 (x86_64)
libXau-1.0.5 (i686)
libxcb-1.5 (x86_64)
libxcb-1.5 (i686)
libXi-1.3 (x86_64)
libXi-1.3 (i686)
make-3.81-19.el6
sysstat-9.0.4-11.el6 (x86_64)

4. Set the kernel parameters in /etc/sysctl.conf for all nodes as follows. NOTE If the current value for any parameter is higher than the value listed below, do not change the value of that parameter.

Parameter Value
shmmax Half the server memory
shmmni 4096 (or greater)
fs.file-max 6815744 (or greater)
fs.aio-max-nr 1048576 (or greater)
net.core.rmem_default 262144 (or greater)
net.core.rmem_max 4194304 or greater)
net.core.wmem_default 262144 (or greater)
net.core.wmem_max 1048576 (or greater)
sem 250 32000 100 128 (or greater)
net.ipv4.ip_local_port_range 9000 65535
vm.nr_hugepages=512 Needs to be set to the total SGA size of the DB and ASM plus 750MB. (Each page is 2048)
panic_on_oops 1
randomize_va_space 0
exec-shield 0
vm.min_free_kbytes 512mb
rp_filter 0 or 1

5. Ensure oracle account and the following groups exist on all nodes: oinstall, dba, bckpdba, dgdba, kmdba

6. Update the following file /etc/security/limits.conf on all nodes.

Shell Limit Value
oracle soft nproc 16384
oracle hard nproc 16384
oracle soft nofile 20480
oracle hard nofile 65536
oracle soft stack 10240
oracle hard stack 32768

7. Ensure the following miscellaneous settings are updated on all nodes

Component Setting
Ntpd Configuration OPTIONS=”-x -u ntp:ntp -p /var/run/ntpd.pid”
NIC Ethernet Frame Must be capable of an MTU of 9000 without being split
Nsswicth Configuration hosts: dns files
Iptables Configuration iptables 0:off1:off2:off3:off4:off5:off6:off
Swap Space Memory between 4GB and 16GB, set swap to size of memory. Memory greater than 16GB, set swap to 16GB.
/tmp 1 GB (or greater)
Permissive Mode Disabled (Site specific)
Pam Limit session required /lib64/security/pam_limits.so
NIC Names NIC names need to be consistent across nodes. If the interconnect NIC on node 1 is named eth0, then the interconnect NIC on other nodes should be named eth0.
/etc/hosts This should contain both the VIP and Public hostnames. The SCAN name should not be in /etc/hosts
SSH SSH for Oracle is required between all nodes in the cluster
Interconnect If using multiple interconnects for redundancy, they should reside on separate subnets.
HBA and NIC cards For more predictable hardware discovery, place hba and nic cards in the same corresponding slot on each server in the Grid
grub.conf Add elevator=deadline to the end of the kernel entry.
grub.conf Add transparent_hugepage=never to the end of the file.
avahi-daemon If running shutdown and disable the avahi daemon
Problems with nproc. See Metalink 1487773.1 Update “/etc/security/limits.d/90-nproc.conf” with nproc 16384
tmpfs This should have rw,exec set
Transparent hugepages Transparent hugepages should be disabled and standard hugepages used instead.
Physical Memory At least 4GB per Node
/tmp/.oracle After installation is complete, do not manually remove or run jobs that remove these files.
/var/tmp/.oracle After installation is complete, do not manually remove or run jobs that remove these files.
/etc/security/limits.conf Set soft memlock to huge pages * 2048
/etc/security/limits.conf Set hard memlock to huge pages * 2048

8. ASMLIB will NOT be used for this guide. Instead disk have been configured manually using udev rules, device mapper and DM multipath

9. Ensure the minimum number of disks are available in /dev/mapper as detailed below. (Oracle recommend that at least 4 disks per diskgroup should be used)

Disk Name
/dev/mapper/asm-data01
/dev/mapper/asm-data02
/dev/mapper/asm-data03
/dev/mapper/asm-data04
/dev/mapper/asm-fra01
/dev/mapper/asm-fra02
/dev/mapper/asm-fra03
/dev/mapper/asm-fra04
/dev/mapper/asm-redo01
/dev/mapper/asm-redo02
/dev/mapper/asm-redo03
/dev/mapper/asm-redo04
/dev/mapper/asm-redo05
/dev/mapper/asm-redo06
/dev/mapper/asm-redo07
/dev/mapper/asm-redo08
/dev/mapper/asm-vote01
/dev/mapper/asm-vote02
/dev/mapper/asm-vote03

10. Create the .profile on each node - see File Listings section below.

11. Unzip the files

  • Log on as Oracle
  • cd /u01/app/oracle/SOFTWARE
  • unzip linuxamd64_12102_database_1of2.zip
  • unzip linuxamd64_12102_database_2of2.zip
  • unzip linuxamd64_12102_grid_1of2.zip
  • unzip linuxamd64_12102_grid_2of2.zip
  • unzip p6880880_121010_Linux-x86-64
  • unzip p20996835_121020_Linux-x86-64

12. Ensure DNS is configured correctly for the SCAN listener and for the Private, Public and VIP addresses

DNS Settings
myhost1 IN A 172.18.14.1
myhost2 IN A 172.18.14.2
myhost2 IN A 172.18.14.2
myhost1-hb IN A 172.18.13.11
myhost2-hb IN A 172.18.13.12
myhost2-hb IN A 172.18.13.13
myhost1-vip IN A 172.18.14.11
myhost2-vip IN A 172.18.14.12
myhost2-vip IN A 172.18.14.13
a-apploc-scan-p IN A 172.18.14.14
a-apploc-scan-p IN A 172.18.14.15
a-apploc-scan-p IN A 172.18.14.16

NOTE The above information will be used throughout this guide.

13. Set-up SSH passwordless connections between all nodes. This can be performed by the installer if desired.


Step-By-Step Guide - ASM Binary Installs

1. Start up an XTERM and log off on to Oracle.

2. Unset ORACLE_HOME and GRID_HOME and set umask

  • unset ORACLE_BASE
  • unset ORACLE_HOME
  • unset GRID_HOME
  • unset ORACLE_SID
  • unset ORA_CRS_HOME
  • unset TNS_ADMIN
  • unset DISPLAY
  • umask 022

3. Install Grid Infrastructure Using the GUI

  • cd /u01/app/oracle/SOFTWARE/grid
  • ./runInstaller

4. Follow the instructions as detailed in the screenshots here

5. When prompted run the root scripts in the order specified

  • Log on as root
  • /u01/app/oraInventory/orainstRoot.sh
  • /u01/app/oracle/product/12.1.0/grid/root.sh

Step-By-Step Guide - Configure ASM

1. Create the extra Disk Groups

  • . oraenv
  • ORACLE_SID = [oracle] ? +ASM1
  • sqlplus / as sysasm
  • SQL> CREATE DISKGROUP DATA01 EXTERNAL REDUNDANCY DISK ‘/dev/asm-data0*' ATTRIBUTE ‘COMPATIBLE.ASM’=’12.1.0.0.0′,’COMPATIBLE.RDBMS’=’12.1.0.0.0′,’AU_SIZE’=’4M';
  • SQL> CREATE DISKGROUP FRA01 EXTERNAL REDUNDANCY DISK ‘/dev/asm-fra0*' ATTRIBUTE ‘COMPATIBLE.ASM’=’12.1.0.0.0′,’COMPATIBLE.RDBMS’=’12.1.0.0.0′,’AU_SIZE’=’4M';
  • SQL> CREATE DISKGROUP REDO01 EXTERNAL REDUNDANCY DISK ‘/dev/asm-redo0[1,3,5,7]′ ATTRIBUTE ‘COMPATIBLE.ASM’=’12.1.0.0.0′,’COMPATIBLE.RDBMS’=’12.1.0.0.0′,’AU_SIZE’=’4M';
  • SQL> CREATE DISKGROUP REDO02 EXTERNAL REDUNDANCY DISK ‘/dev/asm-redo0[2,4,6,8]′ ATTRIBUTE ‘COMPATIBLE.ASM’=’12.1.0.0.0′,’COMPATIBLE.RDBMS’=’12.1.0.0.0′,’AU_SIZE’=’4M';

2. Update parameter file with new Diskgroups

  • SQL> ALTER SYSTEM SET ASM_DISKGROUPS=‘DATA01′,‘FRA01′,‘REDO01′,‘REDO02′ SCOPE=BOTH SID=’*’
  • SQL> ALTER DISKGROUP VOTE01 SET ATTRIBUTE ‘compatible.rdbms’ = ‘12.1.0.0.0’
  • SQL> quit
  • srvctl start diskgroup -g DATA01
  • srvctl start diskgroup -g FRA01
  • srvctl start diskgroup -g REDO01
  • srvctl start diskgroup -g REDO02

3. Configure ASM to use huge pages

  • . oraenv
  • ORACLE_SID = [oracle] ? +ASM1
  • SQL> sqlplus / as sysasm
  • SQL> alter system set memory_max_target=0 scope=spfile sid=’*’;
  • SQL> alter system set memory_target=0 scope=spfile sid=’*’;
  • SQL> alter system set sga_target=1088M scope=spfile sid=’*’;
  • SQL> alter system set use_large_pages=’ONLY’ scope=spfile sid=’*’;
  • SQL> quit
  • sudo /u01/app/12.1.0/grid/bin/crsctl stop cluster -all
  • sudo /u01/app/12.1.0/grid/bin/crsctl start cluster -all

Step-By-Step – Oracle Database Binary Install

1. Start up an XTERM and log on to Oracle

2. Unset variables and set umask

  • unset ORACLE_BASE
  • unset ORACLE_HOME
  • unset GRID_HOME
  • unset ORACLE_SID
  • unset ORA_CRS_HOME
  • unset TNS_ADMIN
  • unset DISPLAY
  • umask 022

3. Install Database Software

  • cd /u01/app/oracle/SOFTWARE/database
  • ./runInstaller

4. Follow the instructions as detailed in the screenshots here and when prompted run root.sh.

  • Log on as root to each node in the order specified.
  • cd /u01/app/oracle/product/12.1.0/dbhome_1
  • ./root.sh

5. Create a symbolic link for TNS directory entries to stop dbca from failing on DB creation and on crsct startup.

  • cd /u01/app/oracle/product/12.1.0/dbhome_1/network/admin
  • ln -s /u01/app/12.1.0/grid/network/admin/tnsnames.ora
  • ln -s /u01/app/12.1.0/grid/network/admin/sqlnet.ora
  • ln -s /u01/app/12.1.0/grid/network/admin/listener.ora

Step-By-Step – Oracle Database Creation

1. Log on to Oracle

2. Create the database using dbca

  • cd /u01/app/oracle/product/12.1.0/dbhome_1/bin
  • ./dbca

3. Follow the instructions as detailed in the screenshots here


Step-By-Step – Grid and Database Patching

1. Log on as Oracle

2. Install the latest version of OPatch in the GI home and DB home

  • unzip p6880880_121010_Linux-x86-64.zip -d /u01/app/12.1.0/grid
  • unzip p6880880_121010_Linux-x86-64.zip -d /u01/app/oracle/product/12.1.0/dbhome_1

3. Check the version of OPatch

  • export ORACLE_HOME=/u01/app/12.1.0/grid
  • $ORACLE_HOME/OPatch/opatch version
  • export ORACLE_HOME=/u01/app/oracle/product/12.1.0/dbhome_1
  • $ORACLE_HOME/OPatch/opatch version

4. Validate the oraInventory

  • export ORACLE_HOME=/u01/app/12.1.0/grid
  • $ORACLE_HOME/OPatch/opatch lsinventory -detail -oh /u01/app/12.1.0/grid
  • export ORACLE_HOME=/u01/app/oracle/product/12.1.0/dbhome_1
  • $ORACLE_HOME/OPatch/opatch lsinventory -detail -oh /u01/app/oracle/product/12.1.0/dbhome_1

5. Log on as root

6. Create a Grid OCM response file

  • export ORACLE_HOME=/u01/app/12.1.0/grid
  • $ORACLE_HOME/OPatch/ocm/bin/emocmrsp -no_banner -output /tmp/GI_ocm.rsp
    • Press return when prompted for an email
    • Answer “Yes” to remain uninformed of updates

7. Analyze the patch for conflicts with other patches already installed

  • $ORACLE_HOME/OPatch/opatchauto apply /u01/app/oracle/SOFTWARE/20996835 -analyze -ocmrf /tmp/GI_ocm.rsp

8. Patch the Grid Infrastructure home and the Database Home

  • $ORACLE_HOME/OPatch/opatchauto apply /u01/app/oracle/SOFTWARE/20996835 -ocmrf /tmp/GI_ocm.rsp

Step-By-Step – Database Configuration (Optional and Site Specific)

1. Log on as Oracle

2. Update the oratab

  • ssh myhost1
  • sudo crsctl stop crs
  • ssh myhost2
  • sudo crsctl stop crs
  • ssh myhost3
  • sudo crsctl stop crs
  • ssh myhost1
  • vi /etc/oratab
    • Add the following line
      • MYRACDB01:/u01/app/oracle/product/12.1.0/dbhome_1:N
  • ssh myhost2
  • vi /etc/oratab
    • Add the following line
      • MYRACDB02:/u01/app/oracle/product/12.1.0/dbhome_1:N
  • ssh myhost3
  • vi /etc/oratab
    • Add the following line
      • MYRACDB03:/u01/app/oracle/product/12.1.0/dbhome_1:N
  • ssh myhost1
  • sudo crsctl start crs
  • ssh myhost2
  • sudo crsctl start crs
  • ssh myhost3
  • sudo crsctl start crs

3. Set some database options and rename the spfile in ASM

  • . oraenv
  • ORACLE_SID = [oracle] ? MYRACDB01
  • SQL> sqlplus / as sysdba
  • SQL> alter database flashback on;
  • SQL> alter database force logging;
  • SQL> alter system set cursor_sharing=force scope=spfile sid=’*';
  • SQL> alter system set control_file_record_keep_time =14 scope=spfile sid=’*’;
  • SQL> alter system set use_large_pages =’ONLY’ scope=spfile sid=’*’;
  • SQL> BEGIN;
  • SQL> exec dbms_auto_task_admin.disable(client_name => ‘auto optimizer stats collection’, operation => NULL, window_name => NULL);
  • SQL> alter system set undo_retention=54000 scope=spfile sid=’*';
  • SQL> alter system set inmemory_query=’DISABLE’ scope=spfile sid=’*';
  • SQL> quit
  • srvctl stop cluster -all
  • ssh myhost1
  • cd $ORACLE_HOME/dbs
  • mv initMYRACDB01.ora /u01/app/oracle/admin/MYRACDB00/pfile/initMYRACDB01.ora
  • ln -s /u01/app/oracle/admin/MYRACDB00/pfile/initMYRACDB01.ora
  • ssh myhost2
  • cd $ORACLE_HOME/dbs
  • mv initMYRACDB02.ora /u01/app/oracle/admin/MYRACDB00/pfile/initMYRACDB02.ora
  • ln -s /u01/app/oracle/admin/MYRACDB00/pfile/initMYRACDB02.ora
  • ssh myhost3
  • cd $ORACLE_HOME/dbs
  • mv initMYRACDB03.ora /u01/app/oracle/admin/MYRACDB00/pfile/initMYRACDB03.ora
  • ln -s /u01/app/oracle/admin/MYRACDB00/pfile/initMYRACDB03.ora
  • srvctl start cluster -all
  • rman
  • RMAN> connect target /
  • RMAN> configure controlfile autobackup on;
  • RMAN> quit

3. Implement DCD on the databases.

  • On each node perform the following
    • cd $TNS_ADMIN
    • vi sqlnet.ora
    • Add the following line to the sqlnet.ora file.
    • SQLNET.EXPIRE_TIME = 10

Security Compliance (Recommended, but optional)

The following steps should be performed once the database has been built to ensure that the environment conforms to Oracle's Best Practices and also ensures that it doesn't fall foul of Internal Audit.

1. Remove the GRANT EXECUTE TO PUBLIC privilege from potentially harmful packages.

  • sqlplus '/ as sysdba'
  • SQL> revoke execute on utl_file from public;
  • SQL> revoke execute on dbms_random from public;
  • SQL> revoke execute on utl_http from public;
  • SQL> revoke execute on utl_smtp from public;
  • SQL> revoke execute on utl_tcp from public;
  • SQL> exit

2. Ensure the following user-ids' passwords, where applicable, have been changed on ASM and the Database:

  • SYS
  • SYSTEM
  • DBSNMP
  • ASMSNMP

3. Adjust the database DEFAULT TABLESPACE settings so that the SYSTEM tablespace is not used inappropriately.

  • sqlplus '/ as sysdba'
  • SQL> alter database default tablespace users;
  • SQL> alter user sys default tablespace system;
  • SQL> alter user system default tablespace system;

4. Correct any users that already have SYSTEM as their DEFAULT TABLESPACE

  • sqlplus '/ as sysdba'
  • SQL> select username, default_tablespace from dba_users where default_tablespace = 'SYSTEM';
  • SQL> alter user <user name> default tablespace <non-SYSTEM tablespace>;
  • SQL> exit

5. Lock and expire potentially harmful built-in user-ids.

  • sqlplus '/ as sysdba'
  • SQL> alter user &user_idpassword expire account lock;
    • Repeat for each user as required.
  • SQL> exit

Regression

To restore the environment back to its initial state, perform the following

1. Shutdown the environment

2. Remove all database files, binaries, trace files and administration logs using the deinstall tool - see Deinstall Section below.


File Listings

oracle .profile

#----------------------------------------------------------------------
# Configure Terminal Settings.
#----------------------------------------------------------------------

stty susp ^Z
stty quit ^C
stty erase ^?
export ORACLE_TERM=vt100

#----------------------------------------------------------------------
# Configure Shell Settings.
#----------------------------------------------------------------------

set -o vi
export PATH=/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/ccs/bin:$PATH
export EDITOR=vi
export HOSTNAME=`hostname`
export PS1='$LOGNAME@$HOSTNAME:$ORACLE_SID> '
export TMPDIR=/tmp
export TEMP=/tmp
export TMOUT=7200
umask 022

#----------------------------------------------------------------------
# Configure Aliases.
#----------------------------------------------------------------------

alias ll="ls -la"
alias lt="ls -lrt|tail"
alias bdf="df -h"

#----------------------------------------------------------------------
# Configure Oracle Settings.
#----------------------------------------------------------------------

export ORACLE_BASE=/u01/app/oracle
export SQLPATH=$ORACLE_BASE/DBA/SQL
export ORACLE_HOME=$ORACLE_BASE/product/12.1.0/dbhome_1
export OPATCH_LIB=/u01/app/oracle/SOFTWARE/OPATCH/OPatch
export PATH=$ORACLE_HOME/bin:$PATH:$OPATCH_LIB
export GRID_HOME==/u01/app/12.1.0/grid
export TNS_ADMIN=$GRID_HOME/network/admin

oratab

myhost1

MYRACDB001:/u01/app/oracle/product/12.1.0/dbhome_1:Y
+ASM1:/u01/app/12.1.0/grid:N

myhost2

MYRACDB02:/u01/app/oracle/product/12.1.0/dbhome_1:Y
+ASM2:/u01/app/12.1.0/grid:N

myhost3

MYRACDB003:/u01/app/oracle/product/12.1.0/dbhome_1:Y
+ASM3:/u01/app/12.1.0/grid:N

File Systems

--- /u01 --- /app --- /oraInventory
|aaaaaaaaaaaaaa|
|aaaaaaaaaaaaaa--- /12.1.0 ---/grid
|aaaaaaaaaaaaaa|
|aaaaaaaaaaaaaa--- /oracle --- /software
|aaaaaaaaaaaaaaaaaaaaaaa|
|aaaaaaaaaaaaaaaaaaaaaaa--- /dba --- /scripts
|aaaaaaaaaaaaaaaaaaaaaaa|
|aaaaaaaaaaaaaaaaaaaaaaa|aaaaaaa--- /sql
|aaaaaaaaaaaaaaaaaaaaaaa|
|aaaaaaaaaaaaaaaaaaaaaaa--- /diag
|aaaaaaaaaaaaaaaaaaaaaaa|
|aaaaaaaaaaaaaaaaaaaaaaa--- /product ---/12.1.0 ---/dbhome_1
|aaaaaaaaaaaaaaaaaaaaaaa|
|aaaaaaaaaaaaaaaaaaaaaaa--- /admin --- /SID --- /adump
|aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa|
|aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa--- /pfile


Example GRID Infrastructure Install

RAC_12c_GridInfra_001.jpg
  • Select Install and Configure Oracle Grid Infrastructure for a Cluster
  • Click Next

RAC_12c_GridInfra_002.jpg
  • Select Configure a Standard cluster
  • Click Next

RAC_12c_GridInfra_003.jpg
  • Select Advanced Installation
  • Click Next

RAC_12c_GridInfra_004.jpg
  • Click Add all to select all languages
  • Click Next

RAC_12c_GridInfra_005.jpg
  • Set Cluster Name to a-apploc-clu-p
  • Set SCAN Name to a-apploc-scan-p
  • Set SCAN Port to 1521
  • Untick Configure GNS
  • Click Next

RAC_12c_GridInfra_006.jpg
  • Click Add

Note
If SSH connectivity has not been set-up, now is the time to do it. Click SSH connectivity… to perform the set-up.


RAC_12c_GridInfra_007.jpg
  • Set Public Hostname to myhost2.mydomain.com
  • Set Virtual Hostname to myhost2-vip.mydomain.com
  • Click OK

RAC_12c_GridInfra_008.jpg

Click Add


RAC_12c_GridInfra_009.jpg
  • Set Public Hostname to myhost3.mydomain.com
  • Set Virtual Hostname to myhost3-vip.mydomain.com
  • Click OK

RAC_12c_GridInfra_010.jpg
  • Click Next

RAC_12c_GridInfra_011.jpg
  • Set bond1 (172.18.13.0) to Private. This will be used for the interconnect.
  • Set bond2 (172.18.14.0) to Public. This will be used for application connections
  • Set any other bonds on the servers to Do Not Use
  • Click Next

RAC_12c_GridInfra_012.jpg

Select Use Standard ASM for storage
Click Next


RAC_12c_GridInfra_013.jpg
  • Set Disk group name to VOTE01
  • Set Redundancy to Normal
  • Set Allocation Unit Size to 4MB
  • Select radial button Candidate Disks
  • Click Change Discovery Path

RAC_12c_GridInfra_014.jpg
  • Set Disk Discovery Path to /dev/mapper/asm
  • Click OK

RAC_12c_GridInfra_015.jpg
  • Ensure all three voting disks are ticked
  • Click Next

RAC_12c_GridInfra_016.jpg
  • Select the radial button Use different passwords for these accounts
  • Click Next

RAC_12c_GridInfra_017.jpg
  • Select Do not use Intelligent Platform Management Interface (IPMI)
  • Click Next

RAC_12c_GridInfra_018.jpg
  • Untick Register with Enterprise Manager (EM) Cloud Control
  • Click Next

RAC_12c_GridInfra_019.jpg
  • In this installation the same OS group is going to be used. This may not be suitable for all environments.
  • Set Oracle ASM Administrator (OSASM) Group to dba
  • Set Oracle ASM DBA (OSDBA for ASM) Group to dba
  • Leave Oracle ASM Operator (OSOPER for ASM) Group (Optional) blank
  • Click Next

RAC_12c_GridInfra_020.jpg
  • If presented with this screen click Yes

RAC_12c_GridInfra_021.jpg
  • Ensure Oracle base is set to /u01/app/oracle
  • Ensure Software location is set to /u01/app/12.1.0/grid
  • The fields should already be populated with the above values.
  • They can be changed, but it is recommended to keep the defaults.
  • Click Next

RAC_12c_GridInfra_022.jpg
  • Ensure Inventory Directory is set to /u01/app/oraInventory
  • The field should already be populated with the value above.
  • The Inventory Directory can be changed, but it is recommended to keep the defaults.
  • Click Finish

RAC_12c_GridInfra_023.jpg
  • In this environment the root password is not known, so configuration scripts will be run after installation.
  • Click Next

RAC_12c_GridInfra_024.jpg
  • For demonstration purposes, this installation has some issues.
  • The Fix & Check Again button can be used to fix any issues.
  • Note that not all issues can be fixed and it may be necessary to refer the issues to a Unix Administrator
  • Click Check Again when all issues have been resolved.

RAC_12c_GridInfra_025.jpg
  • At this point a Response File can be saved by clicking Save Response File…
  • A response file can be used for automated deployments.
  • Review this screen and click Install

RAC_12c_GridInfra_026.jpg
  • This screen will move on automatically.

RAC_12c_GridInfra_027.jpg
  • Run the orainstRoot.sh script on all nodes in the order specified.
  • Run the root.sh script on all nodes in the order specified.
  • Click OK when all scripts have completed successfully.

RAC_12c_GridInfra_028.jpg
  • Wait for the installation to complete.
  • This screen will move on automatically.

RAC_12c_GridInfra_029.jpg
  • Click Close

Example Database Binary Install

RAC_12c_Database_001.jpg
  • Un-tick the I wish to receive security updates via My Oracle Support box.
    • NB This is site specific and should be reviewed.
  • Click Next.

RAC_12c_Database_001a.jpg
  • Click Yes to remain uninformed.

RAC_12c_Database_002.jpg
  • Select Install database software only
  • Click Next.

RAC_12c_Database_003.jpg
  • Ensure Oracle Real Application Clusters database installation is selected.
  • Click Next.

RAC_12c_Database_004.jpg

Click Select all
Click Next


RAC_12c_Database_005.jpg
  • Select the languages you require. In this instance all languages have been chosen.
  • Click Next

RAC_12c_Database_006.jpg
  • Set Database edition to Enterprise Edition (6.4GB)
  • Click Next

RAC_12c_Database_007.jpg
  • Ensure Oracle base is set to /u01/app/oracle
  • Ensure Software location is set to /u01/app/oracle/product/12.1.0/dbhome_1
  • The fields should already be populated with the above values.
  • They can be changed, but it is recommended to keep the defaults.
  • Click Next

RAC_12c_Database_008.jpg
  • In this installation different OS groups will be used. Optional groups will be left blank.
  • This may not be suitable for all environments.
  • Set Database Administrator (OSDBA) Group to dba
  • Leave Database Operator (OSOPER) Group (Optional) blank.
  • Set Database Backup and Recovery (OSBACKUPDBA) Group to bckpdba
  • Set Data Guard administrative (OSDGDBA) Group to dgdba
  • Set Encryption Key Management administrative (OSKMDBA) Group to kmdba
  • Click Next

RAC_12c_Database_009.jpg
  • Wait for the verification process to complete.
  • This screen moves on automatically when complete.

RAC_12c_Database_010.jpg
  • For demonstration purposes, this installation has some issues.
  • The Fix & Check Again button can be used to fix any issues.
  • Note that not all issues can be fixed and it may be necessary to refer the issues to a Unix Administrator
  • Click Check Again when all issues have been resolved.

RAC_12c_Database_011.jpg
  • Review this screen and click Install
  • At this point a Response File can be saved by clicking Save Response File…
  • A response file can be used for automated deployments.

RAC_12c_Database_012.jpg
  • Wait for the installation process to complete.
  • This screen will move on automatically.

RAC_12c_Database_013.jpg
  • Get a UNIX administrator to run the root.sh script as the root user on all nodes in the order specified.
  • Click OK when the Configuration Scripts have completed successfully.

RAC_12c_Database_014.jpg
  • Click Close

Example Database Creation

RAC_12c_DBCA_001.jpg
  • Select Create Database
  • Click Next.

RAC_12c_DBCA_002.jpg
  • Select Advanced Mode.
  • Click Next.

RAC_12c_DBCA_003.jpg
  • Ensure Database Type is set to Oracle Real Application Clusters (RAC) database
  • Set Configuration Type to Admin-Managed
  • Select Custom Database
  • Click Next.

RAC_12c_DBCA_004.jpg
  • Set Global Database Name to MYRACDB00
  • Ensure SID Prefix has been populated with MYRACDB0
  • Ensure Create As Container Database is not ticked.
  • Click Next

RAC_12c_DBCA_005.jpg
  • Select all nodes by clicking Select All
  • Click Next

RAC_12c_DBCA_006.jpg
  • Ensure Run Cluster Verification Utility (CVU) Checks Periodically is ticked.
  • Tick Enterprise Manager (EM) Database Express if you want Database Express installed.
  • Tick Register with Enterprise Manager (EM) Cloud Control if you want to register with Cloud Control

NOTE
In this installation Database Express will not be installed, nor will the system be registered with Cloud Control


RAC_12c_DBCA_007.jpg

Set and confirm the passwords for the SYS and SYSTEM user.
Click Next


RAC_12c_DBCA_008.jpg
  • Ensure Database files Storage Type is set to Automatic Storage Management (ASM)
  • Select Use Common Location for All Database Files
  • Set File Location to +DATA01
  • Tick Use Oracle-Managed Files
  • Ensure Recovery files Storage Type is set to Automatic Storage Management (ASM)
  • Tick Specify Fast Recovery Area
  • Set Fast Recovery Area to +FRA01
  • Set the Fast Recovery Area Size to a suitable value
  • Tick Enable Archiving
  • Click Multiplex Redo Logs and Control Files…

RAC_12c_DBCA_009.jpg
  • Set Location 1 to +REDO01
  • Set Location 2 to +REDO02
  • Click OK

RAC_12c_DBCA_010.jpg
  • Click Next

RAC_12c_DBCA_011.jpg
  • Select the additional products that need to be installed. In this installation just Oracle JVM will be installed.
  • In this installation Sample Schemas will be left as default.
  • Click Next.

RAC_12c_DBCA_012.jpg
  • For this installation, large pages will be used, so Automatic Shared Memory Management will need to be set
  • Click Custom Settings
  • Set Memory Management to Automatic Shared Memory Management
  • Set SGA Size and PGA Size to suitable values.
  • Click the Sizing tab.

RAC_12c_DBCA_013.jpg
  • Ensure Block Size is set to a suitable value. For most cases, this will be 8192
  • Set the Processes value to a suitable number for the environment.
  • Click the Character Sets tab.

RAC_12c_DBCA_014.jpg
  • These settings are dependent on the environment being built.
  • Select Use Unicode (AL32UTF8) - Most systems would use this value.
  • Set National Character Set to UTF8 - Unicode 3.0 UTF-8 Universal character set, CESU-8 compliant - Most systems would use this value.
  • Set a Default Language
  • Set a Default Territory
  • Click the Connection Mode tab.

RAC_12c_DBCA_015.jpg
  • Select Dedicated Server Mode
  • Click All Initialization Parameters...

RAC_12c_DBCA_016.jpg
  • Click Show Advanced Parameters

RAC_12c_DBCA_017.jpg
  • Set the Initialization Parameters appropriately.
  • In this installation the following parameters have been set in the DBCA GUI
  • control_files have been set to use +DATA01 and +FRA01
  • db_create_online_log_dest_1 has be set to use +REDO01
  • db_create_online_log_dest_2 has be set to use +REDO02
  • db_ultra_safe has been set to DATA_ONLY
  • Click Close

RAC_12c_DBCA_018.jpg
  • Click Next.

RAC_12c_DBCA_019.jpg
  • Tick Create Database
  • If required at this point, a Database Template can be created by ticking Save as Database Template
  • Set a Name for the Database Template if the Save as Database Template box has been ticked.
  • The database creation scripts can be created by ticking Generate Database Creation Scripts
  • Click Customize Storage Locations… if there are requirements to customize database files. For example, adding additional REDO logs.
  • Otherwise, click Next

RAC_12c_DBCA_020.jpg
  • This screen will move on automatically after the CVU checks have completed.

RAC_12c_DBCA_021.jpg
  • Fix any failed validation checks, if any.
  • Click Next

RAC_12c_DBCA_022.jpg
  • Review the summary page
  • Click Finish to create the database

RAC_12c_DBCA_023.jpg
  • This screen will move on automatically.

RAC_12c_DBCA_024.jpg
  • Set-up the passwords by clicking on Password Management if required.
  • Click Close.

Other References

Known Issues

Oratab Controlled by Clusterware

It seems that in 12c the oratab is controlled/cached by clusterware. After installing Oracle RAC, if the oratab is updated with clusterware running, the next time the system is shutdown and restarted, the oratab will be reset to its original state. To overcome this issue, shutdown clusterware before updating the oratab


Deinstalling Oracle 12g Binaries and Database

With 12.1 the deinstallation tool is located in the Oracle home directory after installation.

Step-by-Step

1. Run this tool from ORACLE_HOME first.

  • cd $ORACLE_HOME/deinstall
  • ./deinstall
  • When prompted for the database name enter the SID you want to remove.
    • NB This will remove the database binaries too.
  • When asked Do you still want to modify the details of SID database(s)? [n]: Answer N
    • NB You would answer Y if you wanted to amend the database configuration.
  • The tool should now complete okay after performing several tasks.

2. Now run the tool from the GRID_HOME.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License