Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC...

91
Create a virtual Oracle 12 RAC database Content Introduction: ............................................................................................................................................2 Step 1: Download the required software ..................................................................................4 Step 2: Install Virtual Box..................................................................................................................5 Step 3: Create the first virtual node (rob01db01) ............................................................. 10 Step 4: Create the guest operating system for rob01db01 .......................................... 19 Step 5: Linux Post Installation steps on virtual node rob01db01 ............................. 27 Step 6: Create /u01 logical volume on node rob01db01 ............................................... 36 Step 7: Configure DNS ..................................................................................................................... 44 Step 8: Create +ASM storage ........................................................................................................ 48 Step 9: Create the second Virtual Machine ........................................................................... 57 Step 10: Final checks before Grid and DB installation .................................................... 62 Step 11: Install Grid Infrastructure ........................................................................................... 64 Step 12: Install Database Software ........................................................................................... 78 Step 13: Create a Container Database ..................................................................................... 86 Step 14: Install SQL Developer (optional) .............................................................................. 91

Transcript of Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC...

Page 1: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

Content

Introduction: ............................................................................................................................................ 2

Step 1: Download the required software .................................................................................. 4

Step 2: Install Virtual Box.................................................................................................................. 5

Step 3: Create the first virtual node (rob01db01) ............................................................. 10

Step 4: Create the guest operating system for rob01db01 .......................................... 19

Step 5: Linux Post Installation steps on virtual node rob01db01 ............................. 27

Step 6: Create /u01 logical volume on node rob01db01 ............................................... 36

Step 7: Configure DNS ..................................................................................................................... 44

Step 8: Create +ASM storage ........................................................................................................ 48

Step 9: Create the second Virtual Machine ........................................................................... 57

Step 10: Final checks before Grid and DB installation .................................................... 62

Step 11: Install Grid Infrastructure ........................................................................................... 64

Step 12: Install Database Software ........................................................................................... 78

Step 13: Create a Container Database ..................................................................................... 86

Step 14: Install SQL Developer (optional) .............................................................................. 91

Page 2: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

Introduction:

In this manual you can read how to create your own virtual Oracle 12c RAC environment with 1

container database (CDB) and several pluggable databases (PDB). Just follow the manual step by step,

but first read this little introduction section, so you know what we will be doing:

The following cluster configuration will be created:

Node rob01db01.localdomain Node rob01db02.localdomain

eth0 (host-only): 192.168.56.101

subnet=255.255.255.0

gateway=192.168.56.1

DNS=192.168.56.1

Search=localdomain

(Connect Automatically)

eth0 (host-only): 192.168.56.102

subnet=255.255.255.0

gateway=192.168.56.1

DNS=192.168.56.1

Search=localdomain

(Connect Automatically)

eth1 (host-only): 192.168.1.101

subnet=255.255.255.0 Gateway=<blank>

DNS=<blank>

Search=<blank>

