How can I manually add a new instance to a cluster?
Assuming that the cluster is up and running and also assuming that you can connect successfully to one of the nodes.
Add redo groups to node2
alter database add logfile thread 2 ‘/u02/oradata/myrac2/redo04.log’ size 10m;
alter database add logfile thread 2 ‘/u02/oradata/myrac2/redo05.log’ size 10m;
alter database add logfile thread 2 ‘/u02/oradata/myrac2/redo06.log’ size 10m;
alter database enable thread 2;
Create undo tablespace for the second node:-
create undo tablespace UNDOTBS2
datafile ‘/u02/oradata/myrac2/undotbs201.dbf’ size 40m;
Set instance specific parameters in the spfile
alter system set cluster_database_instances=2 scope=spfile;
alter system set undo_tablespace=UNDOTBS2 scope=spfile sid=’myrac2′;
alter system set instance_name=myrac2 scope=spfile sid=’myrac2′;
alter system set instance_number=2 scope=spfile sid=’myrac2′;
alter system set thread=2 scope=spfile sid=’myrac2′;
alter system reset local_listener scope=spfile sid=’listeners_rac2′;
alter system reset remote_listener scope=spfile sid=’*';
Now ensure that both instances init
the spfile.
initmyrac1.ora -> SPFILE=/u02/oracle/dbs/spfileMYRAC.ora
initmyrac2.ora -> SPFILE=/u02/oracle/dbs/spfileMYRAC.ora
Now connect to each instances specifically and start the database:-
NODE1:
export ORACLE_SID=MYRAC1
sqlplus / as sysdba
startup;
NODE2:
export ORACLE_SID=MYRAC2
sqlplus / as sysdba
startup;
SQL>select * from v$active_instances;–this should display 2 nodes.
Note
You can also use dbca to create your database as DBCA is rac aware.
Oracle clusterware is a required component for using RAC. We can use other clusterware from vendors if it is certified. Oracle Clusterware | / \ Voting Disk OCR A RAC database can have upto 10 Instances. Tools for RAC Are:-
Enterprise Manager
Cluster Verification Utility CVU
Server control SRVCTL
Cluster ready services control CRSCTL
Oracle Interface config tool OIFCFG
OCR Configuration Tool OCRCONFIG
