Converting a Single Instance Database to RAC One Node using DBCA
RAC One
only one cluster node. It only ever runs on one node, but that node can
change. It is strongly recommended to create a service for that RAC database.
Utilities such as raconeinit provide a text based command line interface to
transform that database to a “RAC One Node”-instance. In the process, the
administrator can elect which nodes should be allowed to run the instance. The
“omotion” utilities allowed the DBA to move the RAC One Node instance from the
current node to another one. Optionally a time threshold could be set after
which all ongoing transactions were to move to the new node. This feature
required TAF or FAN to be set up correctly. The raconestatus utility allowed
you to view the status of your RAC One Node instances. Conversion to full RAC was made
possible by the racone2rac utility.
The srvctl command line tool has been improved to deal with the RAC One
node. The most important operations are to add, remove, config and status. The
nice thing about dbca is that it actually registers the database in the OCR.
Converting a Single Instance Database to RAC One Node using DBCA
$ srvctl config database -d orcl
Database unique name: orcl
Database name: orcl
Oracle home: /u01/app/oracle/product/11.2.3/db_2
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 instance: orcl
Disk Groups: DATA
Mount point paths:
Services:
Type: SINGLE
Database is administrator managed
$ srvctl config database -d test
Database unique name: test
Database name: test
Oracle home: /u01/app/oracle/product/11.2.3/db_2
Oracle user: oracle
Spfile: +DATA/test/spfiletest.ora
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: test
Database instances:
Disk Groups: DATA
Mount point paths:
Services: testhr
Type: RACOneNode
Online relocation timeout: 30
Instance name prefix: test
Candidate servers: rac1,rac2
Database is administrator managed
$ srvctl status database -d test
Instance test_1 is running on node rac1
Online relocation: INACTIVE
On Node 1
$ vi /etc/oratab
[oracle@rac1 ~]$ . oraenv
ORACLE_SID = [test1] ? test_1
The Oracle base remains unchanged with value /u01/app/oracle
$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Sat Jan 4 14:21:13 2014
Copyright (c) 1982, 2013, Oracle.
All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - Production
With the Partitioning, Real Application Clusters, Automatic Storage
Management, OLAP,
Data Mining and Real Application Testing options
SQL> create table test as select * from dba_users;
Table created.
SQL> insert into test select * from dba_users;
30 rows created.
Donot Commit
Relocate the Instance to Node 2
$ srvctl relocate database -d test -n rac2
Unless you commit it will keep on waiting for relocation to complete
$ srvctl config database -d test
Database unique name: test
Database name: test
Oracle home: /u01/app/oracle/product/11.2.3/db_2
Oracle user: oracle
Spfile: +DATA/test/spfiletest.ora
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: test
Database instances:
Disk Groups: DATA
Mount point paths:
Services: testhr
Type: RACOneNode
Online relocation timeout: 30
Instance name prefix: test
Candidate servers: rac1,rac2
Database is administrator managed
On Node 2
$ ps -ef|grep smon
oracle 5816 1 0
10:24 ? 00:00:00 asm_smon_+ASM2
oracle 9647 1 0
14:23 ? 00:00:00 ora_smon_test_2
oracle 10043 16900 0 14:26 pts/1 00:00:00 grep smon
$ vi /etc/oratab
[oracle@rac2 ~]$ . oraenv
ORACLE_SID = [rac2] ? test_2
The Oracle base remains unchanged with value /u01/app/oracle
[oracle@rac2 ~]$ sqlplus / as sysdba
SQL> select tablespace_name from dba_data_files where
tablespace_name like '%UNDO%';
TABLESPACE_NAME
------------------------------
UNDOTBS1
UNDOTBS2
Note: If we are connected to Service with RACONENODE and TAF enabled
the connection will failover.
To convert RacOneNode to Ful RAC
$ srvctl convert database -d test -c RAC
$ srvctl add instance -d test -i test_1 -n rac1
$ srvctl start database -d test
$ srvctl config database -d test
Database unique name: test
Database name: test
Oracle home: /u01/app/oracle/product/11.2.3/db_2
Oracle user: oracle
Spfile: +DATA/test/spfiletest.ora
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: test
Database instances: test_1,test_2
Disk Groups: DATA
Mount point paths:
Services: testhr
Type: RAC
Database is administrator managed
Thanks (Comments Please)
Hi
ReplyDeleteThe images/screen shots are not visible.Could you please re-upload..
Thanks a ton!