Note : Rac software installed on both the serves
Database already created on one node using RMAN backup.
orapwd file and initRAC.ora created,static listener running on node1
From the current instance add redo/undo for thread 2 :
====================================================
SQL> alter database add logfile thread 2 group 3 ('+DATA’,'+FRA’) size 500m reuse;
SQL> alter database add logfile thread 2 group 4 ('+DATA’,'+FRA’) size 500m reuse;
SQL> alter database enable public thread 2;
SQL> create undo tablespace UNDOTBS2 datafile ‘+DATA' size 500M;
Update the initRAC.ora on both nodes :
====================================
*.cluster_database_instances=2
*.cluster_database=true
*.remote_listener='LISTENERS_RAC’
RAC1.instance_name=RAC1
RAC2.instance_name=RAC2
RAC1.instance_number=1
RAC2.instance_number=2
RAC1.thread=1
RAC2.thread=2
RAC1.undo_tablespace='UNDOTBS1'
RAC2.undo_tablespace='UNDOTBS2'
*.control_files='+DATA/RAC/controlfile/current.256.666342941','+FRA/RAC/controlfile/current.256.662312941'
Start First instance from sqlplus :
=================================
[oracle@node1]$ export ORACLE_SID=RAC1
[oracle@node1]$ export ORACLE_HOME=/u01/app/oracle/product/11.2.0.4
[oracle@node1]$ orapwd file= $ORACLE_HOME/dbs/orapwRAC1 password=xxxxxxx
[oracle@node1]$ sqlplus /nolog
SQL*Plus: Release 11.2.0.4.0 - Production on Thu Jan 19 19:01:29 2017
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
SQL> connect /as sysdba
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 541065216 bytes
Fixed Size 2085288 bytes
Variable Size 289410648 bytes
Database Buffers 239075328 bytes
Redo Buffers 10493952 bytes
Database mounted.
Database opened.
SQL> select instance_name from v$instance;
INSTANCE_NAME
----------------
RAC1
Start Second instance from sqlplus :
==================================
[oracle@node2]$ export ORACLE_SID=RAC2
[oracle@node2]$ export ORACLE_HOME=/u01/app/oracle/product/11.2.0.4
[oracle@node2]$ orapwd file= $ORACLE_HOME/dbs/orapwRAC2 password=xxxxxxx
oracle@node2]$ sqlplus /nolog
SQL*Plus: Release 11.2.0.4.0 - Production on Thu Jan 19 19:02:29 2017
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
SYS@RAC1> connect /as sysdba
Connected to an idle instance.
SQL>startup
ORACLE instance started.
Total System Global Area 541065216 bytes
Fixed Size 2085288 bytes
Variable Size 289410648 bytes
Database Buffers 239075328 bytes
Redo Buffers 10493952 bytes
Database mounted.
Database opened.
SQL> select instance_name from v$instance;
INSTANCE_NAME
----------------
RAC2
SQL>
Add to the cluster and Restart :
==============================
SQL> @?/rdbms/admin/catclust.sql
[oracle@node1]$ srvctl add database -d RAC -o /u01/app/oracle/product/11.2.0.4
[oracle@node1]$ srvctl add instance -d RAC -i RAC1 -n node1
[oracle@node1]$ srvctl add instance -d RAC -i RAC2 -n node2
[oracle@node1]$ srvctl stop database -d RAC
[oracle@node1]$ srvctl start database -d RAC
SQL> select * from v$active_instances
$ crsctl status resource –t
$ crsctl stop cluster -all
$ crsctl start cluster -all
Create Spfile on shared storage :
===============================
SQL> create spfile=’+FRA/spfileRAC.ora from pfile;
Restart the database
[oracle@node1]$ srvctl stop database-d RAC
[oracle@node1]$ srvctl start database -d RAC
[oracle@node1]$ cluvfy comp crs- n all – verbose
Database already created on one node using RMAN backup.
orapwd file and initRAC.ora created,static listener running on node1
From the current instance add redo/undo for thread 2 :
====================================================
SQL> alter database add logfile thread 2 group 3 ('+DATA’,'+FRA’) size 500m reuse;
SQL> alter database add logfile thread 2 group 4 ('+DATA’,'+FRA’) size 500m reuse;
SQL> alter database enable public thread 2;
SQL> create undo tablespace UNDOTBS2 datafile ‘+DATA' size 500M;
Update the initRAC.ora on both nodes :
====================================
*.cluster_database_instances=2
*.cluster_database=true
*.remote_listener='LISTENERS_RAC’
RAC1.instance_name=RAC1
RAC2.instance_name=RAC2
RAC1.instance_number=1
RAC2.instance_number=2
RAC1.thread=1
RAC2.thread=2
RAC1.undo_tablespace='UNDOTBS1'
RAC2.undo_tablespace='UNDOTBS2'
*.control_files='+DATA/RAC/controlfile/current.256.666342941','+FRA/RAC/controlfile/current.256.662312941'
Start First instance from sqlplus :
=================================
[oracle@node1]$ export ORACLE_SID=RAC1
[oracle@node1]$ export ORACLE_HOME=/u01/app/oracle/product/11.2.0.4
[oracle@node1]$ orapwd file= $ORACLE_HOME/dbs/orapwRAC1 password=xxxxxxx
[oracle@node1]$ sqlplus /nolog
SQL*Plus: Release 11.2.0.4.0 - Production on Thu Jan 19 19:01:29 2017
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
SQL> connect /as sysdba
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 541065216 bytes
Fixed Size 2085288 bytes
Variable Size 289410648 bytes
Database Buffers 239075328 bytes
Redo Buffers 10493952 bytes
Database mounted.
Database opened.
SQL> select instance_name from v$instance;
INSTANCE_NAME
----------------
RAC1
Start Second instance from sqlplus :
==================================
[oracle@node2]$ export ORACLE_SID=RAC2
[oracle@node2]$ export ORACLE_HOME=/u01/app/oracle/product/11.2.0.4
[oracle@node2]$ orapwd file= $ORACLE_HOME/dbs/orapwRAC2 password=xxxxxxx
oracle@node2]$ sqlplus /nolog
SQL*Plus: Release 11.2.0.4.0 - Production on Thu Jan 19 19:02:29 2017
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
SYS@RAC1> connect /as sysdba
Connected to an idle instance.
SQL>startup
ORACLE instance started.
Total System Global Area 541065216 bytes
Fixed Size 2085288 bytes
Variable Size 289410648 bytes
Database Buffers 239075328 bytes
Redo Buffers 10493952 bytes
Database mounted.
Database opened.
SQL> select instance_name from v$instance;
INSTANCE_NAME
----------------
RAC2
SQL>
Add to the cluster and Restart :
==============================
SQL> @?/rdbms/admin/catclust.sql
[oracle@node1]$ srvctl add database -d RAC -o /u01/app/oracle/product/11.2.0.4
[oracle@node1]$ srvctl add instance -d RAC -i RAC1 -n node1
[oracle@node1]$ srvctl add instance -d RAC -i RAC2 -n node2
[oracle@node1]$ srvctl stop database -d RAC
[oracle@node1]$ srvctl start database -d RAC
SQL> select * from v$active_instances
$ crsctl status resource –t
$ crsctl stop cluster -all
$ crsctl start cluster -all
Create Spfile on shared storage :
===============================
SQL> create spfile=’+FRA/spfileRAC.ora from pfile;
Restart the database
[oracle@node1]$ srvctl stop database-d RAC
[oracle@node1]$ srvctl start database -d RAC
[oracle@node1]$ cluvfy comp crs- n all – verbose