Lecture 5c, Oracle RAC
Lecture 5c, Oracle RAC
ORACLE RAC
Definition
Goal
Since the requests in a RAC cluster are spread evenly across the
RAC instances, and since all instances access the same shared
storage, addition of server(s) require no architecture changes
etc. And a failure of a single RAC node results only in the loss
of scalability and not in the loss of data since a single database
image is utilized.
ORACLE RAC
Shared Disks
A requirement for Oracle Database 10g RAC cluster is a set of
servers with shared disk access and interconnect connectivity. Since
each instance in a RAC system must have access to the same
database files, a shared storage is required that can be accessed
from all RAC nodes concurrently.
ORACLE RAC
Types of Shared Storage
The shared storage space can be used as raw devices, or by using a
cluster file system or ASM. This article will address Oracle's
Cluster File System OCFS and ASM. Note that Oracle 10g RAC
provides it's own locking mechanisms and therefore it does not rely
on other cluster software or on the operating system for handling
locks.
ORACLE RAC
Each RAC node should have at least one static IP address for
the public network and one static IP address for the private
cluster interconnect.
ORACLE RAC
Private Networks
Network Example
fdisk -l
If you use bash which is the default shell on Red Hat Linux (to
verify your shell run: echo $SHELL), execute the following
commands:
# Oracle Environment
export ORACLE_BASE=/u01/app/oracle
export ORACLE_SID=orcl1 # Each RAC node must have a
unique Oracle SID! E.g. orcl1, orcl2,...
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
ORACLE RAC
Cluster File System
When you run the Oracle Installer on a RAC node, it will use ssh
to copy Oracle software and data to other RAC nodes. Therefore,
the oracle user on the RAC node where Oracle Installer is
launched must be able to login to other RAC nodes without having
to provide a password or passphrase.
Make sure that the oracle user can ssh to all RAC nodes without
ssh asking for a passphrase. This is very important because
otherwise OUI won't be able to install the Oracle software on other
RAC nodes. The following example shows how ssh-agent can
do the authentication for you when the oracle account logs in to
other RAC nodes using ssh.
Open a new terminal for the RAC node where you will execute
runInstaller and use this terminal to login from your desktop
using the following command:
$ ssh -X oracle@rac?pub
ORACLE RAC
Configure ssh-agent
Note that Oracle Database 10g R1 (10.1) OUI will not be able to
discover disks that are marked as Linux ASMLib. Therefore it is
recommended to complete the software installation and then to
use dbca to create the database, see
http://otn.oracle.com/tech/linux/asmlib/install.html#10gr1 for
more information.
ORACLE RAC
Setting Up the Database with dbca
The following steps show how to use dbca to create the database
and its instances. Oracle recommends to use dbca to create the
RAC database since the preconfigured databases are optimized for
ASM, server parameter file, and automatic undo management.
dbca also makes it much more easier to create new ASM disk
groups etc.
ORACLE RAC
DBCA concluded (creating database)
Database File Locations:
Select "Use Oracle-Managed Files"
Database Area: +ORCL_DATA1
Click Next
I selected TAF Policy "Basic".
Click Next
- Initialization Parameters:
Change settings as needed.
Click Next
- Database Storage: Change settings as needed.
Click Next
- Creation Options: Check "Create Database"
Click Finish
ORACLE RAC
Summary
RAC requires a CFS
RAC is complex
RAC provides transactions (OLTP)