If you did not use DBCA to create a preconfigured image of your single-instance database as described in "Use DBCA to Create an Image of the Single-Instance Database", then perform the following steps to complete the conversion:
Create the Optimal Flexible Architecture directory structure on each of the nodes that you have added.
Re-create the control files by running the CREATE CONTROLFILE
SQL statement with the REUSE
keyword and specify MAXINSTANCES
and MAXLOGFILES
, and so on, as needed for your Oracle RAC configuration. The MAXINSTANCES
recommended default is 32.
Shut down the database instance.
If your single-instance database was using an SPFILE, then create a temporary parameter file (PFILE) from the SPFILE using the following SQL statement:
CREATE PFILE='pfile_name' from spfile='spfile_name'
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.
If you optimized memory usage on your single-instance database, then adjust the size of the system global area (SGA) to avoid swapping and paging when you convert to Oracle RAC. You should make this adjustment because Oracle RAC requires about 350 bytes for each buffer to accommodate the Global Cache Service (GCS). For example, if you have 10,000 buffers, then Oracle RAC requires approximately 350 multiplied by 10,000 bytes more memory. Therefore, adjust the size of the SGA by changing the DB_CACHE_SIZE
and DB_nK_CACHE_SIZE
parameters accordingly.
Start the database instance using the PFILE created in Step 4.
If your single-instance database was using automatic undo management, then create an undo tablespace for each additional instance using the CREATE UNDO TABLESPACE
SQL statement.
Create redo threads that have at least two redo logs for each additional instance. Enable the new redo threads by using an ALTER DATABASE
SQL statement. Then, shut down the database instance.
Copy the Oracle password file from the initial node, or from the node on which you are working, to the corresponding ___location on the additional nodes on which the cluster database will have an instance. Replace the ORACLE_SID
name in each password file appropriately for each additional instance.
Set the REMOTE_LISTENER
parameter to the single client access name (SCAN) and port.
Configure the net service entries for the database and instances, and address entries for the LOCAL_LISTENER
for each instance and for the REMOTE_LISTENER
in the tnsnames.ora
file, and copy the tnsnames.ora
file to all nodes.
Create the SPFILE from the PFILE.
See Also:
Oracle Real Application Clusters Installation Guide for your platform for information about migrating to the SPFILE
Create the $ORACLE_HOME/dbs/init
sid
.ora
file that contains the following entry, where spfile_path_name
is the complete path name of the SPFILE:
spfile='spfile_path_name'
On the local node, use SQL*Plus to run catclust.sql
. This script creates the dictionary views needed for Oracle RAC databases. For example:
SQL> start ?/rdbms/admin/catclust.sql
Add the configuration for the Oracle RAC or Oracle RAC One Node database and its instance-to-node mapping using SRVCTL.
To add the configuration of an Oracle RAC database, use the following commands:
srvctl add database -d db_name -o Oracle_home -p spfile_path_name srvctl add instance -d db_name -i inst1_name -n node1_name srvctl add instance -d db_name -i inst2_name -n node2_name ...
To add the configuration of an Oracle RAC One Node database, use the following command:
srvctl add database -d db_name -c RACONENODE -o Oracle_home -p spfile_path_name
Start the Oracle RAC or Oracle RAC One Node database using SRVCTL:
srvctl start database -d db_name
After starting the database with SRVCTL, your conversion process is complete. You can run the following SQL statement to see the status of all the instances in your Oracle RAC database:
SQL> SELECT * FROM v$active_instances;