6. Initialize the Database to Oracle RAC One Node
Prior to initializing the database to RAC One Node, we have to
apply patch 9004119 to the Oracle Database home. The patch creates some
utilities used in managing and administrating a RAC One Node environment.
6.1 Apply Patch 9004119
Download and unzip the patch in a staging area. As the oracle
user on either node, execute:
oracle@gurnard1-> echo $ORACLE_HOME
/u01/app/oracle/product/11.2.0/dbhome_1
oracle@gurnard1-> pwd
/tmp/9004119
oracle@gurnard1-> $ORACLE_HOME/OPatch/opatch apply
Invoking OPatch 11.1.0.6.6
Oracle Interim Patch Installer version 11.1.0.6.6
Copyright (c) 2009, Oracle Corporation. All rights reserved.
Oracle Home : /u01/app/oracle/product/11.2.0/dbhome_1
Central Inventory : /u01/app/oraInventory
from : /etc/oraInst.loc
OPatch version : 11.1.0.6.6
OUI version : 11.2.0.1.0
OUI location : /u01/app/oracle/product/11.2.0/dbhome_1/oui
Log file location : /u01/app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch2010-04-05_14-41-54PM.log
Patch history file: /u01/app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch_history.txt
ApplySession applying interim patch '9004119' to OH '/u01/app/oracle/product/11.2.0/dbhome_1'
Running prerequisite checks...
OPatch detected the node list and the local node from the inventory. OPatch will patch the local system then propagate the patch to the remote nodes.
This node is part of an Oracle Real Application Cluster.
Remote nodes: 'gurnard2'
Local node: 'gurnard1'
Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/u01/app/oracle/product/11.2.0/dbhome_1')
Is the local system ready for patching? [y|n]
y
User Responded with: Y
Backing up files and inventory (not for auto-rollback) for the Oracle Home
Backing up files affected by the patch '9004119' for restore. This might take a while...
Backing up files affected by the patch '9004119' for rollback. This might take a while...
Patching component oracle.rdbms, 11.2.0.1.0...
Copying file to "/u01/app/oracle/product/11.2.0/dbhome_1/bin/racone2rac"
Copying file to "/u01/app/oracle/product/11.2.0/dbhome_1/bin/Omotion"
Copying file to "/u01/app/oracle/product/11.2.0/dbhome_1/bin/raconefix"
Copying file to "/u01/app/oracle/product/11.2.0/dbhome_1/bin/raconeinit"
Copying file to "/u01/app/oracle/product/11.2.0/dbhome_1/bin/raconestatus"
ApplySession adding interim patch '9004119' to inventory
Verifying the update...
Inventory check OK: Patch ID 9004119 is registered in Oracle Home inventory with proper meta-data.
Files check OK: Files from Patch ID 9004119 are present in Oracle Home.
The local system has been patched. You can restart Oracle instances on it.
Patching in rolling mode.
The node 'gurnard2' will be patched next.
Please shutdown Oracle instances running out of this ORACLE_HOME on 'gurnard2'.
(Oracle Home = '/u01/app/oracle/product/11.2.0/dbhome_1')
Is the node ready for patching? [y|n]
y
User Responded with: Y
Updating nodes 'gurnard2'
Apply-related files are:
FP = "/u01/app/oracle/product/11.2.0/dbhome_1/.patch_storage/9004119_Oct_22_2009_12_33_44/rac/copy_files.txt"
DP = "/u01/app/oracle/product/11.2.0/dbhome_1/.patch_storage/9004119_Oct_22_2009_12_33_44/rac/copy_dirs.txt"
MP = "/u01/app/oracle/product/11.2.0/dbhome_1/.patch_storage/9004119_Oct_22_2009_12_33_44/rac/make_cmds.txt"
RC = "/u01/app/oracle/product/11.2.0/dbhome_1/.patch_storage/9004119_Oct_22_2009_12_33_44/rac/remote_cmds.txt"
Instantiating the file "/u01/app/oracle/product/11.2.0/dbhome_1/.patch_storage/9004119_Oct_22_2009_12_33_44/rac/copy_files.txt.instantiated"
by replacing $ORACLE_HOME in "/u01/app/oracle/product/11.2.0/dbhome_1/.patch_storage/9004119_Oct_22_2009_12_33_44/rac/copy_files.txt" with actual path.
Propagating files to remote nodes...
Instantiating the file "/u01/app/oracle/product/11.2.0/dbhome_1/.patch_storage/9004119_Oct_22_2009_12_33_44/rac/copy_dirs.txt.instantiated"
by replacing $ORACLE_HOME in "/u01/app/oracle/product/11.2.0/dbhome_1/.patch_storage/9004119_Oct_22_2009_12_33_44/rac/copy_dirs.txt" with actual path.
Propagating directories to remote nodes...
The node 'gurnard2' has been patched. You can restart Oracle instances on it.
OPatch succeeded.
oracle@gurnard1-> cd $ORACLE_HOME/bin
oracle@gurnard1-> ls racone* Omotion
Omotion racone2rac raconefix raconeinit raconestatus
oracle@gurnard2-> cd $ORACLE_HOME/bin
oracle@gurnard2-> ls racone* Omotion
Omotion racone2rac raconefix raconeinit raconestatus
|
Script Name
|
Description
|
|
|
|
|
raconefix
|
Fixes metadata after an Omotion
failure or failover
|
|
raconeinit
|
Initialize the database to RAC One
Node
|
|
raconestatus
|
Check the status of RAC One Node
database
|
|
racone2rac
|
Upgrade RAC One Node database to RAC
|
|
Omotion
|
Migrate database online from one node
to another
|
6.2 Initialize database (appsdb) to RAC One Node
We will use the raconeinit utility created by the patch to
initialize the database. During the initialization operation, the database
instance, appsdb1 will be shutdown and brought back up as appsdb_1.
The script automatically creates the directories and files
supporting the renamed instance, appsdb_1:
oracle@gurnard1-> ls $ORACLE_BASE/diag/rdbms/appsdb/appsdb_1
alert cdump hm incident incpkg ir lck metadata stage sweep trace
oracle@gurnard1-> ls -lat $ORACLE_HOME/dbs/*appsdb_1
lrwxrwxrwx 1 oracle oinstall 55 Apr 5 15:11 /u01/app/oracle/product/11.2.0/dbhome_1/dbs/orapwappsdb_1 -> /u01/app/oracle/product/11.2.0/dbhome_1/dbs/orapwappsdb
As the oracle user on either node, execute the following:
oracle@gurnard1-> srvctl status database -d appsdb
Instance appsdb1 is running on node gurnard1
oracle@gurnard1-> raconestatus
RAC One Node databases on this cluster:
Database UP Fix Required Current Server Candidate Server Names
======== == ============ ====================== ===========================
Available Free Servers: gurnard2
oracle@gurnard1-> raconeinit
Candidate Databases on this cluster:
# Database RAC One Node Fix Required
=== ======== ============ ============
[1] appsdb NO N/A
Enter the database to initialize [1]:
Database appsdb is now running on server gurnard1
Candidate servers that may be used for this DB: gurnard2
Enter the names of additional candidate servers where this DB may run (space delimited): gurnard2
Please wait, this may take a few minutes to finish........
Database configuration modified.
oracle@gurnard1-> raconestatus
RAC One Node databases on this cluster:
Database UP Fix Required Current Server Candidate Server Names
======== == ============ ==================== ==========================
appsdb Y N gurnard1 gurnard1 gurnard2
Available Free Servers:
oracle@gurnard1-> srvctl status database -d appsdb
Instance appsdb_1 is running on node gurnard1
Notice that the database instance was renamed from appsdb1 to
appsdb_1.
Congratulations, you have completed the
installation of Oracle RAC One Node!