从oracle9i单实例转换到Oracle rac数据库
oracle9i单实例转换到Oracle rac数据库
oracle 9i single instance convert to rac database
[font=Courier New]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
$ORACLE_HOME/dbs/init
$ORACLE_HOME/dbs/init
*.cluster_database = TRUE
*.cluster_database_instances = 2
*.undo_management=AUTO (Add if you don't have it )
where LISTENER_RAC1 is an entry in the tnsnames.ora file like:
LISTENER_RAC1 =
(ADDRESS = (PROTOCOL = TCP)(HOST =
Keep only one line in $ORACLE_HOME/dbs/init
ifile=$ORACLE_HOME/dbs/init
You could also create a common spfile from this pfile and add a line
like spfile=$ORACLE_HOME/dbs/spfile
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
instance on the second node and set appropriate values for it:
*** Names may need to be modified
where LISTENER_RAC2 is an entry in the tnsnames.ora file like:
LISTENER_RAC2 =
(ADDRESS = (PROTOCOL = TCP)(HOST =
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.