Chinaunix首页 | 论坛 | 博客
  • 博客访问: 969660
  • 博文数量: 584
  • 博客积分: 2293
  • 博客等级: 大尉
  • 技术积分: 3045
  • 用 户 组: 普通用户
  • 注册时间: 2006-03-28 11:15
文章分类

全部博文(584)

文章存档

2012年(532)

2011年(47)

2009年(5)

我的朋友

分类: Oracle

2012-01-04 13:37:08

Applies to:Oracle Server - Enterprise Edition - Version: 11.2.0.2.0 to 11.2.0.2 - Release: 11.2 to 11.2
Information in this document applies to any platform.
GoalThis is a reference document for RAC One installation and Administration for version 11.2.0.2.


SolutionOracle 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. There are significant changes in the way a RAC One database is administered in version 11.2.0.2 compared to 11.2.0.1.

Major Changes include:

  • OUI has a new option to select RAC One Installation.
  • DBCA is now capable of configuring RAC One database.
  • SRVCTL is capable of configuring and administering RAC One database. (In 11.2.0.1 this was performed using scripts like "Omotion”, “raconestatus” etc).
  • DBUA is RAC One aware.
Creating a new RAC One database in 11.2.0.2 involves the following steps:
  • Install and configure 11.2.0.2 Grid Infrastructure on all the cluster nodes that are part of the RAC One node setup.
  • Install Oracle RDBMS software by selecting RAC One in all the participating nodes.
  • Create a RAC One node database using DBCA.
Administrating a RAC One Database:

1). Verifying an existing RAC One database: 

command: srvctl config database -d

Eg:
[oracle@harac1 bin]$ srvctl config database -d racone
Database unique name: racone
Database name: 
Oracle home: /home/oracle/product/11gR2/11.2.0.2_RACOne
Oracle user: oracle
Spfile: +DG2/RacOne/spfileRacOne.ora
Domain: 
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: racone
Database instances: 
Disk Groups: DG2,DG1
Mount point paths: 
Services: 
Type: RACOneNode <<<<
Online relocation timeout: 30
Instance name prefix: racone
Candidate servers: harac1,harac2,lfmsx3
Database is administrator managed

command: srvctl status database -d
Eg:
[oracle@harac1 bin]$ srvctl status database -d racone
Instance racone_1 is running on node harac1
Online relocation: INACTIVE

2). Performing an online migration:

Command: srvctl relocate database -d {[-n ] [-w ] | -a [-r]} [-v]
-d Unique name of database to relocate
-n Target node to which to relocate database
-w Online relocation timeout in minutes
-a Abort failed online relocation
-r Remove target node of failed online relocation request from the candidate server list of administrator-managed RAC One Node database
-v Verbose output
-h Print usage

Eg:
[oracle@harac2 dbs]$ srvctl relocate database -d racone -n harac1 -w 15 -v
Configuration updated to two instances
Instance racone_1 started
Waiting for 15 minutes for instance racone_2 to stop.....
Instance racone_2 stopped
Configuration updated to one instance


The default timeout is 30 minutes, for the sessions to migrate to the new instance. If a different timeout is preferred, then one can use the -w option.

Status during the relocation:

[oracle@harac2 bin]$ srvctl status database -d racone
Instance racone_1 is running on node harac1
Online relocation: ACTIVE
Source instance: racone_2 on harac2
Destination instance: racone_1 on harac1

Once the migration is completed, we should see the sessions moved to the remote instance.

Eg:
[oracle@harac2 orarootagent]$ srvctl status database -d racone
Instance racone_1 is running on node harac1
Online relocation: INACTIVE

3) Converting a RAC One database to RAC or vice versa

Converting between RAC One and RAC has been simplified with "srvctl convert database" command.

For example:

To convert a database from RAC One to RAC:

Command: srvctl convert database -d -c RAC [-n ]

srvctl convert database -d racone -c RAC -n harac1

Add the instances on other nodes as well:


[oracle@harac2 bin]$ srvctl add instance -d racone -i racone_1 -n harac1
[oracle@harac2 bin]$ srvctl add instance -d racone -i racone_3 -n lfmsx3

[oracle@harac2 bin]$ srvctl config database -d racone
Database unique name: racone
Database name: 
Oracle home: /home/oracle/product/11gR2/11.2.0.2_RACOne
Oracle user: oracle
Spfile: +DG2/RacOne/spfileRacOne.ora
Domain: 
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: racone
Database instances: racone_1,racone_2,racone_3
Disk Groups: DG2,DG1
Mount point paths: 
Services: 
Type: RAC
Database is administrator managed

After starting the database on all the 3 nodes:

[oracle@harac2 bin]$ srvctl status database -d racone
Instance racone_1 is running on node harac1
Instance racone_2 is running on node harac2
Instance racone_3 is running on node lfmsx3

To convert a database from RAC to RACOne:

command: srvctl convert database -d -c RACONENODE -i -w

Eg:  srvctl convert database -d racone -c RACONENODE -w 30 -i racone

[oracle@harac2 bin]$ srvctl config database -d racone
Database unique name: racone
Database name: 
Oracle home: /home/oracle/product/11gR2/11.2.0.2_RACOne
Oracle user: oracle
Spfile: +DG2/RacOne/spfileRacOne.ora
Domain: 
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: racone
Database instances: 
Disk Groups: DG2,DG1
Mount point paths: 
Services: racone_taf
Type: RACOneNode
Online relocation timeout: 30
Instance name prefix: racone
Candidate servers: harac1,harac2,lfmsx3
Database is administrator managed

After starting the database:

[oracle@harac2 bin]$ srvctl status database -d racone
Instance racone_1 is running on node harac1
Online relocation: INACTIVE

Notes: 

1)
Please ensure that at least one service is configured, before running the convert command, otherwise the following error will appear:

[oracle@harac2 oswtop]$ srvctl convert database -d racone -c RACONENODE -w 30 -i racone
PRCD-1242 : Unable to convert RAC database racone to RAC One Node database because the database had no service added.

2)
During the RAC to RACOne conversion, please ensure that the addition instances are removed using DBCA before we run the "srvctl convert database" command.

$ srvctl convert database -d racone -c RACONENODE -w 30 -i racone
PRCD-1214 : Administrator-managed RAC database racone has more than one instance


4) Upgrading a RAC One database from 11.2.0.1 to 11.2.0.2


The steps would include
  • Upgrade Grid Infrastructure to 11.2.0.2 (Only out of place upgrade is possible).
  • Upgrade RAC RDBMS software to 11.2.0.2(an out of place upgrade is recommended).
  • Run DBUA to upgrade the RAC One database to 11.2.0.2. (In a 11.2.0.2 RDBMS HOME , scripts like Omotion , raconestatus are no longer presented, RAC One database administration is performed using srvctl only).

For more details, please refer to Oracle Real Application Clusters Administration and Deployment Guide
11g Release 2 (11.2) 
阅读(1426) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~