SAINORA

HomeBlogsRAC

RAC

groupadd oinstall
 groupadd dba
 mkdir -p /export/home/oracle /ocfs
 useradd -d /export/home/oracle -g oinstall -G dba -s /bin/ksh oracle
 chown oracle:dba /export/home/oracle /u01
 passwd oracle

vi create_users.sh

groupadd oinstall
groupadd dba
mkdir -p /export/home/oracle /ocfs
useradd -d /export/home/oracle -g oinstall -G dba -s /bin/ksh oracle
chown oracle:dba /export/home/oracle /u01
passwd oracle

/export/home/oracle/.profile

export PS1="`/bin/hostname -s`-> "
export EDITOR=vi
export ORACLE_SID=devdb1
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
export ORA_CRS_HOME=$ORACLE_BASE/product/10.2.0/crs_1
export LD_LIBRARY_PATH=$ORACLE_HOME/lib

export PATH=$ORACLE_HOME/bin:$ORA_CRS_HOME/bin:/bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11R6/bin
umask 022

mkdir -p $ORACLE_BASE/admin
mkdir -p $ORACLE_HOME
mkdir -p $ORA_CRS_HOME

/etc/security/limits.conf

echo "oracle soft nproc 2047" >> /etc/security/limits.conf
echo "oracle hard nproc 16384" >>
/etc/security/limits.conf
echo "oracle soft nofile 1024" >>
/etc/security/limits.conf
echo "oracle hard nofile 65536" >>
/etc/security/limits.conf
echo "session required /lib/security/pam_limits.so" >> /etc/pam.d/login

/etc/profile

if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then

ulimit -p 16384
ulimit -n 65536

else

ulimit -u 16384 -n 65536

fi
fi

echo "##################################################" >> /etc/sysctl.conf
echo "kernel.shmall = 2097152" >> /etc/sysctl.conf
echo "kernel.shmmax = 2147483648" >> /etc/sysctl.conf
echo "kernel.shmmni = 4096" >> /etc/sysctl.conf
echo "kernel.sem = 250 32000 100 128" >> /etc/sysctl.conf
echo "fs.file-max = 65536" >> /etc/sysctl.conf
echo "net.ipv4.ip_local_port_range = 1024 65000" >> /etc/sysctl.conf
echo "net.core.rmem_default = 1048576" >> /etc/sysctl.conf
echo "net.core.rmem_max = 1048576" >> /etc/sysctl.conf
echo "net.core.wmem_default = 262144" >> /etc/sysctl.conf
echo "net.core.wmem_max = 262144" >> /etc/sysctl.conf
echo "##################################################" >> /etc/sysctl.conf

echo "127.0.0.1  localhost" > /etc/hosts
echo "192.168.1.131 rac1.mycorpdomain.com        rac1" >> /etc/hosts
echo "192.168.1.31  rac1-vip.mycorpdomain.com    rac1-vip   " >> /etc/hosts
echo "10.10.10.31  rac1-priv.mycorpdomain.com   rac1-priv" >> /etc/hosts
echo "192.168.1.132   rac2.mycorpdomain.com        rac2" >> /etc/hosts
echo "192.168.1.32  rac2-vip.mycorpdomain.com    rac2-vip" >> /etc/hosts
echo "10.10.10.32   rac2-priv.mycorpdomain.com   rac2-priv" >> /etc/hosts

echo "options hangcheck-timer hangcheck_tick=30 hangcheck_margin=180">>/etc/modprobe.conf

fdisk /dev/sdb

echo "/dev/raw/raw1 /dev/sdc1" >> /etc/sysconfig/rawdevices
echo "/dev/raw/raw2 /dev/sdd1" >> /etc/sysconfig/rawdevices
echo "/dev/raw/raw3 /dev/sde1" >> /etc/sysconfig/rawdevices

vi /etc/udev/permissions.d/50-udev.permissions

