Feeds:
Posts
Comments

Archive for the ‘RAC’ Category

RAC Traning to Hydrabad

Dear Friends, 

Going to hydrabad for RAC traning for 15 days. So may be out of touch with blog for long time.Will definately come up with RAC toppic very soon once done with training.Same time enjoy the Hydrabad training as well.

Thanks & Regards,
Samadhan
https://samadhandba.wordpress.com/

Read Full Post »

Checking the Network Setup with CVU
To verify node connectivity among all nodes in your cluster use following syntax as an oracle user,
/mount_point/crs/Disk1/cluvfy/runcluvfy.sh comp nodecon -n node_list [-verbose]

If you have two nodes node1 and node2 and your mountpoint is /dev/cdrom then enter following command.
/dev/cdrom/crs/Disk1/cluvfy/runcluvfy.sh comp nodecon -n node1,node2 -verbose

Checking the Hardware and Operating System Setup with CV
As an oracle user use the following command syntax to start Cluster Verification Utility (CVU) stage verification to check hardware and OS setup:

/mountpoint/crs/Disk1/cluvfy/runcluvfy.sh stage –post hwos –n node_list [-verbose]
If you have two nodes node1 and node2 and your mountpoint is /dev/cdrom then enter following command,
/dev/cdrom/crs/Disk1/cluvfy/runcluvfy.sh stage –post hwos –n node1,node2

Checking the Operating System Requirements Setup with CVU
To check if your system meets the operating system requirement pre-installation tasks use the following syntax,
/mountpoint/crs/Disk1/cluvfy/runcluvfy.sh comp sys -n node_list -p {crs|database}
-osdba osdba_group -orainv orainv_group -verbose

If you have two nodes node1 and node2 and your mountpoint is /dev/cdrom with the OSDBA dba and Oracle inventory group oinstall then enter following command,
/dev/cdrom/crs/Disk1/cluvfy/runcluvfy.sh comp sys -n node1,node2 -p crs -osdba crs -orainv oinstall

Read Full Post »

Configuring Operating System Users and Groups in All Nodes
On windows you don’t need to create separate user to install oracle or don’t need to create groups. OUI automatically do it. However on unix you must create the following operating system groups are required if you are installing Oracle RAC for the first time.

•The OSDBA group (typically, dba) -This is the OS user who has SYSDBA privilege.

•The Oracle Inventory group (typically, oinstall) -This group owns all Oracle software installed on the system.

The following operating system users are required

•A user that owns the Oracle software (typically, oracle).

•An unprivileged user (for example, the nobody user on Linux systems).

Create the required groups and users
Do this steps on all nodes of your cluster.
As a root user,

/usr/sbin/groupadd oinstall
/usr/sbin/groupadd dba
useradd -u 200 -g oinstall -G dba -d /home/oracle -r oracle
Change the password by,
passwd oracle

Verify the user by,
id oracle

Note that in this example in stead of using node1 use your original node name and instead of using node2 use your original node name.

Configuring SSH on All Cluster Nodes
When installing Oracle RAC on UNIX and Linux platforms, the software is installed on one node, and OUI uses secure communication to copy the software binary files to the other cluster nodes. OUI uses the Secure Shell (SSH) for the communication.

So you must have configured SSH on all nodes.

•To configure SSH, you must first create Rivest-Shamir-Adleman (RSA) keys and Digital Signature Algorithm (DSA) keys on each cluster node. After you have created the private and public keys, you copy the keys from all cluster node members into an authorized keys file that is identical on each node.

Generating RSA and DSA Keys
1)Log on as oracle user.

2)See whether .ssh directory exist or not. If does not exist then create one.
$ mkdir ~/.ssh
$ chmod 700 ~/.ssh

3)Create the RSA-type public and private encryption keys by,
/usr/bin/ssh-keygen -t rsa
This command creates the public key in the /home/oracle/.ssh/id_rsa.pub file and the private key in the /home/oracle/.ssh/id_rsa file.

