This is an excerpt from the bestselling book
Oracle Grid & Real Application Clusters. To get immediate
access to the code depot of working RAC scripts, buy it
directly from the publisher and save more than 30%.
The following steps can be
followed to add instances to RAC nodes:
1. From any of the newly added
and configured nodes, the additional nodes listener processes are
configured using the Network Configuration Assistant (NETCA)
utility. Choose the same port number and protocol used on the
existing nodes. If the NETCA utility shows the existing node on the
node list page, there is no need to select this node because it
already has a listener configured on it.
2. Once the listeners are up,
convert the database to RAC starting up the instances on the other
nodes using one of the following procedures:
* Automated Conversion Procedure
* Manual Conversion Procedure
If a duplicate of the single
instance database was created as described in the section
Duplication of the Original Single Instance Database, the DBCA is
used to complete the conversion to a multi-instance RAC database.
1. Start by executing the DBCA
utility from the primary or initial node. On the node selection
screen, select the names of the nodes that to be included as part of
the cluster database. On the Template Selection screen, select the
preconfigured template, which is the single instance duplicate, that
was created earlier. Enter the database name for the RAC database
and respond to the remaining DBCA prompts.
2. Enter the name of the raw
device for the SPFILE on the Initialization Parameters screen to use
raw devices for the cluster database files. On the Storage page, if
a RAW file mapping file has not been specified, the default database
file names should be replaced with the raw devices for the control
files, redo logs, and datafiles to create the cluster database.
Click the Finish button and create the database.
3. Once DBCA completes the
conversion to the RAC database, the Password Management screen is
displayed. It is a requirement that the passwords for database
users who have SYSDBA and SYSOPER roles be changed. Once the
conversion process is complete, DBCA will exit.
Manual Conversion Procedure
If DBCA was not used to create a
duplicate image of the single instance database, the following steps
are performed complete the manual conversion to RAC:
1. For each new node, create an
Optimal Flexible Architecture (OFA) directory structure to support
the Oracle system. This structure should be the same on all of the
2. If there is a need to convert
the single instance database files from a regular cooked file system
to RAW devices, on UNIX/Linux copy the database datafiles, control
files, redo logs, and server parameter file into corresponding raw
devices using the DD command, or use the OCOPY command on
Windows-based systems. If no conversion is required, continue on to
the next step.
3. Use the ALTER DATABASE BACKUP
CONTROLFILE TO TRACE command to create a control file recreation
script in the location specified by the user_dump_dest
4. Edit the control file
recreation script with the REUSE keyword, a specification for
maxinstances with the Oracle suggested setting being 32, maxlogfiles
and such for a RAC database.
5. Recreate the control files by
executing the script as explained in the script header.
6. If the single instance
database is using an SPFILE parameter file, a temporary PFILE must
be created from the SPFILE using the following SQL statement:
PFILE='pfile_name' from spfile='spfile_name'
(the file names should be full
7. Shut down the database
8. Edit the temporary parameter
file and set the cluster_database parameter to TRUE, and set the
instance_number parameter to a unique value for each instance, using
the sid.parameter=value syntax.
9. At this point, the size of
the SGA must be adjusted to avoid swapping and paging when
converting to RAC. RAC requires around 350 bytes for each buffer to
accommodate the Global Cache Service (GCS). Therefore, if there are
15,250 buffers, RAC requires about 350*15,250 bytes or about 5 MB
more memory. Change the size of the SGA by changing the
db_cache_size and db_nk_cache_size parameters accordingly.
10. Once the PFILE has been
edited, use it to start up the database instance.
11. Once the instance is
started, create an undo tablespace for each additional instance
using the CREATE UNDO TABLESPACE SQL statement. If RAW devices are
in used, then ensure that the datafile for the undo tablespace is on
a RAW device.
12. Create a new redo thread
that has at least two redo logs for each additional instance. If RAW
devices are being used, ensure that the new redo log files are also
on RAW devices. Enable the new redo threads by using the ALTER
DATABASE SQL statement.
13. Shutdown the database
instance using either a shutdown normal or shutdown immediate
14. Copy the Oracle password
file from the source node to the corresponding location on the
additional RAC cluster nodes. Make sure that the oracle_sid name is
replaced in each password file name appropriately for each
15. Edit the PFILE and add the
remote_listener=listeners_db_name and sid.local_listener=listener_sid
16. Configure the net service
entries for the database and instances and address entries for the
local_listener for each instance and remote_listener in the
tnsnames.ora file and copy it to all nodes.
17. Create an SPFILE from the
PFILE using the command:
SPFILE='Spfile_name' from pfile='pfile_name'
names should be full path names)
18. If a cluster file system is
not in use, ensure that the SPFILE is on a RAW device.
19. Create a $oracle_home/dbs/initsid.ora
file on UNIX-based systems or a %oracle_home%\database\initsid.ora
file on Windows-based systems that contains the following entry:
where spfile_path_name is the complete path name of the SPFILE.
20. Add the configuration for
the RAC database and its instance-to-node mapping using SRVCTL
21. Start the RAC database using
Once the database has been
started with SRVCTL, the conversion process is complete, and the
following SQL statement can be used to see the status of all the
instances in the converted RAC database: