Skip to content

Adding Instance to Oracle RAC

    For Adding Instance to Oracle RAC
    
    As root user, execute orainstRoot.sh and root.sh on racpb3 :
    [[email protected] ]# sh orainstRoot.sh 
    Creating the Oracle inventory pointer file (/etc/oraInst.loc)
    Changing permissions of /u01/app/oraInventory.
    Adding read,write permissions for group.
    Removing read,write,execute permissions for world.
    
    Changing groupname of /u01/app/oraInventory to oinstall.
    The execution of the script is complete.
    
    [[email protected] grid]# sh root.sh
    Check /u01/app/12.1.0/grid/install/root_racpb3.localdomain.com_2018-12-27_21-52-22.log for the output of root script
    Check Clusterware status :
    [[email protected] bin]# ./crsctl check cluster -all
    **************************************************************
    racpb1:
    CRS-4537: Cluster Ready Services is online
    CRS-4529: Cluster Synchronization Services is online
    CRS-4533: Event Manager is online
    **************************************************************
    racpb2:
    CRS-4537: Cluster Ready Services is online
    CRS-4529: Cluster Synchronization Services is online
    CRS-4533: Event Manager is online
    **************************************************************
    racpb3:
    CRS-4537: Cluster Ready Services is online
    CRS-4529: Cluster Synchronization Services is online
    CRS-4533: Event Manager is online
    **************************************************************
    [[email protected] bin]# ./crs_stat -t -v
    Name Type R/RA F/FT Target State Host 
    ----------------------------------------------------------------------
    ora.DATA.dg ora....up.type 0/5 0/ ONLINE ONLINE racpb1 
    ora....ER.lsnr ora....er.type 0/5 0/ ONLINE ONLINE racpb1 
    ora....N1.lsnr ora....er.type 0/5 0/0 ONLINE ONLINE racpb1 
    ora....N2.lsnr ora....er.type 0/5 0/0 ONLINE ONLINE racpb3 
    ora....N3.lsnr ora....er.type 0/5 0/0 ONLINE ONLINE racpb2 
    ora.MGMTLSNR ora....nr.type 0/0 0/0 ONLINE ONLINE racpb2 
    ora.asm ora.asm.type 0/5 0/ ONLINE ONLINE racpb1 
    ora.cvu ora.cvu.type 0/5 0/0 ONLINE ONLINE racpb2 
    ora.mgmtdb ora....db.type 0/2 0/1 ONLINE ONLINE racpb2 
    ora....network ora....rk.type 0/5 0/ ONLINE ONLINE racpb1 
    ora.oc4j ora.oc4j.type 0/1 0/2 ONLINE ONLINE racpb2 
    ora.ons ora.ons.type 0/3 0/ ONLINE ONLINE racpb1 
    ora.orcl11g.db ora....se.type 0/2 0/1 ONLINE ONLINE 
    ora....SM1.asm application 0/5 0/0 ONLINE ONLINE racpb1 
    ora....B1.lsnr application 0/5 0/0 ONLINE ONLINE racpb1 
    ora.racpb1.ons application 0/3 0/0 ONLINE ONLINE racpb1 
    ora.racpb1.vip ora....t1.type 0/0 0/0 ONLINE ONLINE racpb1 
    ora....SM2.asm application 0/5 0/0 ONLINE ONLINE racpb2 
    ora....B2.lsnr application 0/5 0/0 ONLINE ONLINE racpb2 
    ora.racpb2.ons application 0/3 0/0 ONLINE ONLINE racpb2 
    ora.racpb2.vip ora....t1.type 0/0 0/0 ONLINE ONLINE racpb2 
    ora....SM3.asm application 0/5 0/0 ONLINE ONLINE racpb3 
    ora....B3.lsnr application 0/5 0/0 ONLINE ONLINE racpb3 
    ora.racpb3.ons application 0/3 0/0 ONLINE ONLINE racpb3 
    ora.racpb3.vip ora....t1.type 0/0 0/0 ONLINE ONLINE racpb3 
    ora.scan1.vip ora....ip.type 0/0 0/0 ONLINE ONLINE racpb1 
    ora.scan2.vip ora....ip.type 0/0 0/0 ONLINE ONLINE racpb3 
    ora.scan3.vip ora....ip.type 0/0 0/0 ONLINE ONLINE racpb2

    Add Node:

    [[email protected] addnode]$ export ORACLE_SID=orcl11g
    [[email protected] addnode]$ export ORACLE_HOME=/u01/app/oracle/product/12.1.0/db_1
    [[email protected] ~]$ cd $ORACLE_HOME/addnode
    
    [[email protected] addnode]$ ./addnode.sh -silent "CLUSTER_NEW_NODES={racpb3}" "CLUSTER_NEW_VIRTUAL_HOSTNAMES={racvr3}"
    Starting Oracle Universal Installer...
    
    Checking Temp space: must be greater than 120 MB. Actual 7937 MB Passed
    Checking swap space: must be greater than 150 MB. Actual 5999 MB Passed
    
    
    Prepare Configuration in progress.
    
    Prepare Configuration successful.
    .................................................. 8% Done.
    You can find the log of this install session at:
    /u01/app/oraInventory/logs/addNodeActions2018-12-28_12-34-24AM.log
    
    Instantiate files in progress.
    
    Instantiate files successful.
    .................................................. 14% Done.
    
    Copying files to node in progress.
    
    Copying files to node successful.
    .................................................. 73% Done.
    
    Saving cluster inventory in progress.
    SEVERE:Remote 'UpdateNodeList' failed on nodes: 'racpb2'. Refer to '/u01/app/oraInventory/logs/addNodeActions2018-12-28_12-34-24AM.log' for details.
    It is recommended that the following command needs to be manually run on the failed nodes: 
    /u01/app/oracle/product/12.1.0/db_1/oui/bin/runInstaller -updateNodeList -noClusterEnabled ORACLE_HOME=/u01/app/oracle/product/12.1.0/db_1 CLUSTER_NODES=racpb1,racpb2,racpb3 CRS=false "INVENTORY_LOCATION=/u01/app/oraInventory" LOCAL_NODE=<node on which command is to be run>. 
    Please refer 'UpdateNodeList' logs under central inventory of remote nodes where failure occurred for more details.
    .................................................. 80% Done.
    
    Saving cluster inventory successful.
    The Cluster Node Addition of /u01/app/oracle/product/12.1.0/db_1 was unsuccessful.
    Please check '/tmp/silentInstall.log' for more details.
    
    Setup Oracle Base in progress.
    
    Setup Oracle Base successful.
    .................................................. 88% Done.
    
    As a root user, execute the following script(s):
    1. /u01/app/oracle/product/12.1.0/db_1/root.sh
    
    Execute /u01/app/oracle/product/12.1.0/db_1/root.sh on the following nodes: 
    [racpb3]
    
    ..........
    Update Inventory in progress.
    .................................................. 100% Done.
    
    Update Inventory successful.
    Successfully Setup Software.

    Run the below commands on racpb3

    [[email protected] db_1]$ /u01/app/oracle/product/12.1.0/db_1/oui/bin/runInstaller -updateNodeList -noClusterEnabled ORACLE_HOME=/u01/app/oracle/product/12.1.0/db_1 CLUSTER_NODES=racpb1,racpb2,racpb3 CRS=false "INVENTORY_LOCATION=/u01/app/oraInventory" LOCAL_NODE=3
    Starting Oracle Universal Installer...
    
    Checking swap space: must be greater than 500 MB. Actual 5994 MB Passed
    The inventory pointer is located at /etc/oraInst.loc
    'UpdateNodeList' was successful.

    Execute root.sh on new node racpb3 as root user 

    [[email protected] Desktop]# sh /u01/app/oracle/product/12.1.0/db_1/root.sh 
    Check /u01/app/oracle/product/12.1.0/db_1/install/root_racpb3.localdomain.com_2018-12-28_00-57-10.log for the output of root script
    [[email protected] Desktop]# tail -f /u01/app/oracle/product/12.1.0/db_1/install/root_racpb3.localdomain.com_2018-12-28_00-57-10.log
    ORACLE_OWNER= oracle
    ORACLE_HOME= /u01/app/oracle/product/12.1.0/db_1
    Copying dbhome to /usr/local/bin ...
    Copying oraenv to /usr/local/bin ...
    Copying coraenv to /usr/local/bin ...
    
    Entries will be added to the /etc/oratab file as needed by
    Database Configuration Assistant when a database is created
    Finished running generic part of root script.
    Now product-specific root actions will be performed.

    Set env to new node racpb3 :

    grid()
    {
    ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
    ORACLE_HOME=/u01/app/12.1.0/grid; export ORACLE_HOME
    export ORACLE_SID=+ASM3
    ORACLE_TERM=xterm; export ORACLE_TERM
    BASE_PATH=/usr/sbin:$PATH; export BASE_PATH
    PATH=$ORACLE_HOME/bin:$BASE_PATH; export PATH
    
    LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
    CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
    }
    
    11g()
    {
    ORACLE_HOME=/u01/app/oracle/product/12.1.0/db_1
    export ORACLE_HOME
    ORACLE_BASE=/u01/app/oracle
    export ORACLE_BASE
    ORACLE_SID=orcl11g3
    export ORACLE_SID
    LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib:.
    export LD_LIBRARY_PATH
    LIBPATH=$ORACLE_HOME/lib32:$ORACLE_HOME/lib:/usr/lib:/lib
    export LIBPATH
    TNS_ADMIN=${ORACLE_HOME}/network/admin
    export TNS_ADMIN
    PATH=$ORACLE_HOME/bin:$PATH:.
    export PATH
    }

    Check the database status and instances :

    [[email protected] ~]$ srvctl status database -d orcl11g
    Instance orcl11g1 is running on node racpb1
    Instance orcl11g2 is running on node racpb2
    On a racpb1 , start the DBCA utility.
    $ dbca
    

    Check Database status and configuration :

    [[email protected] ~]$ srvctl status database -d orcl11g
    Instance orcl11g1 is running on node racpb1
    Instance orcl11g2 is running on node racpb2
    Instance orcl11g3 is running on node racpb3
    
    
    [[email protected] ~]$ srvctl config database -d orcl11g
    Database unique name: orcl11g
    Database name: orcl11g
    Oracle home: /u01/app/oracle/product/12.1.0/db_1
    Oracle user: oracle
    Spfile: +DATA/orcl11g/spfileorcl11g.ora
    Password file: 
    Domain: localdomain.com
    Start options: open
    Stop options: immediate
    Database role: PRIMARY
    Management policy: AUTOMATIC
    Server pools: 
    Disk Groups: DATA
    Mount point paths: 
    Services: 
    Type: RAC
    Start concurrency: 
    Stop concurrency: 
    OSDBA group: dba
    OSOPER group: oinstall
    Database instances: orcl11g1,orcl11g2,orcl11g3
    Configured nodes: racpb1,racpb2,racpb3
    Database is administrator managed

    Also See:

    Oracle RAC