4)Create the DSA type public and private keys.
/usr/bin/ssh-keygen -t dsa
This command creates the public key in the /home/oracle/.ssh/id_dsa.pub file and the private key in the /home/oracle/.ssh/id_dsa file.

5)Repeat step 1 through 4 in all the nodes.

Adding the Keys to an Authorized Key File
1)Go to .ssh directory
$ cd ~/.ssh

2)Add the RSA and DSA keys to the authorized_keys files.
$ cat id_rsa.pub >>authorized_keys
$ cat id_dsa.pub >>authorized_keys

3)Using SCP copy the authorized_keys file to the oracle user .ssh directory on a remote node.
scp authorized_keys node2:/home/oracle/.ssh/

4)Using SSH, log in to the node where you copied the authorized_keys file, using the passphrase you created. Then change to the .ssh directory, and using the cat command, add the RSA and DSA keys for the second node to authorized_keys file.
ssh node2
Enter passphrase for key ‘/home/oracle/.ssh/id_rsa’:
cd ~/.ssh
cat id_rsa.pub >> authorized_keys
cat id_dsa.pub >> authorized_keys

5)If you have more than 2 nodes in your cluster, repeat step 3 and step 4 for each node you intend to add to your cluster. Copy the most recently updated authorized_keys file to the next node, then add the public keys for that node to the authorized_keys file.

6)After updating the authorized_keys file on all nodes, use SCP to copy the complete authorized_keys file from the last node to be updated to all the other cluster nodes, overwriting the existing version on the other nodes. For example,
scp authorized_keys node1:/home/oracle/.ssh/

Configure SSH User Equivalency on Cluster Member Nodes
1)Log on as a oracle user.

2)Start the SSH agent and load the SSH keys into memory.
$ exec /usr/bin/ssh-agent $SHELL
$ /usr/bin/ssh-add

3)Complete the SSH configuration by using the ssh command to retrieve the date on each node in the cluster.
$ ssh node1 date
$ ssh node2 date

Read Full Post »

Now we are going to learn RAC environment.

In a database whenever you query from V$database to know the name of the database and want to know the name of the instance from v$thread they return similar result. Suppose,

SQL> select name from v$database;
NAME
———
DBASE

SQL> select instance from v$thread;

INSTANCE
——————————————————————————–
dbase

which indicates in the database there is only one instance that is database have a one-to-one relationship between datafiles and the instance. Oracle RAC environments, however, have a one-to-many relationship between datafiles and instances. In RAC environments multiple instances form a single database. The instances can reside on different servers which is referred as nodes in RAC environment.

• In RAC environment the set of interconnected instances that allows the servers to work together is called cluster. The physical structures that make up the database must reside on shared storage that is accessible from all servers that are part of the cluster. Each server in the cluster runs the Oracle RAC software.

• In RAC database each instance has its own memory and background processes but every instances share the same data files. So while any data need to write or retrieve they use the same datafiles but each instance use it’s own memory.

Now question is if one instance read data and modify it in the buffer cache and if another instance need that data then how oracle manages it?

• In RAC Oracle uses Cache Fusion Technology to synchronize the data stored in the buffer cache of each cluster database instance. Cache Fusion moves current data blocks (which reside in memory) between database instances, rather than having one database instance write the data blocks to disk and requiring another database instance to reread the data blocks from disk.

• When a data block is needed for one instance which resides in the buffer cache of another instance, Cache Fusion transfers the data block directly between the instances using the interconnect, enabling the Oracle RAC database to access and modify data as if the data resided in a single buffer cache.

Oracle RAC provides high availability and scalability.

If one instance fails in RAC environment still another instance can do the task and thus prevents the server from being a single point of failure.

In a RAC environment transactions are distributed over multiple instances. Thus minimize load from one instance.

• Never mix with oracle clusterware with Oracle RAC. The Oracle Clusterware is software that when installed on servers, enables the servers to be bound together to operate as if they were one server. Before you install oracle RAC you need to install clusterware. Without clusterware you can’t install oracle RAC.

Read Full Post »