Oracle® Real Application Clusters Installation and Configuration Guide 10g Release 1 (10.1) for AIX-Based Systems, hp HP-UX PA-RISC (64-bit), hp Tru64 UNIX, Linux, Solaris Operating System (SPARC 64-bit) Part No. B10766-01 |
|
![]() |
![]() |
This chapter describes the procedures for converting from single-instance Oracle databases to Real Application Clusters (RAC) databases. The topics in this appendix are:
Single-Instance to Cluster-Enabled Conversion Administrative Issues
Converting from Single-Instance to Real Application Clusters
If you are upgrading from Oracle Parallel Server to RAC or from an earlier version of RAC, then use the Database Upgrade Assistant (DBUA). In other words, the procedures in this chapter assume that your original single-instance database and the target RAC database are of the same version and running on the same platform.
See Also: Oracle Database Upgrade Guide for more information about the DBUA |
You are not using a supported configuration of a cluster file system or shared disks
Your application was specifically designed to not use cluster database processing
If your platform supports a cluster file system, then you can use it for RAC. You can also convert to RAC and use a non-shared file system. In either case, Oracle strongly recommends that you use Oracle Universal Installer (OUI) to perform an Oracle Database 10g installation that sets up the Oracle home in an identical location on each of the selected nodes in your cluster.
Your system must meet the following hardware and software requirements to convert to RAC:
A supported hardware and operating system software configuration
An additional license for Oracle Database 10g with RAC
Note the following administrative considerations before conversion:
Backup procedures should be available before converting from a single-instance Oracle database to RAC.
Additional archiving considerations apply in RAC environments. In particular, the archive file format requires a thread number. In addition, the archived logs from all instances of a RAC database are required for media recovery. If you archive to a file and you do not use a cluster file system, then a method of accessing the archive logs from all nodes on which the cluster database has instances is required where file systems are not shared.
To convert from single-instance Oracle databases to RAC, Oracle strongly recommends that you use the Database Configuration Assistant (DBCA). This is because the DBCA automates the configuration of the control file attributes, creates the undo tablespaces and the redo logs, and makes the initialization parameter file entries for cluster-enabled environments. It also configures the Oracle Net Services, Cluster Ready Services (CRS) resources, and the configuration for RAC database management for use by Oracle Enterprise Manager or the SRVCTL utility. This section describes the following scenarios:
To convert from a single-instance Oracle database that is on a non-cluster machine to RAC, perform the procedures described under the following headings in the order shown:
Use the DBCA to create a preconfigured image of your single-instance database by invoking the DBCA from the bin
directory under ORACLE_HOME
and choosing Welcome Manage Templates > Create a database template [select From an existing database (structure as well as data)] > Database instance [select the database instance name] > Template Name [enter template name, use database instance as the default, and description] > Finish.
The DBCA will generate two files, a database structure file (template_name
.dbc
) and database preconfigured image file (template_name
.dfb
). These files are generated by default in the ORACLE_HOME/assistants/dbca/templates
directory.
Perform the pre-installation steps as documented in Part II of this book. This includes creating the oracle
user account and the dba
group on all nodes, setting up oracle
user equivalence, set the DBCA_RAW_CONFIG
environment variable, and so on. Then set up shared storage by referring to the "Configure Disk Storage for Oracle Database and Recovery Files" sections in the pre-installation chapters in Part II.
See Also: Storage vendor-specific documentation for setting up the shared disk subsystem and for information about how to mirror and stripe disks |
To use vendor clusterware, form a cluster with the required number of nodes according to your vendor's documentation. Once you have configured all of the nodes in your cluster, either with or without vendor clusterware, install CRS by referring to the procedures in Chapter 7, " Installing Cluster Ready Services".
This includes copying the database structure *.dbc
file and the database preconfigured image *.dfb
file that the DBCA created in the previous procedure "Back up the Original Single-Instance Database " to a temporary location on the node in the cluster from which you plan to run the DBCA.
Run the Oracle Universal Installer (OUI) to perform an Oracle installation with the Oracle 10g Database with RAC.
Select Cluster Installation Mode on the Specify Hardware Cluster Installation page of the Oracle Universal Installer (OUI) and select the nodes to include in your RAC database.
On the OUI Database Configuration Types page, select the Customized install type and use the template that you copied to a temporary location in the "Copy the Preconfigured Database Image" procedure. Use the browse option to select the template location.
After installing the Oracle software, the OUI runs the post installation configuration tools such as the Network Configuration Assistant (NetCA), the DBCA, and so on.
If you selected raw storage on the OUI Storage Options page, then on the DBCA File Locations Tab on the Initialization Parameters page, replace the data files, control files, and log files, and so on, with the corresponding raw device files if you have not setup the DBCA_RAW_CONFIG
environment variable. You must also make these entries on the Storage page.
See Also: for more details about the DBCA |
After creating the RAC database, the DBCA displays the Password Management page on which you must change the passwords for database privileged users who have SYSDBA
and SYSOPER
roles. Once the DBCA exits, the conversion process is complete.
There are three scenarios in which a single-instance database can exist on a cluster machine:
Scenario 1: The Oracle home from which the single-instance database is running is cluster installed.
Scenario 2: The Oracle home from which the single-instance database is running is cluster installed but the RAC feature is disabled.
Scenario 3: The Oracle home from which the single-instance database is running is not cluster installed.
Use the following procedures to convert your single-instance database on a cluster machine to RAC for all of these scenarios.
Perform the following procedures to convert a single-instance database on a cluster running from a cluster installed (Oracle Database 10g with RAC) Oracle home.
Use the DBCA to create a preconfigured image of your single-instance database as described under the heading "Back up the Original Single-Instance Database ". To perform the conversion manually, shut down the single-instance database.
To add nodes to your cluster, add and connect these nodes to the cluster as described under the heading "Perform the Pre-Installation Steps". Ensure that all of these nodes can access the shared storage. Also extend the CRS home to the new nodes using the procedures for "Adding Nodes at the Clusterware Layer on UNIX" as described in the Oracle Real Application Clusters Administrator's Guide.
From the existing Oracle home, extend this home to the new nodes using the procedure "Adding Nodes at the Oracle RAC Database Layer" as described in the Oracle Real Application Clusters Administrator's Guide.
From one of the newly added nodes, configure the listeners on the additional nodes using the NetCA. Choose the same port number and protocol that you used on the existing node. If the NetCA displays the existing node in the node list page, then do not select this node because the listener is already configured on it.
Convert the database using one of the following procedures:
If you created the preconfigured image of the single instance database as described under the heading "Back up the Original Single-Instance Database ", then use the DBCA to complete the conversion to a RAC database.
Start the DBCA from the initial node. Select the names of the nodes that you want to include as part of your cluster database. On the Template Selection page, select the preconfigured template that you created in Step 0. Enter the database name and respond to the remaining DBCA prompts.
To use raw devices for the cluster database files, on the Initialization Parameters page enter the raw device name for the SPFILE on the File Locations tab. On the Storage page, replace the default database file names with the raw devices for the control files, redo logs, and datafiles to create the cluster database. Click Finish and create the database.
After creating the RAC database, the DBCA displays the Password Management page on which you must change the passwords for database privileged users who have SYSDBA
and SYSOPER
roles. Once the DBCA exits, the conversion process is complete.
Because you did not use the DBCA to create a preconfigured image of your single-instance database in Step 0, perform the following steps to complete the conversion:
Create the OFA directory structure on all of the nodes that you have added.
If you are converting single-instance database files on a file system to raw devices, then copy the database datafiles, control files, redo logs, and server parameter file to their corresponding raw devices using the dd
command. Otherwise, continue to the next step.
Re-create the control files by executing the CREATE CONTROLFILE
SQL statement with the REUSE
keyword and specify MAXINSTANCES
and MAXLOGFILES
, and so on, as needed for your RAC configuration. The MAXINSTANCES
recommended default is 32.
Shut down the database instance.
If your single-instance database was using an SPFILE parameter file, then create a temporary PFILE from the SPFILE using the following SQL statement:
CREATE PFILE='pfile_name' from spfile='spfile_name'
Set the CLUSTER_DATABASE
parameter to TRUE
, set the INSTANCE_NUMBER
parameter to a unique value for each instance, using a sid
.
parameter
=
value
syntax.
If you optimized memory usage on your single-instance database, adjust the size of the SGA to avoid swapping and paging when you convert to RAC. This is because RAC requires about 350 bytes for each buffer to accommodate the Global Cache Service (GCS). For example, if you have 10,000 buffers, RAC requires about 350*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 up the database instance using the PFILE created in step 5.
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. If you are using raw devices, then ensure that the datafile for the undo tablespace is on the raw device.
Create redo threads that have at least two redo logs for each additional instance. If you are using raw devices, then ensure that the redo log files are on raw devices. Enable the new redo threads by using an ALTER DATABASE
SQL statement. Then shutdown the database instance.
Copy the Oracle password file from the initial node, or from the node from which you are working, to the corresponding location on the additional nodes on which the cluster database will have an instance. Make sure that you replace the ORACLE_SID
name in each password file appropriately for each additional instance.
Add REMOTE_LISTENER=LISTENERS_
DB_NAME
and sid
.LOCAL_LISTENER=LISTENER_
SID
parameters to the PFILE.
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.
Create the SPFILE from the PFILE using the procedures under the heading "Procedures for Migrating to the Server Parameter File ". If you are not using a cluster file system, then ensure that the SPFILE is on a raw device.
Create the $ORACLE_HOME/dbs/initSID.ora
file that contains the following entry:
spfile='spfile_path name
'
Where spfile_path name
is the complete path name of the SPFILE.
Add the configuration for the RAC database and its instance-to-node mapping using SRVCTL.
Start the RAC database using SRVCTL.
After starting the database with SRVCTL, your conversion process is complete and, for example, you can execute the following SQL statement to see the statuses of all the instances in your RAC database:
select * from v$active_instances
This installation is possible if you performed a one-node cluster (with RAC) installation but later disabled the RAC feature by unlinking it from the oracle
binary before creating the single instance database. (However, you can also select the "local", "non-cluster" selection on the Node Selection Page to create a non-RAC-enabled single-instance home on a cluster.) Perform the following procedures to convert this type of single-instance database to a RAC database:
On the cluster node where the single-instance database is running, execute step 0 of "Single Instance on a Cluster Running from a Cluster Enabled Oracle Home".
Change the directory to the lib
subdirectory in the rdbms
directory under the Oracle home.
Relink the oracle
binary by executing the following commands:
make -f ins_rdbms.mk rac_on make -f ins_rdbms.mk ioracle.
Continue with Step 2.
This installation is only possible if you selected the local installation option on the OUI Specify Hardware Cluster Installation page during an Oracle Database 10g installation.
To covert this database to a RAC database, perform the procedures described under the following headings:
"Install Oracle Database 10g Software with Real Application Clusters". In this step, make sure that you select a new Oracle home other than the one from which the single-instance database was running.
After completing the conversion, note the following points as described in the RAC documentation:
Follow the recommendations for using load balancing and TAF as described in the Oracle Real Application Clusters Administrator's Guide
Use locally managed tablespaces instead of dictionary managed tablespaces to reduce contention and manage sequences in RAC as described in the Oracle Real Application Clusters Deployment and Performance Guide
Follow the guidelines for configuring an interconnect, for using automatic segment space management and for using SRVCTL to administer multiple instances as described in the Oracle Real Application Clusters Administrator's Guide
The buffer cache and shared pool capacity requirements in RAC are slightly greater than those in single-instance Oracle databases. Therefore, you may wish to increase the size of the buffer cache by about 10% and the size of the shared pool by about 15%.