Monday, May 11, 2009

Change ports for dbconsole componets

In order to change ports for the dbconsole componets do:

Set ORACLE_HOME & ORACLE_SID

For non RAC : emca -reconfig ports -DBCONTROL_HTTP_PORT 1158 -AGENT_PORT 3938 -RMI_PORT 5521 -JMS_PORT 5541

for RAC : emca -reconfig ports -cluster -DBCONTROL_HTTP_PORT 1158 -AGENT_PORT 3938 -RMI_PORT 5521 -JMS_PORT 5541

Thursday, May 7, 2009

Oracle RAC 10g : Backing up CSS and OCR files

First of all find the location of the css and ocr files:

Having set up the crs home

Voting File (CSS) : crsctl query css votedisk

If the file resides on shared filesystem (NFS,OCFS etc) then the you will see the ful path e.g /u02/oradata/css/cssfile

Now copy the file : cp /u02/oradata/css/cssfile /home/oracle/cssfilebackup

CSS on raw device:crsctl query css votedisk
0. 0 /dev/rhdisk5

located 1 votedisk(s).

In order to backup the CSS:
dd if=/dev/rhdisk5 of=/home/oracle/cssbackup


OCR File : ocrcheck
Here the ocr is on shared file system.
Status of Oracle Cluster Registry is as follows :
Version : 2
Total space (kbytes) : 262120
Used space (kbytes) : 6108
Available space (kbytes) : 256012
ID : 353255034
Device/File Name : /u02/oradata/ocr/ocrfile
Device/File integrity check succeeded

Device/File not configured

Cluster registry integrity check succeeded

Here the ocr is on raw device
Status of Oracle Cluster Registry is as follows :
Version : 2
Total space (kbytes) : 1048300
Used space (kbytes) : 7252
Available space (kbytes) : 1041048
ID : 752511649
Device/File Name : /dev/rhdisk3
Device/File integrity check succeeded

Device/File not configured

Cluster registry integrity check succeeded


First you find out if automatic backup is running.
ocrconfig -showbackup
labdb01 2009/05/07 07:23:47 /u01/app/crs/cdata/testcluster
labdb01 2009/05/07 03:23:47 /u01/app/crs/cdata/testcluster
labdb01 2009/05/06 23:23:47 /u01/app/crs/cdata/testcluster
labdb01 2009/05/05 23:23:45 /u01/app/crs/cdata/testcluster
labdb01 2009/04/30 03:23:32 /u01/app/crs/cdata/testcluster

So you have a week of backup of ocr.
Now you can take a bakcup for the ocr for extra reduduncy :

As root : ocrconfig -export /home/oracle/ocrbackup -s online

Remember to take ocr & voting disks backup after any changing in the cluster registry.
(Add/Remove service , node , instance etc)