Saturday, October 31, 2009

TIME AND DATE SYNCHRONIZATION AMONG THE NODES IN ORACLE RAC

We may face date and time difference among various nodes in our Oracle RAC setup .

Some application are really time critical , such issues may lead to big business loss if ignored .

Shutdown your database on each node . Shutdown crs servervices as well to ensure all services are down .

We will be using ntpdate command to reset time in our server .

The ntpdate command sets the local date and time by polling the NTP servers specified to determine the correct time. It obtains a number of samples from each server specified and applies the standard NTP clock filter and selection algorithms to select the best of the samples.

RUN BELOW COMMAND FROM ROOT USER ON EACH NODE
#############################################

ora*****:root:/u01/app/oracle/product/10.2/crs/bin>ntpdate 10.111.35.21
29 Sep 18:32:36 ntpdate[462942]: step time server 10.111.35.21 offset 31.980096

Thursday, October 29, 2009

RESIZING SGA IN ORACLE RAC 10g USING SOLARIS PROJECT FILE

RESIZING SGA IN ORACLE RAC 10g USING SOLARIS PROJECT FILE

Its very crucial and important to have a well needed size of SGA . Here I will go thru some steps in order to resize SGA on oracle RAC 10g setup on Sun Solaris 10, when you are using /etc/project file to configure your oracle required memory instead of /etc/system file .

The recommended method for modifying the /etc/project file is to use the "proj*" commands,
such as projadd(1) for creating a project and projmod(1) for modifying a project.
Examples of projadd and projmod
a.) # projadd -c "Oracle" 'user.oracle'
b.) # projmod -s -K "project.max-shm-memory=(privileged,6GB,deny)" 'user.oracle'

** Resource Control assignments made in this way (in the /etc/project file) are permanent, and will survive a system re-boot.

** There is also an "on-the-fly" way to temporarily set Resource Control assignments using the prctl(1) command. However, unlike the /etc/project file, resource assignments made in this way will NOT survive a system re-boot.

My Exercise
In My system i found below entries for poracle project ( Oracle owner on system)

poracle:100:OracleProject:poracle:pdba:project.max-sem-ids=(priv,4096,deny);project.max-sem-nsems=(priv,4906,deny);project.max-sem-ops=(priv,4906,deny);project.max-shm-ids=(priv,256,deny)

I was unable to see parameter "project.max-shm-memory" , which actually define oracle required memory on system.
Here on the other hand when i try to increase my sga_target parameter from 4 GB to higher , My database was unable to come up with error defined Memory not available to extend .
While digging up more on proejct file inside metalink , I found if "max-shm-memory" is not defined in project file system has been designed in such a way where it allows oracle to use 1/4th of total available system memory .
That was really interesting as My system is having 16 GB of memory and out of 16 GB , 4 GB was usable for Oracle
due to default nature of project file in SOLARIS 10 .

Now it was straight for me to add "project.max-shm-memory" in project file in order to increase oracle required memory . Below command modified the existing poracle project and added shm max memory for Oralce user .

projmod -s -K "project.max-shm-memory=(privileged,8GB,deny)" 'user.poracle'

Login as root

Run below command
# projmod -s -K "project.max-shm-memory=(privileged,8GB,deny)" 'user.poracle'

#cat /etc/project
poracle:100:OracleProject:poracle:pdba:project.max-sem-ids=(priv,4096,deny);project.max-sem-nsems=(priv,4906,deny);project.max-sem-ops=(priv,4906,deny);project.max-shm-ids=(priv,256,deny);project.max-shm-memory=(priv,8589934592,deny)

Do it on all RAC nodes .

Newly assigned memory will available on each new session and will persist after server reboot .

Now happily you can increase your SGA (sga_target) size without prompting any error .

** You need to define only (sga_target= ..) in init.ora file When using automatic SGA . **