ADD INSTANCE MANUALLY

We can add an instance to a cluster database by 3 methods :
- Enterprise Manager
- DBCA
- Manually
  In this post I will demonstrate the method to add an instance manually to a RAC database.
Current scenario
———————-
Total no. of nodes in the cluster   : 3
Names of nodes                         : host01, host02, host03
Name of RAC database              : orcl
Instances of orcl database          : orcl1, orcl2
Nodes hosting orcl instances      : host01, host02
Now I want to add another instance orcl3 of orcl database on host03 manually.
Following are the steps which need to be taken:
- Login to orcl database in SQLPLUS as sysdba on one of the existing nodes ,say host01
- create undo tablespace and redo log groups for the instance 3
SQL>create undo tablespace undotbs3 datafile '+DATA';
alter database add logfile thread 3;
alter database add logfile thread 3;
– Set various parameters for the new instance –
SQL>alter system set instance_number = 3         scope=spfile sid='orcl3';
alter system set instance_name = 'orcl3'     scope=spfile sid='orcl3';
alter system set thread = 3                         scope=spfile sid='orcl3';
alter system set undo_tablespace=undotbs3 scope=spfile sid='orcl3';
alter database enable thread 3;
– Stop all instances of the database orcl
$srvctl stop database -d orcl
– Restart database orcl so that new parameters in spfile are read
$srvctl start database -d orcl
—– Add the instance to the database –
$srvctl add instance -d orcl -i orcl3 -n host03
– Start the instance –
$srvctl start instance -d orcl -i orcl3
– Check that all the instances (including the newly added orcl3) are running –
$srvctl status database -d orcl
– Copy the following entry for orcl in tnsnames.ora from host01 to tnsnames.ora on host03 -
ORCL =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = cluster01-scan.cluster01.example.com)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl)
    )
  )
– Copy the password file from host01 to host03
host01$scp $ORACLE_HOME/dbs/orapwdorcl1
host03:/u01/app/oracle/product/11.2.0/dbhome_1/dbs/orapwdorcl3
— Test that remote connection can be made from host03 –
host03$sqlplus sys/oracle@orcl as sysdba 

 SQL>sho parameter db_name
I hope this article was useful. Your comments and suggestions are always welcome!
———————————————————————————————-
Related links :

 Home
RAC Index
11gR2 RAC: Add A Node

                                                     ——————-

Your comments and suggestions are welcome!