Apply Patch 9926448
Apply This patch while the instance is still in non-RAC
Shut down The Application and take a backup
Modify the init.ora for single node to include RAC parameters
a. cluster_database=TRUE
b. luster_database_instances=2
c. instance_number=<number of the instance>
d. cluster_interconnects
e. modify control_files parameter to point to ASM disk
f. modify log_archive_dest_n parameter to point to ASM
g. modify db_create_file_dest parameter to point to ASM
h. modify db_create_online_log_dest_n parameter to point to ASM
i. modify remote_listener parameter to use scan alias (ex:racPROD-scan.corp.com:1525)
Migrating Database files to ASM
a.Login to database server node 1.Export ORACLE_SID as <DB_NAME>1
b.Run the following RMAN script from a VNC terminal
c.
rman <<EOF
connect target /
startup nomount pfile=<modified pfile name from previous step>
restore controlfile from '<control file location in local disk>';
startup mount
CONFIGURE DEVICE TYPE DISK PARALLELISM 16;
backup as copy database format '+DATA${SID}';
switch database to copy;
recover database;
alter database open resetlogs;
EOF
Drop temp files and log files and creating them in ASM
The above step will all Datafiles in ASM and would correctly modify the control file to reflect to the new direction but temp files and log files would be still pointing to filesystem
For log files follow the below steps
-- execute select l.group# , l.bytes , l.status , lf.member from v$logfile lf , v$log l where lf.group# = l.group#. it willshow which members are not in ASM
-- Drop any log groups by using 'alter database drop log group &gr_no;', make sure status of the members of the group is not CURRENT.
For TEMP files follow the following
-- Create another temptablespace called TEMP2
-- Make it as default temp tablespace.
-- drop original temp tablespace.
-- create the temp tablespace TEMP.
-- make TEMP as default temp TS.
-- drop TEMP2
Creating init.ora (pfile) in node 2
pfile in node2 will be similar tothat in node1.
Only difference would be instance_number,instance_name and undo_tablespace
Starting Node 2
Using SQL*PLUS as sysdba start the node 2
This would create a second log thread and would make it public
Registering Local and Remote Listener
In both the instance we have to add local and remote listener
Local Listener would be DB specific listener and Remote Listener would be cluster wide SCAN listener
Shut down the instances in both the nodes
At this point shut down both the instance
Register Database and Instance in Grid
Execute following command from any RAC node to register RAC DB and Instances to Grid
a) srvctl add database -d <DB_NAME (egORCL)> -o <ORACLE_HOME (eg /d01/11.2.0/product/11.2.0/dbhome_1)>
b) srvctl add instance -d <DB_NAME eg.ORCL> -i <instance_name e.g ORCL2> -n <node_name eg.rac-linux02>
c) srvctl add instance -d ORCL -i ORCL1 -n rac-linux1
Register DB Listener TO Grid
srvctl add listener –l <LISTENER_NAME eg LISTENER_ORCL> -p <Port eg 1526>
Starting Database using srvctl
After the above steps are carried out The Database is in RAC and is Part of Oracle High Availability Cluster
To check the same start the database using
srvctl start database –d <DB_NAME>
This will start the database in both the nodes
Generating Appsutil for DB Nodes
From Applcation node run
perl $AD_TOP/bin/admkappsutil.pl
This would generate appsutil.zip in $INST_TOP .Ftp the same to both the DB Nodes under ORACLE_HOME
Generating Context XML for DB Tier
As database owner unzip the appsutil.zip from previous step
unzip –o appsutil.zip
Run following in both the nodes to generate database context file
perl <RDBMS_ORACLE_HOME>/appsutil/bin/adbldxml.pl
At this point login to database as APPS and excute the following to clean FND_NODES table
EXEC FND_CONC_CLONE.SETUP_CLEAN;
Commit;
Run Autoconfig in both database nodes
perl <RDBMS_ORACLE_HOME>/appsutil/bin/adautocfg.pl
At prompt provide XML file name generated at previous step and apps password
Run Autoconfig in Apps Tier
In Apps Tier CONTEXT_XML change the following
Jdbc_url to point to new TNS address
e.g
jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(LOAD_BALANCE=YES)(FAILOVER=YES)(ADDRESS=(PROTOCOL=tcp)(HOST=rac-linux02-vipprd.corp.com)(PORT=1526))(ADDRESS=(PROTOCOL=tcp)(HOST=rac-linux01-vipprd.corp.com)(PORT=1526)))(CONNECT_DATA=(SERVICE_NAME=ORCL)))
oa_cman_server to
<cmanhost oa_var="s_cmanhost">racPROD-scan</cmanhost>
<domain oa_var="s_cmandomain">corp.com</domain>
oa_db_server to
<oa_db_server>
<dbhost oa_var="s_dbhost">racPROD-scan</dbhost>
<domain oa_var="s_dbdomain">corp.com</domain>
<dbsid oa_var="s_db_serv_sid">ORCL</dbsid>
<dbcset oa_var="s_dbcset">WE8ISO8859P1</dbcset>
</oa_db_server>
db_port to
<dbport oa_var="s_dbport" oa_type="EXT_PORT" base="1521" step="1" range="-1" label="Database Port">1525</dbport>
cman_port to
<cmanport oa_var="s_cmanport" label="Oracle Connection Manager Port">1525</cmanport>
The above will ensure generating failover TNS address for application
After these changes Run Autoconfig in node 1
Starting Application
Run cmclean in and start all application and check the components