(Connect Automatically

eth1 (host-only): 192.168.1.102

subnet=255.255.255.0 Gateway=<blank>

DNS=<blank>

Search=<blank>

(Connect Automatically

In order to install a fully functional RAC, the following IP addresses are required:

• 2 public IPs, one for each node, for the primary OS network interface

• 2 public IPs, one for each node, for the Virtual IP

• 3 public IPs, one for each SCAN listener

• 2 private IPs, one for each node, for the cluster private interconnect

Page 3: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

Component Installation:

• Oracle Virtual Box on the laptop.

• 2 Virtual nodes with the following installed inside that virtual node:

o Oracle Enterprise Linux 6.4 (within the Virtual Box)

o Oracle Grid Infrastructure (within the Virtual Box)

o Oracle Database 12c (12.1.0.1)

Requirements:

• 3 GB memory for each virtual node

• 15 GB local diskspace for each virtual node

• 20 GB of shared storage

Details Oracle Enterprise Linux installation:

• Installation type: basic server

• Installation component list:

Base System > Base

Base System > Compatibility libraries

Base System > Hardware monitoring utilities

Base System > Large Systems Performance

Base System > Network file system client

Base System > Performance Tools

Base System > Perl Support

Servers > Server Platform

Servers > System administration tools

Desktops > Desktop

Desktops > Desktop Platform

Desktops > Fonts

Desktops > General Purpose Desktop

Desktops > Graphical Administration Tools

Desktops > Input Methods

Desktops > X Window System

Applications > Internet Browser

Development > Additional Development

Development > Development Tools

Page 4: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

Step 1: Download the required software

You will need the following software, which can be downloaded from Oracle:

• Oracle Linux 6.4 (https://edelivery.oracle.com/linux)

• Oracle Virtual Box 4.2.16 (https://www.virtualbox.org/wiki/Downloads)

• Oracle12c Release 1 (12.0.1.0.1) Grid Infrastructure Software (Linux x86-64)

http://www.oracle.com/technetwork/database/clusterware/overview/index-096607.html

• Oracle 12c Release 1 (12.0.1.0.1) Database Software (Linux x86-64)

(http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html)

In this workshop all the software will be placed in the location Z:\O12c_rac\software and all the data will

be placed in Z:\O12c_rac\data. You can choose your own location of course.

Page 5: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

!

Step 2: Install Virtual Box

Run the executable VirtualBox-4.2.16-86992-Win.exe

Just follow the screens to install Virtual Box

Page 6: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

"

Page 7: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

#

Page 8: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

$

Page 9: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

%

Run the Virtual Box Manager and choose from the main screen File => Preferences => Network

Double-click on Virtual Box Host-Only Ethernet Adapter. You can see the default settings, which should

be as shown below. If not, change them accordingly:

Page 10: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

�&

Step 3: Create the first virtual node (rob01db01)

Start Virtual Box, choose Menu Item “Bestand” and submenu item “New”

Allocat at least 3072 GB of memory for the virtual node:

Page 11: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

��

Page 12: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

��

The default of 12 GB is sufficient because we will create a separate volume for the /u01 filesystem later.

Now the Virtual Compute Node is configured. However, before we can start with the Linux installation we have to perform some additional configuration steps:

Page 13: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

��

Disable USB Controller:

Select the virtual box machine rob01db01 and click on Instellingen (Settings) in the upper left hand

corner. Open the USB sub-menu and uncheck the “Enable USB Controller” check box:

Configure the storage, first delete empty Storage (Opslag)

Locate and open the Linux ISO file:

Page 14: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

��

Configure the Network Settings:

Open the Network sub-menu. Under the adapter 1 tab, change the Attached to: Host-Only

Page 15: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

�!

Choose the adapter 2 tab. Check the box for Enable Network Adapter and change to Internal Network.

Enter the name rac-priv in the Name field:

Note: step below skipped for now. Choose nat for the 3rd adapter.

Page 16: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

�"

When you now look at the network adapters, it should be like shown below:

Page 17: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

�#

Configure the Boot Order:

In the system section, make sure that the hard disk is the first in the boot order and then the CD.

Deselect the floppy disk option:

Choose the adapter 3 tab.Check the box for Enable Network Adapter and change to NAT:

Configure Shared Folders

In the Shared Folders (gedeelde mappen), enter the path to the downloaded software

(Z:\O12c_rac\software) and enter a name for the folder . Check the automount checkbox:

Page 18: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

�$

Click on OK. You are now ready to install the Linux OS in the next step

Page 19: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

�%

Step 4: Create the guest operating system for rob01db01

Press on the Start button and browse to the first Linux ISO file you downloaded in an earlier step and

press Start:

As you can see below the Linux Installation screen appears.

Before you continue Select Weergave and then “Schaalmodus” to format your VM screen output:

Page 20: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

�&

Use the TAB key to move to “Skip”, and just follow the screens below.

Page 21: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

��

Page 22: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

��

In the pop-up box choose “Yes Discard any Data”

Enter rob01db01.robdomain as the hostname. Leave the Configure Network button for now. We’ll configure the network at a later stage.

Page 23: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

��

Click on Next

Password of the root user is welcome1

Page 24: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

��

Choose write changes to disk in the pop-up box

Press the button Customize Now to install some additional packages

Page 25: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

�!

Installation component list:

Base System > Base

Base System > Compatibility libraries

Base System > Hardware monitoring utilities

Base System > Large Systems Performance

Base System > Network file system client

Base System > Performance Tools

Base System > Perl Support

Servers > Server Platform

Servers > System administration tools

Desktops > Desktop

Desktops > Desktop Platform

Desktops > Fonts

Desktops > General Purpose Desktop

Desktops > Graphical Administration Tools

Desktops > Input Methods

Desktops > X Window System

Applications > Internet Browser

Development > Additional Development

Development > Development Tools

Page 26: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

�"

Finally, press Reboot and this step is ready. You can log on to the system as the root user. You have to answer a few questions such as setting the time and disabling kdump. Install Virtual Box Guest Additions Click on Devices=> Install Guest Additions to install the guest Additions.

Note: it is possible that you do not see the menu bar with “Machine, Weergeven, Apparaten, Help”. In that case you probably run in the scale mode, which does not show that menu bar. Change to another mode with the right CTRL button and press C at the same time.

Page 27: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

�#

Step 5: Linux Post Installation steps on virtual node rob01db01

Configure network interfaces

First view the settings of you r virtual adapter on your laptop / host computer , start a cmd prompt and type ipconfig:

You can see in the output above that the Virtual box Host Only Network gateway is 192.168.56.1, which

is the default.

Proceed with the virtual node rob01db01 and log on as the root user. Start a terminal session and stop

the nics. Then change the nic configuration as shown below. The entries in blue need to be added:

# ifdown eth0

# ifdown eth1

# cd /etc/sysconfig/network-scripts

[root@rob01db01 network-scripts]# cat ifcfg-eth0

DEVICE=eth0

HWADDR=08:00:27:2E:4F:00

TYPE=Ethernet

UUID=f2f989bc-ddc2-481b-99dc-8069c2f743b6

NM_CONTROLLED=yes

ONBOOT=yes

BOOTPROTO=none

IPV6INIT=no

IPADDR=192.168.56.101

NETMASK=255.255.255.0

GATEWAY=192.168.56.1

DNS1=192.168.56.101

DNS2=192.168.56.102

DOMAIN=robdomain

DEFROUTE=yes

NAME="System eth0"

Page 28: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

�$

[root@rob01db01 network-scripts]# cat ifcfg-eth1

DEVICE=eth1

HWADDR=08:00:27:1C:86:BD

TYPE=Ethernet

UUID=6f56d0e0-ea27-41a9-a95c-a00d6199fab7

NM_CONTROLLED=yes

ONBOOT=yes

BOOTPROTO=none

IPADDR=192.168.1.101

DOMAIN=robdomain

IPV6INIT=no

NAME="System eth1"

# Start the interfaces:

# ifup eth0

# ifup eth1

# ifconfig -a

Configure a Putty Session Create a new session in putty to the virtual node rob01db01 and connect to the virtual node:

Page 29: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

�%

Disable SELinux

1

Start the VI editor and edit file /etc/selinux/config Change entry SELINUX=enforced/targeted to SELINUX=disabled Reboot the server

# vi /etc/selinux/config

# change entry SELINUX=enforced/targeted to SELINUX=disabled

# reboot

Disable Linux firewall iptables

# service iptables status

# service iptables stop

# service iptables status

# chkconfig iptables off

# service ip6tables status

# service ip6tables stop

# service ip6tables status

# chkconfig ip6tables off

Disable kdump

Kdump is used for crash recovery and dumps the kernel prior to a crash for analysis. However, in this test

setup, as using kdump costs memory, we do want to make sure kdump is turned off:

# service kdump status

# chkconfig kdump off

1 Security-Enhanced Linux (SELinux) is a Linux feature that provides the mechanism for supporting access control

security policies, including United States Department of Defense-style mandatory access controls, through the use

of Linux Security Modules (LSM) in the Linux kernel. It is not a Linux distribution, but rather a set of kernel

modifications and user-space tools that can be added to various Linux distributions.

Page 30: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

�&

Add the Installation DVD/ISO as a repository and install additional packages

As a first step we have to mount the ISO cd rom.

Make sure the ISO file is selected in the Oracle VM Virtual Box Manager first:

Now we will create a local yum repostitory, which points to the mounted cd-rom.

Move the current yum repository:

[root@rob01db01 cdrom]# cd /etc/yum.repos.d

[root@rob01db01 yum.repos.d]# ls

public-yum-ol6.repo

[root@rob01db01 yum.repos.d]# mv public-yum-ol6.repo /tmp/public-yum-

ol6.repo

Mount the CD-ROM with the rpm’s

[root@robd01] # mkdir –p /mnt/cdrom

[root@robd01] # mkdir –p /yum_rob

[root@rob01db01 cdrom]# mount -t iso9660 /dev/cdrom /mnt/cdrom

[root@rob01db01]# cd /mnt/cdrom/Packages

[root@rob01db01 mnt]# cp *.rpm /yum_rob

Install the required rpm’s for yum:

[root@rob01db01 yum_rob]# rpm -ihv deltarpm-3.5-

0.5.20090913git.el6.x86_64.rpm

warning: deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm: Header V3 RSA/SHA256

Signature, key ID ec551f03: NOKEY

Preparing... ###########################################

[100%]

1:deltarpm ###########################################

[100%]

Page 31: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

��

[root@rob01db01 yum_rob]# rpm -ihv python-deltarpm-3.5-

0.5.20090913git.el6.x86_64.rpm

warning: python-deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm: Header V3

RSA/SHA256 Signature, key ID ec551f03: NOKEY

Preparing... ###########################################

[100%]

1:python-deltarpm ###########################################

[100%]

[root@rob01db01 yum_rob]# rpm -ihv createrepo-0.9.9-18.0.1.el6.noarch.rpm

warning: createrepo-0.9.9-18.0.1.el6.noarch.rpm: Header V3 RSA/SHA256

Signature, key ID ec551f03: NOKEY

Preparing... ###########################################

[100%]

1:createrepo ###########################################

[100%]

Create the repository

[root@rob01db01 Packages]# createrepo /yum_rob

Saving Primary metadata

Saving file lists metadata

Saving other metadata

Generating sqlite DBs

Sqlite DBs complete

Now create a yum configuration file:

# cd /etc/yum.repos.d

# cat robrepo.repo

[local]

name=Rob Repo

baseurl=file:///yum_rob

enabled=1

gpgcheck=0

Clean the yum data

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

Loaded plugins: refresh-packagekit, security

Cleaning repos: local public_ol6_UEKR3_latest public_ol6_latest

Cleaning up Everything

Build the yum data

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

Loaded plugins: refresh-packagekit, security

local

| 2.9 kB 00:00 ...

Page 32: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

��

local/primary_db

| 3.8 MB 00:00 ...

http://public-

yum.oracle.com/repo/OracleLinux/OL6/UEKR3/latest/x86_64/repodata/repomd.xml:

[Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'public-yum.oracle.com'"

Trying other mirror.

repo id repo name

status

local Rob Repo

3,754

public_ol6_UEKR3_latest Unbreakable Enterprise

Kernel Release 3 for Oracle Linux 6Server (x86_64)

0

public_ol6_latest Oracle Linux 6Server Latest

(x86_64)

0

repolist: 3,754

Install the Oracle Pre-Install package

There is one package which can do most of the work for you, oracle-rdbms-server-12c-

preinstall.x86_64.rpm. When installig this package all the dependant packages are also applied.

However, I could not find the package. Not on the CD and not on the public yum repository:

(http://public-yum.oracle.com/repo/OracleLinux/OL6/4/base/x86_64/ ) Alternatively, I installed

package oracle-rdbms-server-11gR2-preinstall.x86_64.rpm:

[root@rob01db01 yum.repos.d]# yum install oracle-rdbms-server-11gR2-

preinstall

Page 33: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

��

If you did NOT run the package, create the Oracle user and groups

# groupadd -g 54321 oinstall

# groupadd -g 54322 dba

# groupadd -g 54323 oper

# groupadd -g 54324 backupdba

# groupadd -g 54325 dgdba

# groupadd -g 54326 kmdba

# groupadd -g 54327 asmdba

# groupadd -g 54328 asmoper

# groupadd -g 54329 asmadmin

# useradd -u oracle -g oinstall -G dba,asmdba

Activate the changes

Run the following command to change the current kernel parameters.

# /sbin/sysctl -p

Page 34: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

��

Run additional packages that are required for the RAC installation:

# yum install -y tigervnc-server.x86_64 xclock man parted.x86_64 unzip.x86_64 xterm lsof bind xorg-x11-twm

Page 35: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

�!

Modify the pam.d login file to use limits

# sed -i -e '/session required pam_selinux.so open/i\

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

session required pam_limits.so' /etc/pam.d/login

Run the package below which is required by the Firefox Browser for EM Database Express

Download package flash-plugin-11.2.202.394-release.x86_64.rpm

Place it in the shared folder directory

Run as the root user on the linux os:

# rpm –Uhv flash-plugin-11.2.202.394-release.x86_64.rpm

Page 36: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

�"

Step 6: Create /u01 logical volume on node rob01db01

/u01 will contain all the Oracle software. So we will create a separate logical volume for this

environment. This enables us to make a snapshot backup of the file system and perform other

maintenance operations.

First of stop the shutdown the Linux Virtual Server and then continue.

A Create a new virtual disk on the laptop:

Click on “opslag” and then press on the green Plus next to “Controller: SATA” to create a new harddisk.

Page 37: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

�#

Page 38: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

�$

Press on Aanmaken and you can now see that the new disk is added:

Because this disk is dynamically allocated the initial size is only 83 KB.

Page 39: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

�%

B Start the virtual machine

C: Format the disk in the linux virtual box

[root@rob01db01 ~]# cd /dev

[root@rob01db01 dev]# ls sd*

sda sda1 sda2 sdb

The sda disks are the disks that were already configured during the linux installation. The sdb disk is the

new disk that was added. It needs to be configured now:

[root@rob01db01 dev]# fdisk /dev/sdb

Device contains neither a valid DOS partition table, nor Sun, SGI or OSF

disklabel

Building a new DOS disklabel with disk identifier 0x88c4bc9f.

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

After that, of course, the previous content won't be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by

w(rite)

WARNING: DOS-compatible mode is deprecated. It's strongly recommended to

switch off the mode (command 'c') and change display units to

sectors (command 'u').

Command (m for help): n

Command action

e extended

p primary partition (1-4)

p

Partition number (1-4): 1

First cylinder (1-2610, default 1): 1

Last cylinder, +cylinders or +size{K,M,G} (1-130, default 2610): 2610

Command (m for help): w

The partition table has been altered!

Calling ioctl() to re-read partition table.

Syncing disks.

Check the partition table to view the results:

# fdisk –l

. . . .

Disk /dev/sdb: 21.5 GB, 21474836480 bytes

255 heads, 63 sectors/track, 2610 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Page 40: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

�&

Device Boot Start End Blocks Id System

/dev/sdb1 1 2610 20964793+ 83 Linux

Disk identifier: 0x6c54aebb

D: create a physical volume for the new disk

[root@rob01db01 dev]# pvcreate /dev/sdb1

Physical volume "/dev/sdb1" successfully created

Check the new volume:

[root@rob01db01 dev]# pvdisplay

--- Physical volume ---

"/dev/sdb1" is a new physical volume of "19.99 GiB"

--- NEW Physical volume ---

PV Name /dev/sdb1

VG Name

PV Size 19.99 GiB

Allocatable NO

PE Size 0

Total PE 0

Free PE 0

Allocated PE 0

PV UUID iTyGhU-UbR1-3ZSo-x9Hu-AV70-atXy-Rq1o6W

E: create a volume group for the new physical volume

[root@rob01db01 dev]# vgcreate oracle_software /dev/sdb1

Volume group "software" successfully created

Done, let’s see if it has been created:

[root@rob01db01 dev]# vgdisplay

--- Volume group ---

VG Name oracle_software

System ID

Format lvm2

Metadata Areas 1

Metadata Sequence No 1

VG Access read/write

VG Status resizable

MAX LV 0

Cur LV 0

Open LV 0

Max PV 0

Cur PV 1

Act PV 1

VG Size 19.99 GiB

Page 41: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

��

PE Size 4.00 MiB

Total PE 5118

Alloc PE / Size 0 / 0

Free PE / Size 5118 / 19.99 GiB

VG UUID e2r56M-r4xR-C5FJ-v9YL-dqs4-MbVf-cPhiTb

And ..

[root@rob01db01 dev]# vgscan

Reading all physical volumes. This may take a while...

Found volume group "oracle_software" using metadata type lvm2

Found volume group "vg_rob01db01" using metadata type lvm2

F: Create a logical volume

[root@rob01db01 dev]# lvcreate --name oracle --size 19.5GB oracle_software

Logical volume "oracle" created

[root@rob01db01 dev]# lvdisplay

--- Logical volume ---

LV Path /dev/software/oracle

LV Name oracle

VG Name oracle_software

LV UUID PrDYku-fDRo-DpqV-fFgK-PSgv-TOkp-ufvQac

LV Write Access read/write

LV Creation host, time rob01db01.localdomain, 2014-04-05 14:42:35 +0200

LV Status available

# open 0

LV Size 19.50 GiB

Current LE 4992

Segments 1

Allocation inherit

Read ahead sectors auto

- currently set to 256

Block device 252:2

G: Building the filesystem on top of the logical volume

[root@rob01db01 software]# mkfs.ext3 /dev/oracle_software/oracle

mke2fs 1.43-WIP (20-Jun-2013)

Filesystem label=

OS type: Linux

Block size=4096 (log=2)

Fragment size=4096 (log=2)

Stride=0 blocks, Stripe width=0 blocks

1277952 inodes, 5111808 blocks

255590 blocks (5.00%) reserved for the super user

First data block=0

Maximum filesystem blocks=4294967296

Page 42: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

��

156 block groups

32768 blocks per group, 32768 fragments per group

8192 inodes per group

Superblock backups stored on blocks:

32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632,

2654208,

4096000

Allocating group tables: done

Writing inode tables: done

Creating journal (32768 blocks): done

Writing superblocks and filesystem accounting information: done

H: Mount the file system

[root@rob01db01 software]# mkdir -p /u01

[root@rob01db01 software]# mount /dev/oracle_software/oracle /u01/

[root@rob01db01 u01]# df –h

Filesystem Size Used Avail Use% Mounted on

/dev/mapper/vg_rob01db01-lv_root 13G 7.2G 5.0G 60% /

tmpfs 1.5G 8.0K 1.5G 1% /dev/shm

/dev/sda1 477M 55M 397M 13% /boot

/dev/sr0 3.7G 3.7G 0 100% /media/OL6.5 x86_64

Disc 1 20131125

/dev/mapper/software-oracle 20G 173M 19G 1% /u01

In order to make sure that the file system is automatically mounted after a reboot, enter the following

entry in /etc/fstab: /dev/oracle_software/oracle /u01 ext3 rw,noatime 0 0

I: Create the required oracle directories

# mkdir -p /u01/app/12.1.0.1/grid

# mkdir -p /u01/app/oracle/product/12.1.0.1/db_1

# chown -R oracle:oinstall /u01

# chmod -R 775 /u01/

Page 43: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

��

J: Log in as user Oracle and add the following lines to the /home/oracle/.bash_profile file:

. . .

. . .

export TMP=/tmp

export TMPDIR=$TMP

export ORACLE_HOSTNAME=rob01db01.localdomain

export ORACLE_UNQNAME=CDBRAC

export ORACLE_BASE=/u01/app/oracle

export GRID_HOME=/u01/app/12.1.0.1/grid

export DB_HOME=$ORACLE_BASE/product/12.1.0.1/db_1

export ORACLE_HOME=$DB_HOME

export ORACLE_SID=robdb

export ORACLE_TERM=xterm

export BASE_PATH=/usr/sbin:$PATH

export PATH=$ORACLE_HOME/bin:$GRID_HOME/bin:$BASE_PATH

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

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

alias grid_env='. /home/oracle/grid_env'

alias db_env='. /home/oracle/db_env'

Also create files grid_inv and db_env with execute rights in $HOME of user oracle as show below:

[oracle@rob01db01 ~]$ cat db_env

export ORACLE_SID=robdb

export ORACLE_HOME=$DB_HOME

export PATH=$ORACLE_HOME/bin:$BASE_PATH

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

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

[oracle@rob01db01 ~]$ cat grid_env

export ORACLE_SID=+ASM1

export ORACLE_HOME=$GRID_HOME

export PATH=$ORACLE_HOME/bin:$BASE_PATH

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

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

[oracle@rob01db01 ~]$ chmod +x grid_env

[oracle@rob01db01 ~]$ chmod +x db_env

I: Reboot the server

Now reboot the server and check that the filesystem /u01 is mounted afterwards.

Page 44: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

��

Step 7: Configure DNS

The RAC SCAN address must be resolved by DNS, so it can round-robin to 3 different ip addresses on the

same subnet as the public Ips. DNS can be configured on the host machine using Bind or

Dnsmasq.Dnsmasq is easier to set up, but in this example we will use Bind.

Step 7.1 Enable bind to start up at boot time:

[oracle@rob01db01 ~]# chkconfig named on

Step 7.2 Change named directory permissions:

# touch /var/named/robrack

# chmod 664 /var/named/robrack

# chgrp named /var/named/robrack

# chmod g+w /var/named

# chmod g+w /var/named/robrack

Step 7.3 backup the BIND configuration file

# [root@rob01db01 oracle]# cp /etc/named.conf /etc/named.conf.org

Step 7.4 Change the /etc/named.conf file

Edit the file /etc/named.conf as shown below, the entries in red have been changed:

options {

listen-on port 53 { 192.168.56.101; };

listen-on-v6 port 53 { ::1; };

directory "/var/named";

dump-file "/var/named/data/cache_dump.db";

statistics-file "/var/named/data/named_stats.txt";

memstatistics-file "/var/named/data/named_mem_stats.txt";

allow-query { 192.168.56.0/24; localhost; };

allow-transfer { 192.168.56.0/24; };

recursion yes;

dnssec-enable yes;

dnssec-validation yes;

dnssec-lookaside auto;

/* Path to ISC DLV key */

bindkeys-file "/etc/named.iscdlv.key";

managed-keys-directory "/var/named/dynamic";

};

logging {

Page 45: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

�!

channel default_debug {

file "data/named.run";

severity dynamic;

};

};

zone "." IN {

type hint;

file "named.ca";

};

include "/etc/named.rfc1912.zones";

include "/etc/named.root.key";

zone "robdomain" {

type master;

file "robrack";

};

zone "in-addr.arpa" {

type master;

file "in-addr.arpa";

};

Step 7.5 Create the zone file for the racattack domain on rob01db01

Run the command below o create the zone file, copy/paste the complete code block and execute:

# echo '$TTL 3H

@ IN SOA collabn1 hostmaster (

101 ; serial

1D ; refresh

1H ; retry

1W ; expire

3H ) ; minimum

NS rob01db01

NS rob01db02

localhost A 127.0.0.1

rob01db01 A 192.168.56.101

rob01db01-vip A 192.168.56.111

rob01db01-priv A 192.168.1.101

rob01db02 A 192.168.56.102

rob01db02-vip A 192.168.56.112

rob01db02-priv A 192.168.1.102

rob01-scan A 192.168.56.251

rob01-scan A 192.168.56.252

rob01-scan A 192.168.56.253' \

Page 46: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

�"

> /var/named/robrack

Step 7.6 Create the reverse zone file on rob01db01

Run the command below o create the zone file, copy/paste the complete code block and execute:

# echo '$TTL 3H

@ IN SOA rob01db01.robdomain. hostmaster.robdomain. (

101 ; serial

1D ; refresh

1H ; retry

1W ; expire

3H ) ; minimum

NS rob01db01.robdomain.

NS rob01db02.robdomain.

101.56.168.192 PTR rob01db01.robdomain.

111.56.168.192 PTR rob01db01-vip.robdomain.

101.1.168.192 PTR rob01db01-priv.robdomain.

102.56.168.192 PTR rob01db02.robdomain.

112.56.168.192 PTR rob01db02-vip.robdomain.

102.1.168.192 PTR rob01db02-priv.robdomain.

251.56.168.192 PTR rob01-scan.robdomain.

252.56.168.192 PTR rob01-scan.robdomain.

253.56.168.192 PTR rob01-scan.robdomain.' \

> /var/named/in-addr.arpa

Step 7.7 Create the rndc.key file

[root@rob01db01 named]# rndc-confgen -a -r /dev/urandom

wrote key file "/etc/rndc.key"

[root@rob01db01 named]# chgrp named /etc/rndc.key

[root@rob01db01 named]# chmod g+r /etc/rndc.key

Step 7.8 Restart the named server

[root@rob01db01 named]# service named restart

Stopping named: [ OK ]

Starting named: [ OK ]

Step 7.9 Check the /etc/resolv.conf file

[root@rob01db01 network-scripts]# cat /etc/resolv.conf

# Generated by NetworkManager

search robdomain

nameserver 192.168.56.101

# nameserver 192.168.56.102

Page 47: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

�#

Step 7.10 Check that DNS works fine:

[root@rob01db01 network-scripts]# nslookup rob01-scan.robdomain

Server: 192.168.56.101

Address: 192.168.56.101#53

Name: rob01-scan.robdomain

Address: 192.168.56.252

Name: rob01-scan.robdomain

Address: 192.168.56.253

Name: rob01-scan.robdomain

Address: 192.168.56.251

Also test the following:

# nslookup rob01db01

# nslookup rob01db01-vip

# nslookup rob01db01-priv

And the reverse lookup:

# nslookup 192.168.56.251

# nslookup 192.168.56.252

# nslookup 192.168.56.253

Page 48: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

�$

Step 8: Create +ASM storage

Step 8.1 Create the new disks in Virtual Box Manager

In the VirtualBox Manager, select the machine collabn1, click Settings -> Storage.

Select Controller SATA and click on the Add Hard Disk button:

Page 49: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

�%

Page 50: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

!&

Repeat the steps above to create 4 more disks of 4 GB each. Afterwards, you can see that all the disks

are added:

Page 51: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

!�

Step 8.2 Make the disks sharable

Click on File => Virtual Manager in order to make the disks sharable:

Page 52: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

!�

Rightclick on each asm disk and select Modify. Then mark the disk as Sharable:

Note: in the box below you can see how you can perform the steps above without the GUI interface,

using the CLI interface:

# create the disks

C:> Z:\software\Virtual_Box\VBoxManage.exe createhd --filename

C:\virtual_disks\12c_standalone\asm1.vdi --size 2048 --format VDI --variant Fixed

0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%

Disk image created. UUID: 21173cb0-b139-4618-969a-bab3f2ff4f4a

# attach the created virtual disks to rob01db01

C:>

Z:\software\Virtual_Box\VBoxManage.exe storageattach rob01db01 --storagectl "SATA" --

port 2 --device 0 --type hdd --medium c:\virtual_disks\12c_standalone\asm1.vdi --mtype

shareable

Z:\software\Virtual_Box\VBoxManage.exe storageattach rob01db01 --storagectl "SATA" --

port 3 --device 0 --type hdd --medium c:\virtual_disks\12c_standalone\asm2.vdi --mtype

shareable

Z:\software\Virtual_Box\VBoxManage.exe storageattach rob01db01 --storagectl "SATA" --

port 4 --device 0 --type hdd --medium c:\virtual_disks\12c_standalone\asm3.vdi --mtype

shareable

Z:\software\Virtual_Box\VBoxManage.exe storageattach rob01db01 --storagectl "SATA" --

port 5 --device 0 --type hdd --medium c:\virtual_disks\12c_standalone\asm4.vdi --mtype

shareable

Z:\software\Virtual_Box\VBoxManage.exe storageattach rob01db01 --storagectl "SATA" --

port 6 --device 0 --type hdd --medium c:\virtual_disks\12c_standalone\asm5.vdi --mtype

shareable

Page 53: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

!�

Z:\software\Virtual_Box\VBoxManage.exe storageattach rob01db01 --storagectl "SATA" --

port 7 --device 0 --type hdd --medium c:\virtual_disks\12c_standalone\asm6.vdi --mtype

shareable

Z:\software\Virtual_Box\VBoxManage.exe storageattach rob01db01 --storagectl "SATA" --

port 8 --device 0 --type hdd --medium c:\virtual_disks\12c_standalone\asm7.vdi --mtype

shareable

# Mark the virtual disks sharable:

C:> Z:\software\Virtual_Box\VBoxManage.exe modifyhd c:\virtual_disks\12c_standalone\asm1.vdi --type shareable

Step 8.3 Restart the virtual machine

Now restart the virtual machine. You should now see the newly created disks:

[root@rob01db01 ~]# ls -l /dev/sd*

brw-rw---- 1 root disk 8, 0 Jun 25 08:32 /dev/sda

brw-rw---- 1 root disk 8, 1 Jun 25 08:32 /dev/sda1

brw-rw---- 1 root disk 8, 2 Jun 25 08:32 /dev/sda2

brw-rw---- 1 root disk 8, 16 Jun 25 08:32 /dev/sdb

brw-rw---- 1 root disk 8, 17 Jun 25 08:32 /dev/sdb1

brw-rw---- 1 root disk 8, 32 Jun 25 08:32 /dev/sdc

brw-rw---- 1 root disk 8, 48 Jun 25 08:32 /dev/sdd

brw-rw---- 1 root disk 8, 64 Jun 25 08:32 /dev/sde

brw-rw---- 1 root disk 8, 80 Jun 25 08:32 /dev/sdf

brw-rw---- 1 root disk 8, 96 Jun 25 08:32 /dev/sdg

The newly created disks are /dev/sdc .. /dev/sdg

Step 8.4 Format the disks in linux

[root@rob01db01 ~]# cd /dev

[root@rob01db01 dev]# fdisk /dev/sdc

Device contains neither a valid DOS partition table, nor Sun, SGI or OSF

disklabel

Building a new DOS disklabel with disk identifier 0x88c4bc9f.

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

After that, of course, the previous content won't be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by

w(rite)

WARNING: DOS-compatible mode is deprecated. It's strongly recommended to

switch off the mode (command 'c') and change display units to

sectors (command 'u').

Command (m for help): n

Command action

e extended

p primary partition (1-4)

p

Partition number (1-4): 1

First cylinder (1-130, default 1): 1

Page 54: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

!�

Last cylinder, +cylinders or +size{K,M,G} (1-261, default 261): 261

Command (m for help): w

The partition table has been altered!

Calling ioctl() to re-read partition table.

Syncing disks.

Perform the same for disks sdd . . . sdi. Afterwards you can see that all the disks have been configured:

[root@rob01db01 dev]# ls -l sd*

brw-rw---- 1 root disk 8, 0 Jun 25 08:32 sda

brw-rw---- 1 root disk 8, 1 Jun 25 08:32 sda1

brw-rw---- 1 root disk 8, 2 Jun 25 08:32 sda2

brw-rw---- 1 root disk 8, 16 Jun 25 08:32 sdb

brw-rw---- 1 root disk 8, 17 Jun 25 08:32 sdb1

brw-rw---- 1 root disk 8, 32 Jun 25 08:50 sdc

brw-rw---- 1 root disk 8, 33 Jun 25 08:50 sdc1

brw-rw---- 1 root disk 8, 48 Jun 25 08:53 sdd

brw-rw---- 1 root disk 8, 49 Jun 25 08:53 sdd1

brw-rw---- 1 root disk 8, 64 Jun 25 08:53 sde

brw-rw---- 1 root disk 8, 65 Jun 25 08:53 sde1

brw-rw---- 1 root disk 8, 80 Jun 25 08:53 sdf

brw-rw---- 1 root disk 8, 81 Jun 25 08:53 sdf1

brw-rw---- 1 root disk 8, 96 Jun 25 08:54 sdg

brw-rw---- 1 root disk 8, 97 Jun 25 08:54 sdg1

Step 8.5 : Create UDEV rules

For Oracle Automatic Storage Manager (ASM) to use disks, it needs to be able to identify the devices

consistently and with the correct ownership and permissions. In Linux you can use ASMLib to manage

these tasks, but it is seen as an additional layer of complexity and has never really gained any popularity.

Instead, many people use the Linux device manager "udev" to perform these tasks. We will also make

use of UDEV in this case.

Essentially, what udev does is apply rules defined in files in the "/etc/udev/rules.d" directory to the

device nodes listed in the "/dev" directory. The rules can be defined in a variety of ways, but what we

need to do is identify the device and say what we want udev to do with it.

Create file /etc/scsi_id.config with entry options=-g to make the SCSI devices trusted.

[root@rob01db01 etc]# echo "options=-g" > /etc/scsi_id.config

Page 55: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

!!

We are going to write device-specific rules, so we need to be able to identify each device consistently,

irrespective of the order in which Linux discovers it. To do this run the code block below:

[root@rob01db01 dev]# i=1

cmd="/sbin/scsi_id -g -u -d"

for disk in sdc sdd sde sdf sdg ; do

cat <<EOF >> /etc/udev/rules.d/99-oracle-asmdevices.rules

KERNEL=="sd?1", BUS=="scsi", PROGRAM=="$cmd /dev/\$parent", \

RESULT=="`$cmd /dev/$disk`", NAME="asm-disk$i", OWNER="oracle", GROUP="dba",

MODE="0660"

EOF

i=$(($i+1))

done

Check the results:

[root@rob01db01 dev]# cat /etc/udev/rules.d/99-oracle-asmdevices.rules

KERNEL=="sd?1", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -d /dev/$parent",

RESULT=="1ATA_VBOX_HARDDISK_VBfe1039c4-37e9806f", NAME="asm-disk1",

OWNER="oracle", GROUP="dba", MODE="0660"

KERNEL=="sd?1", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -d /dev/$parent",

RESULT=="1ATA_VBOX_HARDDISK_VBecd1ef0f-b3e6854b", NAME="asm-disk2",

OWNER="oracle", GROUP="dba", MODE="0660"

KERNEL=="sd?1", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -d /dev/$parent",

RESULT=="1ATA_VBOX_HARDDISK_VBca25f4c1-067c6724", NAME="asm-disk3",

OWNER="oracle", GROUP="dba", MODE="0660"

KERNEL=="sd?1", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -d /dev/$parent",

RESULT=="1ATA_VBOX_HARDDISK_VB2d730696-42cc7b56", NAME="asm-disk4",

OWNER="oracle", GROUP="dba", MODE="0660"

KERNEL=="sd?1", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -d /dev/$parent",

RESULT=="1ATA_VBOX_HARDDISK_VBf3751852-d1307aad", NAME="asm-disk5",

OWNER="oracle", GROUP="dba", MODE="0660"

Step 8.6: Reload the udev rules and restart udev

[root@rob01db01 etc]# /sbin/partprobe /dev/sdc1 [root@rob01db01 etc]# udevadm test /block/sdc/sdc1

[root@rob01db01 etc]# /sbin/partprobe /dev/sdd1 [root@rob01db01 etc]# udevadm test /block/sdd/sdd1

[root@rob01db01 etc]# /sbin/partprobe /dev/sde1

[root@rob01db01 etc]# udevadm test /block/sde/sde1

[root@rob01db01 etc]# /sbin/partprobe /dev/sdf1

[root@rob01db01 etc]# udevadm test /block/sdf/sdf1

[root@rob01db01 etc]# /sbin/partprobe /dev/sdg1

[root@rob01db01 etc]# udevadm test /block/sdg/sdg1

Page 56: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

!"

Step 8.7 Restart UDEV

[root@rob01db01 etc]# udevadm control --reload-rules

[root@rob01db01 etc]# /sbin/start_udev

Starting udev: [ OK ]

[root@rob01db01 dev]# ls -l /dev/asm*

brw-rw---- 1 oracle dba 8, 33 Jun 25 14:38 asm-disk1

brw-rw---- 1 oracle dba 8, 49 Jun 25 14:38 asm-disk2

brw-rw---- 1 oracle dba 8, 65 Jun 25 14:38 asm-disk3

brw-rw---- 1 oracle dba 8, 81 Jun 25 14:38 asm-disk4

brw-rw---- 1 oracle dba 8, 97 Jun 25 14:38 asm-disk5

The shared disks are now configured and ready for the grid infrastructure. At a later stage the

ASM_DISKSTRING parameter can be set to "/dev/asm-disk*".

Page 57: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

!#

Step 9: Create the second Virtual Machine

In this step we will create the second Virtual Machine. You can clone the Virtual Machine or you can

create the second virtual machine just like the first. In this workshop we will create the virtual machine.

First repeat Step 3 of the manual.

In stead of rob01db01 create virtual node rob01db02

Repeat Step 4 of the manual

and install the Linux Guest OS

Repeat Step 5 of the manual: Linux Post Installation Steps

When configuring the network interfaces use 192.168.56.102 for the eth0 interface and 192.168.1.102

for the eth1 interface

Repeat Step 6 of the manual: Create /u01 file system

Repeat Step 7 of the manual: Configure DNS

Well, this step should not be repeated actually, because node rob01db01 (the first node) is the DNS

master, but the current node (rob01db02) is only the slave. Edit the file /etc/resolv.conf as shown

below:

[root@rob01db02 ~]# cat /etc/resolv.conf

search robdomain

DNS1=192.168.56.101

DNS2=192.168.56.102

Afterwards, test the DNS functionality on node rob01db02:

[root@rob01db02 ~]# nslookup rob01db02

Server: 192.168.56.101

Address: 192.168.56.101#53

Name: rob01db02.robdomain

Address: 192.168.56.102

[root@rob01db02 ~]# nslookup rob01db01

Server: 192.168.56.101

Address: 192.168.56.101#53

Name: rob01db01.robdomain

Address: 192.168.56.101

[root@rob01db02 ~]# nslookup 192.168.56.101

Server: 192.168.56.101

Address: 192.168.56.101#53

101.56.168.192.in-addr.arpa name = rob01db01.robdomain.

Page 58: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

!$

Repeat Step 8: Configure +ASM disks

Actually, the steps are somewhat different, as shown below:

First of all stop the second node (rob01db02) and add the disks as shown below:

Click on the plus to add a hard disk. But in the dialogue below we will now choose the option: “use an

existing disk”, since we already created that disk before, when we were working on node rob01db01:

In the popup screen, navigate to the first hard disk location (asm1)

Page 59: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

!%

Repeat the steps for disks asm2, asm3, asm4 and asm5. In the end we will see all 5 asm disks appear in

the Storage section of node rob01db02

Now restart the node rob01db02

Page 60: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

"&

Log on to the compute node again and you can see that the disks are already present and formatted:

[root@rob01db02 ~]# ls -l /dev/sd*

brw-rw---- 1 root disk 8, 0 Jun 26 16:58 /dev/sda

brw-rw---- 1 root disk 8, 1 Jun 26 16:59 /dev/sda1

brw-rw---- 1 root disk 8, 2 Jun 26 16:58 /dev/sda2

brw-rw---- 1 root disk 8, 16 Jun 26 16:58 /dev/sdb

brw-rw---- 1 root disk 8, 17 Jun 26 16:58 /dev/sdb1

brw-rw---- 1 root disk 8, 32 Jun 26 16:58 /dev/sdc

brw-rw---- 1 root disk 8, 33 Jun 26 16:58 /dev/sdc1

brw-rw---- 1 root disk 8, 48 Jun 26 16:58 /dev/sdd

brw-rw---- 1 root disk 8, 49 Jun 26 16:58 /dev/sdd1

brw-rw---- 1 root disk 8, 64 Jun 26 16:58 /dev/sde

brw-rw---- 1 root disk 8, 65 Jun 26 16:58 /dev/sde1

brw-rw---- 1 root disk 8, 80 Jun 26 16:58 /dev/sdf

brw-rw---- 1 root disk 8, 81 Jun 26 16:58 /dev/sdf1

brw-rw---- 1 root disk 8, 96 Jun 26 16:58 /dev/sdg

brw-rw---- 1 root disk 8, 97 Jun 26 16:58 /dev/sdg1

Continue with the following , the creation of the UDEV rules:

[root@rob01db02 ~]# echo "options=-g" > /etc/scsi_id.config

[root@rob01db02 dev]# i=1

cmd="/sbin/scsi_id -g -u -d"

for disk in sdc sdd sde sdf sdg ; do

cat <<EOF >> /etc/udev/rules.d/99-oracle-asmdevices.rules

KERNEL=="sd?1", BUS=="scsi", PROGRAM=="$cmd /dev/\$parent", \

RESULT=="`$cmd /dev/$disk`", NAME="asm-disk$i", OWNER="oracle", GROUP="dba",

MODE="0660"

EOF

i=$(($i+1))

done

Check the results:

[root@rob01db02 ~]# cat /etc/udev/rules.d/99-oracle-asmdevices.rules

KERNEL=="sd?1", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -d /dev/$parent",

RESULT=="1ATA_VBOX_HARDDISK_VBd7933c41-a558114e", NAME="asm-disk1",

OWNER="oracle", GROUP="dba", MODE="0660"

KERNEL=="sd?1", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -d /dev/$parent",

RESULT=="1ATA_VBOX_HARDDISK_VB99c2d4b0-8afba0d7", NAME="asm-disk2",

OWNER="oracle", GROUP="dba", MODE="0660"

KERNEL=="sd?1", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -d /dev/$parent",

RESULT=="1ATA_VBOX_HARDDISK_VBde8f6356-75553a39", NAME="asm-disk3",

OWNER="oracle", GROUP="dba", MODE="0660"

KERNEL=="sd?1", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -d /dev/$parent",

RESULT=="1ATA_VBOX_HARDDISK_VB8a4cef59-e25fcb5c", NAME="asm-disk4",

OWNER="oracle", GROUP="dba", MODE="0660"

KERNEL=="sd?1", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -d /dev/$parent",

RESULT=="1ATA_VBOX_HARDDISK_VB2b7c0777-bf1dae21", NAME="asm-disk5",

OWNER="oracle", GROUP="dba", MODE="0660"

Page 61: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

"�

Reload the rules and restart udev:

[root@rob01db02 etc]# /sbin/partprobe /dev/sdc1 [root@rob01db02 etc]# udevadm test /block/sdc/sdc1

[root@rob01db02 etc]# /sbin/partprobe /dev/sdd1

[root@rob01db02 etc]# udevadm test /block/sdd/sdd1

[root@rob01db02 etc]# /sbin/partprobe /dev/sde1 [root@rob01db02 etc]# udevadm test /block/sde/sde1

[root@rob01db02 etc]# /sbin/partprobe /dev/sdf1

[root@rob01db02 etc]# udevadm test /block/sdf/sdf1

[root@rob01db02 etc]# /sbin/partprobe /dev/sdg1 [root@rob01db02 etc]# udevadm test /block/sdg/sdg1

[root@rob01db02 ~]# udevadm control --reload-rules

[root@rob01db02 ~]# /sbin/start_udev

Starting udev: [ OK ]

[root@rob01db02 ~]# ls -l /dev/asm*

brw-rw---- 1 oracle dba 8, 33 Jun 27 08:32 /dev/asm-disk1

brw-rw---- 1 oracle dba 8, 49 Jun 27 08:32 /dev/asm-disk2

brw-rw---- 1 oracle dba 8, 65 Jun 27 08:32 /dev/asm-disk3

brw-rw---- 1 oracle dba 8, 81 Jun 27 08:32 /dev/asm-disk4

brw-rw---- 1 oracle dba 8, 97 Jun 27 08:32 /dev/asm-disk5

Page 62: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

"�

Step 10: Final checks before Grid and DB installation

We are now ready to install the Grid and DB software. First perform the checks below on both nodes

rob01db01 and rob01db02:

[root@rob01db01 network-scripts]# ping -c 1 rob01db01

PING rob01db01.robdomain (192.168.56.101) 56(84) bytes of data.

64 bytes from rob01db01.robdomain (192.168.56.101): icmp_seq=1 ttl=64

time=0.026 ms

[root@rob01db01 network-scripts]# ping -c 1 rob01db01-priv

PING rob01db01-priv.robdomain (192.168.1.101) 56(84) bytes of data.

64 bytes from rob01db01-priv.robdomain (192.168.1.101): icmp_seq=1 ttl=64

time=0.032 ms

[root@rob01db01 network-scripts]# ping -c 1 rob01db02

PING rob01db02.robdomain (192.168.56.102) 56(84) bytes of data.

64 bytes from rob01db02.robdomain (192.168.56.102): icmp_seq=1 ttl=64

time=1.67 ms

[root@rob01db01 network-scripts]# ping -c 1 rob01db02-priv

PING rob01db02-priv.robdomain (192.168.1.102) 56(84) bytes of data.

64 bytes from rob01db02-priv.robdomain (192.168.1.102): icmp_seq=1 ttl=64

time=0.619 ms

[root@rob01db01 network-scripts]# nslookup rob01-scan

Server: 192.168.56.101

Address: 192.168.56.101#53

Name: rob01-scan.robdomain

Address: 192.168.56.252

Name: rob01-scan.robdomain

Address: 192.168.56.253

Name: rob01-scan.robdomain

Address: 192.168.56.251

# check access to the shared folder with the installation software

[root@rob01db01 network-scripts]# df -h

Filesystem Size Used Avail Use% Mounted on

/dev/mapper/vg_rob01db01-lv_root 11G 6.9G 2.7G 73% /

tmpfs 1.5G 72K 1.5G 1% /dev/shm

/dev/sda1 477M 55M 397M 13% /boot

/dev/mapper/oracle_software-oracle 20G 173M 19G 1% /u01

software 115G 53G 63G 46% /media/sf_software

[root@rob01db01 network-scripts]# ls -l /media/sf_software

total 8218410

-rwxrwx--- 1 root vboxsf 1205728 Apr 14 12:42 DualServerInstallerV7.12.exe

-rwxrwx--- 1 root vboxsf 1361028723 Feb 26 10:21

linuxamd64_12c_database_1of2.zip

-rwxrwx--- 1 root vboxsf 1116527103 Feb 26 10:28

linuxamd64_12c_database_2of2.zip

-rwxrwx--- 1 root vboxsf 1750478910 Feb 25 16:11 linuxamd64_12c_grid_1of2.zip

-rwxrwx--- 1 root vboxsf 201673595 Feb 25 16:34 linuxamd64_12c_grid_2of2.zip

-rwxrwx--- 1 root vboxsf 3885117440 Feb 25 15:43 V41362-01.iso

-rwxrwx--- 1 root vboxsf 99619088 Nov 12 2013 VirtualBox-4.2.18-88781-W

Page 63: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

"�

Repeat the checks for node rob01db02.

We are now ready to install the GRID and DB Software. But let’s first shutdown both virtual nodes and

make a backup of both images and shared storage. That way we can always restore this situation in case

any installlation problems occur.

Page 64: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

"�

Step 11: Install Grid Infrastructure

Step 10.0 First mount the shared folder as the oracle user

Perform the steps below on both nodes (rob01db01 and rob01db02):

[root@rob01db01 /]# umount software

[root@rob01db01 /]# mount -t vboxsf -o rw,uid=54321,gid=54321 software

/media/sf_software

Step 10.1: Unzip the installation files

We will now unzip the database and grid installation software. Perform the step below on node

rob01db01:

[root@rob01db01 ~]# cd /media/sf_software

[root@rob01db01 sf_software]# ls

DualServerInstallerV7.12.exe linuxamd64_12c_grid_1of2.zip VirtualBox-

4.2.18-88781-Win.exe

linuxamd64_12c_database_1of2.zip linuxamd64_12c_grid_2of2.zip

linuxamd64_12c_database_2of2.zip V41362-01.iso

[root@rob01db01 sf_software]# unzip linuxamd64_12c_grid_1of2.zip

[root@rob01db01 sf_software]# unzip linuxamd64_12c_grid_1of2.zip

[root@rob01db01 sf_software]# unzip linuxamd64_12c_database_1of2.zip

[root@rob01db01 sf_software]# unzip linuxamd64_12c_database_2of2.zip

[root@rob01db01 sf_software]# chown -R oracle:oinstall grid

[root@rob01db01 sf_software]# chown -R oracle:oinstall database

After this operation the 2 subdirectories “grid” and “database” are created in /media/sf_software

Step 10.2 Install cluvfy, a required grid installation package

This linux package is shipped alongside the oracle grid software and available once that software is

unzipped. ‘Install the package as shown below. Perform this operation on both nodes: rob01db01 and

rob01db02

[root@rob01db01 ~]# cd /media/sf_software/grid/rpm

[root@rob01db01 rpm]# rpm -Uhv cvuqdisk-1.0.9-1.rpm

Preparing... ###########################################

[100%]

Using default group oinstall to install package

1:cvuqdisk ###########################################

[100%]

Page 65: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

"!

Step 10.3 Start the grid installer

You need an Xwindows session for the display of the installer screen. I used MobaXterm for the

installation but you can also use Putty with Xforwarding enabled. Make sure you run the statements

below as the oracle user:

[root@rob01db01 ~]# cp .Xauthority /tmp

[root@rob01db01 ~]# chmod 777 /tmp/.Xauthority

[root@rob01db01 ~]# sudo su - oracle

[oracle@rob01db01 ~]$ cp /tmp/.Xauthority $HOME

# test if the GUI works with exclock:

[oracle@rob01db01 ~]$ xclock

# now start the installer

[oracle@rob01db01 ~]$ cd /media/sf_software/grid

Page 66: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

""

Page 67: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

"#

Click on Add.. to add the details of the second node

Page 68: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

"$

Now click the "SSH Connectivity..." button and enter the password for the "oracle" user. Click the "Setup"

button to configure SSH connectivity, and the "Test" button to test it once it is complete:

Page 69: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

"%

Press setup to setup ssh connectivity between the nodes. This will be configured automatically and you

will see the popup box below appear:

Now press test to test the connectivity

Page 70: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

#&

Click the "Identify network interfaces..." button and check the public and private networks are specified

correctly. Remember to mark the NAT interface as "Do Not Use"

Click OK and then Next in the previous screen that shows up again. A number of tests and validations

are fired off and then the screen below appears:

Page 71: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

#�

Enter details as shown above. The password of SYSASM is set to oracle. Click NEXT

Page 72: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

#�

Click Yes to override this warning.

Initially you will see no Disk Candidates in the screen below but when you change the discovery path to

/dev/asm* the disk candidates will be shown. Leave the Redundancy to Normal.

All disks belong to the DATA diskgroup. In another lab we will add disks and create a RECO group as well.

Page 73: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

#�

Page 74: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

#�

The next screen is the prerequisite check screen. This will take some time to complete

Page 75: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

#!

The errors above can be ignored. There was one additional error about NTP. This error can be fixed by

removing the ntp package on both nodes. In stead of NTP RAC cluster synchronization services (CSS) will

be configured automatically by the installer:

# service ntpd stop

# yum remove ntp

Note: If there are any more errors see the webpage http://www.hhutzler.de/blog/cluvfy_error/ for

troubleshooting.

Page 76: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

#"

After some time a pop-up box appears which must be acknowlegd:

Press on continue and the installation will continue. After some time it is completed:

Page 77: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

##

You can check the installation with the statements below:

[root@rob01db01 ~]# sudo su - oracle

[oracle@rob01db01 ~]$ . oraenv

ORACLE_SID = [robdb] ? +ASM1

The Oracle base remains unchanged with value /u01/app/oracle

[oracle@rob01db01 ~]$ srvctl status asm

ASM is running on rob01db02,rob01db01

[oracle@rob01db01 ~]$ sqlplus / as sysasm

SQL> select name, total_mb from v$asm_diskgroup;

NAME TOTAL_MB

------------------------------ ----------

DATA 20470

Before we start with the installation of the RDBMS Software it may be a good idea to stop all the nodes

and make another intermediate backup of all the compute nodes and ASM disks.

Page 78: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

#$

Step 12: Install Database Software

Step 12.1 mount the shared folder as the oracle user and start the installer

Perform the steps below on both nodes (rob01db01 and rob01db02):

[root@rob01db01 /]# umount software

[root@rob01db01 /]# mount -t vboxsf -o rw,uid=54321,gid=54321 software

/media/sf_software

[root@rob01db01 /]# sudo su – oracle

[oracle@rob01db01~]$ cd /media/sf_software/database

[oracle@rob01db01 database]$ ./installer

Step 12.2 Follow the screens below to perform the installation:

Page 79: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

#%

Page 80: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

$&

Page 81: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

$�

Page 82: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

$�

Page 83: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

$�

Page 84: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

$�

[root@rob01db01 ~]# /u01/app/oracle/product/12.1.0.1/db_1/root.sh

Performing root user operation for Oracle 12c

The following environment variables are set as:

ORACLE_OWNER= oracle

ORACLE_HOME= /u01/app/oracle/product/12.1.0.1/db_1

Enter the full pathname of the local bin directory: [/usr/local/bin]:

The contents of "dbhome" have not changed. No need to overwrite.

The contents of "oraenv" have not changed. No need to overwrite.

The contents of "coraenv" have not changed. No need to overwrite.

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.

Repeat the step above for node rob01db02

Page 85: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

$!

Page 86: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

$"

Step 13: Create a Container Database

Make sure nodes rob01db01 and rob01db02 are started.

Log on to rob01db01 as user oracle with Xforwarding enabled

Add the line below to the file /etc/oratab and start the dbca afterwards

$ cat /etc/oratab|grep dummy

dummy:/u01/app/oracle/product/12.1.0.1/db_1:N # line added by DBA

$ . oraenv => dummy

$ dbca

Then follow the screens listed below:

Page 87: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

$#

Page 88: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

$$

Page 89: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

$%

Page 90: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

%&

POST INSTALL ACTIVITIES

Add robdcb1/robcdb2 to the /etc/oratab file

ROBCDB1:/u01/app/oracle/product/12.1.0.1/db_1:N: # line

added by Agent

Decrease memory usage

SQL> alter system set sga_target = 400M scope=spfile;

SQL> show parameter pga_aggregate_target

Then shutdown the node and resize the memory in the virtual machine console to 2 GB:

Page 91: Create a virtual Oracle 12 RAC database - wiki. · PDF fileCreate a virtual Oracle 12 RAC database Introduction: In this manual you can read how to create your own virtual Oracle 12c

Create a virtual Oracle 12 RAC database ����

%�

Step 14: Install SQL Developer (optional)

Download and install SQL Developer version 4

First download SQL Developer 4.0 from OTN. Place it in the software shared folder directory:

sqldeveloper-4.0.2.15.21-1.noarch.rpm

Check if the java version is installed:

[root@rob01db01 sf_software]# java -version

java version "1.7.0_45"

OpenJDK Runtime Environment (rhel-2.4.3.3.0.1.el6-x86_64 u45-b15)

OpenJDK 64-Bit Server VM (build 24.45-b08, mixed mode)

[root@rob01db01 sf_software]# which java

/usr/bin/java

Now install SQL*Developer

[root@rob01db01 sf_software]# rpm -Uhv sqldeveloper-4.0.2.15.21-1.noarch.rpm

Preparing... ###########################################

[100%]

1:sqldeveloper ###########################################

[100%]

Start SQL Developer

As user oracle:

[oracle@rob01db01 ~]$ cd

/u01/app/oracle/product/12.1.0.1/db_1/sqldeveloper/sqldeveloper/bin/

[oracle@rob01db01 bin]$ ./sqldeveloper