3.9 Adding Oracle Database Software to the New Servers

It is necessary to add the Oracle Database software directory ORACLE_HOME to the database servers after the cluster modifications are complete, and all the database servers are in the cluster.

  1. Check the Oracle_home/bin directory for files ending in zero (0), such as nmb0, that are owned by the root user and do not have oinstall or world read privileges. Use the following command to modify the file privileges:

    # chmod a+r $ORACLE_HOME/bin/*0
    

    If you are running Oracle Database release 12c or later, you also have to change permissions for files ending in uppercase O, in addition to files ending in zero.

    # chmod a+r $ORACLE_HOME/bin/*O
    
  2. This step is required for Oracle Database 11g only. If you are running Oracle Database 12c, you can skip this step because the directory has already been created.

    Create the ORACLE_BASE directory for the database owner, if it is different from the Oracle Grid Infrastructure software owner (Grid user) using the following commands:

    # dcli -g root/new_group_files/dbs_group -l root mkdir -p /u01/app/oracle
    # dcli -g root/new_group_files/dbs_group -l root chown oracle:oinstall  \
     /u01/app/oracle
    
  3. Run the following command to set ownership of the emocmrsp file in the Oracle Database $ORACLE_HOME directory:

    # dcli -g old_db_nodes -l root chown -f oracle:dba \
    /u01/app/11.2.0/grid/OPatch/ocm/bin/emocmrsp
    
  4. This step is required for Oracle Database 11g only. If you are running Oracle Database 12c, then you can skip this step because the values are entered on the command line.

    Create a response file, add-db-nodes.rsp, as the oracle owner to add the new servers similar to the following:

    RESPONSEFILE_VERSION=2.2.1.0.0
    
    CLUSTER_NEW_NODES={dm02db01,dm02db02,dm02db03,dm02db04,dm02db05,   \
    dm02db06,dm02db07,dm02db08}
    

    Note:

    The lines listing the server names should appear on one continuous line. The are wrapped in the document due to page limitations.
  5. Add the Oracle Database ORACLE_HOME directory to the new servers by running the addNode.sh script from an existing server as the database owner user.

    • If you are running Oracle Grid Infrastructure 11g:

      $ cd $ORACLE_HOME/oui/bin
      $ ./addNode.sh -silent -responseFile /path/to/add-db-nodes.rsp
      
    • If you are running Oracle Grid Infrastructure 12c, then you specify the nodes on the command line. The syntax is:

      ./addnode.sh -silent "CLUSTER_NEW_NODES={comma_delimited_new_nodes}"

      For example:

      $ cd $Grid_home/addnode
      
      $ ./addnode.sh -silent "CLUSTER_NEW_NODES={dm02db01,dm02db02,dm02db03,dm02db04,dm02db05,
      dm02db06,dm02db07,dm02db08}" -ignoreSysPrereqs -ignorePrereq
  6. Ensure the $ORACLE_HOME/oui/oraparam.ini file has the memory settings that match the parameters set in the Oracle Grid Infrastructure home.

  7. Run the root.sh script on each server when prompted as the root user using the dcli utility.

    $ dcli -g new_db_nodes -l root $ORACLE_HOME/root.sh
    

    In the preceding command, new_db_nodes is the file with the list of new database servers.

  8. Verify the ORACLE_HOME directories have been added to the new servers.

    # dcli -g /root/all_group -l root du -sm \
      /u01/app/oracle/product/11.2.0/dbhome_1