Monday, January 24, 2011

Test - RAC One Node Database

Just curious about RAC One Node - I think I should test it and this is first time to test it (version 11.2.0.2).
Oracle Real Application Clusters One Node
(Oracle RAC One Node) is a single instance of an Oracle Real Application Clusters (Oracle RAC) database that runs on one node in a cluster. This option adds to the flexibility that Oracle offers for database consolidation.After I created Database.
$ srvctl config database -d orcl
Database unique name: orcl
Database name: orcl
Oracle home: /u01/app/oracle/product/11.2.0/dbhome_1
Oracle user: oracle
Spfile: +DATA/orcl/spfileorcl.ora
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: orcl
Database instances:
Disk Groups: DATA
Mount point paths:
Services: rac_service
Type: RACOneNode
Online relocation timeout: 30
Instance name prefix: orcl
Candidate servers: node01,node02
Database is administrator managed

$ srvctl status database -d orcl
Instance orcl_1 is running on node node01
Online relocation: INACTIVE
Test to Relocate:
$ srvctl status database -d orcl
Instance orcl_1 is running on node node01
Online relocation: INACTIVE

$ crsctl status res -t
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.orcl.db
1 ONLINE ONLINE node01 Open
ora.orcl.rac_service.svc
1 ONLINE ONLINE node01

$ srvctl relocate database -d orcl -n node02

-- during time "relocate" --
$ srvctl status database -d orcl
Instance orcl_1 is running on node node01
Online relocation: ACTIVE
Source instance: orcl_1 on node01
Destination instance: orcl_2 on node02

-- after relocated --
$ srvctl status database -d orcl
Instance orcl_2 is running on node node02
Online relocation: INACTIVE

$ crsctl status res -t
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.orcl.db
2 ONLINE ONLINE node02 Open
ora.orcl.rac_service.svc
1 ONLINE ONLINE node02
Test to Convert RAC One Node to RAC:
$ srvctl config database -d orcl
Database unique name: orcl
Database name: orcl
Oracle home: /u01/app/oracle/product/11.2.0/dbhome_1
Oracle user: oracle
Spfile: +DATA/orcl/spfileorcl.ora
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: orcl
Database instances:
Disk Groups: DATA
Mount point paths:
Services: rac_service
Type: RACOneNode
Online relocation timeout: 30
Instance name prefix: orcl
Candidate servers: node01,node02
Database is administrator managed

$ srvctl convert database -d orcl -c RAC

$ srvctl config database -d orcl
Database unique name: orcl
Database name: orcl
Oracle home: /u01/app/oracle/product/11.2.0/dbhome_1
Oracle user: oracle
Spfile: +DATA/orcl/spfileorcl.ora
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: orcl
Database instances: orcl_1
Disk Groups: DATA
Mount point paths:
Services: rac_service
Type: RAC
Database is administrator managed
This RAC has one instance - orcl_1

Test to Convert RAC to RAC One Node:
$ srvctl config database -d orcl
Database unique name: orcl
Database name: orcl
Oracle home: /u01/app/oracle/product/11.2.0/dbhome_1
Oracle user: oracle
Spfile: +DATA/orcl/spfileorcl.ora
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: orcl
Database instances: orcl_1
Disk Groups: DATA
Mount point paths:
Services: rac_service
Type: RAC
Database is administrator managed

$ srvctl convert database -d orcl -c RACONENODE -i orcl_1

$ srvctl config database -d orcl
Database unique name: orcl
Database name: orcl
Oracle home: /u01/app/oracle/product/11.2.0/dbhome_1
Oracle user: oracle
Spfile: +DATA/orcl/spfileorcl.ora
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: orcl
Database instances:
Disk Groups: DATA
Mount point paths:
Services: rac_service
Type: RACOneNode
Online relocation timeout: 30
Instance name prefix: orcl
Candidate servers: node01
Database is administrator managed
Perhaps I did something wrong "Candidate servers: node01", So
$ srvctl relocate database -d orcl -n node02

$ srvctl config database -d orcl
Database unique name: orcl
Database name: orcl
Oracle home: /u01/app/oracle/product/11.2.0/dbhome_1
Oracle user: oracle
Spfile: +DATA/orcl/spfileorcl.ora
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: orcl
Database instances:
Disk Groups: DATA
Mount point paths:
Services: rac_service
Type: RACOneNode
Online relocation timeout: 30
Instance name prefix: orcl
Candidate servers: node01,node02
Database is administrator managed
"Candidate servers: node01,node02" - OK
Note:
$ srvctl -h | grep convert
Usage: srvctl convert database -d <db_unique_name> -c RAC [-n <node>]
Usage: srvctl convert database -d <db_unique_name> -c RACONENODE [-i <instname>] [-w <timeout>]

3 comments:

john said...

Hi, I have an exam question, still unsure about the answer.
Appreciate if you help


Your production envrionment cluster is running Oracle Enterprise Linux and currently has four nodes.
You are asked to plan for extending the cluster to six nodes. Which three methods are availavle to add the new nodes ?

a-)silent clonening using crsctl clone cluster and ssh
b-)a GUI interface from Enterprise Manager
c-)with the Oracle Universal Installer using runInstaller -clone
d-)silent cloning using perl clone.pl -silent either with parameter in a file or in line
e-)using AddNode.sh

Surachart said...

Not sure
Please check.

e-)using AddNode.sh
http://download.oracle.com/docs/cd/E11882_01/rac.112/e16794/adddelclusterware.htm#CHDJFEEA

b-)a GUI interface from Enterprise Manager

EM should help to add node.
http://docs.oracle.com/cd/B28359_01/rac.111/b28252/addnodes3.htm#CHDFBGFJ


d-)silent cloning using perl clone.pl -silent either with parameter in a file or in line

http://download.oracle.com/docs/cd/E11882_01/rac.112/e16794/clonecluster.htm#CWADD92137

Anonymous said...

Thanks Surachart.
Appreciate your help.
I know that e and d are correct.
However not sure whether c or b ?

Cant I do it with the Oracle Universal Installer using runInstaller -clone ?