oracle 9i single instance convert to rac database

paulyibinyi發表於2010-05-30
PURPOSE
-------

This article provides a method to convert a Single Instance 9i database to
a Real Application Clusters 9i database without using export/import tools.


SCOPE & APPLICATION
-------------------

This article is intended for Oracle Support Analysts and DBAs who support or
administrate Oracle Real Application Clusters databases.  It is related to
databases running on any Cluster File System.  (see Note: 183408.1 for more
information about CFS)

It is assumed that a Cluster File System (CFS) is used for your 9i Single
Instance database; therefore, you do not need to move your datafiles from
regular file system files to raw devices when switching from the Single
Instance Database to RAC.

This article is related to instance migration only, not software migration.
To install the RAC option, you will need to use the Oracle Universal Installer
and select this option.

For more details, please report to the Oracle 9i Installation Guide.

Steps to convert your existing 9i single instance database to RAC
-----------------------------------------------------------------

1. Make a full database backup before you change anything.


2. Copy the existing $ORACLE_HOME/dbs/init.ora to
   $ORACLE_HOME/dbs/init.ora.  Add the following parameters to
   $ORACLE_HOME/dbs/init.ora:

        *.cluster_database =  TRUE
        *.cluster_database_instances  = 2
*.undo_management=AUTO      (Add if you don't have it )
        .undo_tablespace=undotbs  (undo tablespace which already exists)
.instance_name=RAC1
.instance_number=1
.thread=1
        .local_listener=LISTENER_RAC1

   where LISTENER_RAC1 is an entry in the tnsnames.ora file like:

        LISTENER_RAC1 =
          (ADDRESS = (PROTOCOL = TCP)(HOST = )(PORT = 1521))

   Keep only one line in $ORACLE_HOME/dbs/init.ora:

         ifile=$ORACLE_HOME/dbs/init.ora

   You could also create a common spfile from this pfile and add a line
   like spfile=$ORACLE_HOME/dbs/spfile.ora in each init.ora
   file.  For more details about how to do this, please refer to Note 136327.1.


3. Open your database and run $ORACLE_HOME/rdbms/admin/catclust.sql to create
   cluster database specific views within the existing instance.


4. Recreate control file if you defined maxinstances to be 1 when you created
   the single instance database.

   To check your current setting of maxinstances, run the following command
   while the database is mounted or open and connected as a user with DBA
   privileges: 

       % sqlplus /nolog
       SQL> connect / as sysdba
       SQL> startup mount
       SQL> alter database backup controlfile to trace;  

   The trace file is located in udump directory.  Check the maxinstance value
   in the CREATE CONTROLFILE statement.  Please refer to Note.118931.1
   Recreating the Controlfile in RAC and OPS 


5. Add instance specific parameters in the init.ora for the second
   instance on the second node and set appropriate values for it:

*** Names may need to be modified

.instance_name=RAC2
.instance_number=2
.local_listener=LISTENER_RAC2
.thread=2
.undo_tablespace=UNDOTBS2
        .cluster_database =  TRUE
        .cluster_database_instances  = 2

   where LISTENER_RAC2 is an entry in the tnsnames.ora file like:

   LISTENER_RAC2 =
     (ADDRESS = (PROTOCOL = TCP)(HOST = )(PORT = 1521))


6. From the first instance, mount the database and run the following command:

*** Path names, file names, and sizes will need to be modified

        alter database
        add logfile thread 2
          group 3 ('/dev/RAC/redo2_01_100.dbf') size 100M,
          group 4 ('/dev/RAC/redo2_02_100.dbf') size 100M;
        alter database enable public thread 2;
      

7. Create a second Undo Tablespace from the existing instance:

*** Path names, file names, and sizes will need to be modified

        CREATE UNDO TABLESPACE UNDOTBS2 DATAFILE
'/dev/RAC/undotbs_02_210.dbf' SIZE 200M ;


8. Set ORACLE_SID and ORACLE_HOME environment variables on the second node.


9. Start the second Instance.

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/7199859/viewspace-664015/,如需轉載,請註明出處,否則將追究法律責任。

相關文章