Convert single Instance database to 2 Node RAC

      No Comments on Convert single Instance database to 2 Node RAC

Convert Single Instance database to 2 Node RAC

Convert Single Instance Database to 2 Node RAC oracle 10g / 11g.
Install Clusterware on the nodes on which you want to setup RAC .
Install Oracle Database 10g / 11gR2  Real Application Cluster software and Database Software.
Make sure your Clusterware version must be greater than or equal to the single instance database version. It must be corrected.

Install the Software- The RDBMS software version must be same as your single instance RDBMS software version
db_name = pankajdb
Instance1 = pankajdb1
Instance2 = pankajdb2
Node1 = rac1 (hostname)
Node2 = rac2 (hostname)

Create Instance on Both the node.
ORADIM utility for create instance on windows environment.
ORADIM -NEW -SID PANKAJDB1 (On Node 1)
ORADIM -NEW -SID PANKAJDB2 (On Node 2)

Create pfile from spfile.
Create pfile=/path/location/initpankajdb.ora from spfile;

Edit pfile on node1 and add following parameters,
Edit Initpankajdb.ora
*.cluster_database = TRUE
*.cluster_database_instances = 2
*.undo_management=AUTO
pankajdb1.undo_tablespace=UNDOTBS1
pankajdb1.instance_name=pankajdb1
pankajdb1.instance_number=1
pankajdb1.thread=1
pankajdb1.local_listener=listener_pankajdb1
pankajdb2.instance_name=pankajdb2
pankajdb2.instance_number=2
pankajdb2.local_listener=listener_pankajdb2
pankajdb2.thread=2
pankajdb2.undo_tablespace=UNDOTBS2
Create spfile=’ORACLE_HOME/dbs/spfilepankajdb.ora’ from pfile=’path/location/initpankajdb.ora’;

3. Create pfile for instance 1
create pfile=’ORACLE_HOME/dbs/initpankajdb1.ora’ from spfile;

4. Create new password file for pankajdb1 instance under RAC oracle home.
Create a password file through orapwd utility on both node.
orapwd file=orapwpankajdb1 password=iStr789_pankajdb
5. Add second thread to the database which will be for instance 2
If there is 3 group available in thread 1 then add 3 more group in thread 2.

alter database add logfile thread 2 group 7 (‘+data’) size 50m,
group 8 (‘+data’) size 50m,
group 9 (‘+data’) size 50m;
alter database enable public thread 2;
6. Create the second instance undo tablespace from existing instance:
You can create undo tablespace either node 1 or 2 it will be stored in shared storage.
CREATE UNDO TABLESPACE UNDOTBS2 DATAFILE ‘+DATA’ SIZE 512M;
7. Run $ORACLE_HOME/rdbms/admin/catclust.sql to create cluster database specific views within the existing instance 1
SQL> @?/rdbms/admin/catclust.sql

8. On the second node, set ORACLE_HOME and SID for instance 2
9. Create the new password file for instance 2
orapwd file=orapwpankajdb2 password=iStr789_pankajdb

10. Start the second instance
Set ORACLE_SID and start Database
Startup
NOTE:
You might face some issue while starting the second instance as bdump, udump and cdump dir location will be that of single instance ORACLE_HOME which is not present in node2.

11.Need to create the required directory on node 2.
audit_file_dest
background_dump_dest
user_dump_dest
core_dump_dest
Add database in cluster
srvctl add database -d pankajdb -o /u01/app/oracle/pankajdbuct/10.2.0/db -p +DATA/pankajdb/spfilepankajdb.ora
(Need to change exact path once the configuration is done)

13. Add Instance in the cluster
srvctl add instance -d pankajdb -i pankajdb1 -n rac1
srvctl add instance -d pankajdb -i pankajdb2 -n rac2
14.Crosscheck database status and cluster status for all node.
$ srvctl status database -d pankajdb
(It will show database status on both node )
$ srvctl status database -d dbname -i instance_name
$ srvctl status database -d pankajdb -i pankajdb1
srvctl stop instance -d database_name -i Instance_name
srvctl start instance -d database_name -i Instance_name
srvctl status instance -d database_name -i Instance_name

Check CRS
crsctl check crs
Check Votingdisk
crsctl query css votedick
Check Votingdisk
ocrcheck

Check all Cluster services
crs_stat -t (Oracle 10g)
crsctl stat -t (oracle 11g)

Leave a Reply

Your email address will not be published. Required fields are marked *