Saturday 28 January 2017

rac

RAC
===
cluster: two or more nodes interconnect each other serving a common task is called cluster
           

 clusterware: is software which binds the servers together.
   we can implement cluster at db layer/application/os/n/w
Grid_home: in 11gr2 - it contatin both clusterware and oracle asm software

advantages
=======
1. high availability
2. scalability
3. load balancing
components
============
1. two or more nodes
2. share storages--SAN --crd files,spfile,ocr and voting disk
3.2 NIC cards
4. two switches--1 for
4. SCSI cables
5. operationg system
7. oracle cluster ware softwares

types of clusterwares
==============
1. oracle clusterware
2. veritas cluster
2.sun cluster
3.hp guard
4. microsft cluster
5. Redhat cluster


importetn ip's
--------------
1.public ip
2. private ip
3. vip --
   vip--if one node fails it will connect other node which mentioned in tnsentry
        -but 2 nodes -100 clients(contatin tnsentry)
          added other nodes, need to changed all 100 clients tns entry.
4. scan ip --11gr2--single client access name
      scan is independent of cluster
     whenever add/remode node we need not change tnsentry of clients for this we use DNS server
  client-DNS server-scanlistener-dblistener
if any node fails scan will failver to available node

types of cluster
==============
active-passive cluster
active-active cluster

cachefusion:
==========
transfer of data across the instance called cache fusion.

Clusterware concepts
--------------------------
the importent files in oracle clusterware are
1. ocr file
2. voting disk
ocr file
=======
1. ocr file contains entire information about cluster resouces. it is very small file
   a.node information
   b. public ip
   c. private ip
      d.db name
   e.listers etc.
   f.asmdg
2. in Rac system by default oracle takes the backup of ocr file for every 4hours at the end of the day by master node.
we can find master node using v$ges_resouce
3. whenever some structural changes to cluster it is always recommended to take backup of ocr manually
default backup location
---------------------------
$ocrconfig --showbackup
$ocrconfig -restore
how to take manual backup &restore
------------------------------------
$ocrconfig -export
$ocrconfit -import

voting disk
----------
it is small file it will check heart beat of the node in cluster.
1. n/w heart beat :if any node unable to communicate over the network
2. disk heart beat: if any node unable to communicate in shared storage
voting disk is used by a node to understand other node is alive or not
if the node fails voting disk throw out from the cluster to avoid data corruption
every node vote in a voting disk, if a node uable to communicate, it will evit from node and reboot
it is called node eviction.