# raw devices
ram*:root:disk:0660
#raw/*:root:disk:0660
raw/*:oracle:dba:0660


Script to configure ssh for RAC nodes.

mkdir ~/.ssh
chmod 700 ~/.ssh
ssh-keygen -t rsa
ssh-keygen -t dsa
ssh rac2 mkdir ~/.ssh
ssh rac2 chmod 700 ~/.ssh
ssh rac2 ssh-keygen -t rsa
ssh rac2 ssh-keygen -t dsa
cat ~/.ssh/id_rsa.pub > ~/.ssh/authorized_keys
cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
ssh rac2 cat ~/.ssh/id_rsa.pub >>  ~/.ssh/authorized_keys
ssh rac2 cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
scp ~/.ssh/authorized_keys rac2:~/.ssh/authorized_keys
ssh rac1 date
ssh rac2 date
ssh rac1-priv date
ssh rac2-priv date
ssh rac1.mycorpdomain.com date
ssh rac2.mycorpdomain.com date
ssh rac1-priv.mycorpdomain.com date
ssh rac2-priv.mycorpdomain.com date

What is Cluster?

   A cluster is a group of computers interconnected themselves and acts as a single server. When you run a application on a cluster it should behave as if it is running on a single server.

What are the types of clusters?

Shared Cluster
Shared-nothing Cluster
Failover Cluster
Load balancing Cluster

In Oracle RAC , All the nodes should share same OS and process architecture.

What is GI in11G R2 RAC?

 GI is grid infra structure which includes

  1. Clusterware
2. ASM
3. ACFS

Explain Oracle Cluster Architecture?

 Oracle cluster ware comes under shared disk cluster which supports load balancing and failover closer features.

The services are
1. Cluster management =- manages all resources in the cluster.
2. Node Monitoring -  Maintains the cluster integrity for all nodes with in the cluster and also does node eviction or fencing.
3. Event Services - Publishes  changes /events so that the applications know the changes in the clusters.
4. Time Syncronization - Sync the time between all nodes.
5. network Management -  Which maintains the VIP addresses to maintain the consistency of the nodes.
6. HA - monitors all the resources.

Two  NIC cards

1. Public
Should support TCP/IP
2 Private
Should support UDP (user datagram protocol) or RDS ( Reliable Data Socket)  for linux
TCP for windows.

All platform use GIPc(Grid Interprocess communication)

What is link Aggregation ?

 

How to find PSU Version ?

Patch Set Updates are referenced by their 5-place version number. You may use the below commands depending on hte ORACLE_HOME.

Database PSU:

$opatch lsinventory -bugs_fixed | grep -i 'DATABASE PSU'

CRS (Cluster Ready Services) PSU:

$opatch lsinventory -bugs_fixed | grep -i 'TRACKING BUG' | grep -i 'PSU'

GI (Grid Infrastructure) PSU:

$opatch lsinventory -bugs_fixed | grep -i 'GI PSU'

Enterprise Manager Agent PSU:

$ opatch lsinventory -bugs_fixed | grep -i 'ENTERPRISE MANAGER AGENT' | grep -i 'PSU'

Enterprise Manager OMS PSU:

$opatch lsinventory -bugs_fixed | grep -i 'ENTERPRISE MANAGER OMS' | grep -i 'PSU'


Script to configure ssh for RAC nodes.


mkdir ~/.ssh

chmod 700 ~/.ssh

ssh-keygen -t rsa

ssh-keygen -t dsa

ssh rac2 mkdir ~/.ssh

ssh rac2 chmod 700 ~/.ssh

ssh rac2 ssh-keygen -t rsa

ssh rac2 ssh-keygen -t dsa

cat ~/.ssh/id_rsa.pub > ~/.ssh/authorized_keys

cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys

ssh rac2 cat ~/.ssh/id_rsa.pub >>  ~/.ssh/authorized_keys

ssh rac2 cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys

scp ~/.ssh/authorized_keys rac2:~/.ssh/authorized_keys

ssh rac1 date

ssh rac2 date

ssh rac1-priv date

ssh rac2-priv date

ssh rac1.mycorpdomain.com date

ssh rac2.mycorpdomain.com date

ssh rac1-priv.mycorpdomain.com date

ssh rac2-priv.mycorpdomain.com date


Gigabit ethernet with UDP protocol supports better for private interconnect.





Do I need to relink the Oracle Clusterware / Grid Infrastructure home after an OS upgrade?

Using Oracle Clusterware 10g and 11.1, Oracle Clusterware binaries cannot be relinked. However, the client shared libraries, which are part of the home can be relinked, in most cases there should not be a need to relink them. See Note:743649.1 for more information.


Using Oracle Grid Infrastructure 11.2 and higher, there are some executables in the Grid home that can and should be relinked after an OS upgrade. The following steps describe how to relink an Oracle Grid Infrastructure for Clusters home:


As root:


# cd Grid_home/crs/install

# perl rootcrs.pl -unlock


As the grid infrastructure for a cluster owner:


$ export ORACLE_HOME=Grid_home

$ Grid_home/bin/relink


As root again:


# cd Grid_home/crs/install

# perl rootcrs.pl -patch


 

 

Published on 18th June 2013

Published by Gopinathan D