适用于:
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.
目标:
这是一个在11.2.0.2版本安装和管理RAC One的参考文件
解决方案
RAC One Node(Oracle RAC One Node) 是一个RAC集群数据库运行在一个集群一个节点中的单实例。该选项增加了数据库整合的灵活性。相比于11.2.0.1,11.2.0.2版本中RAC One数据库的管理方式有了重要的改变。
主要的改变包括:
OUI 有了一个新的选项来选择RAC One 安装
DBCA现在有能力来配置RAC One 数据库
SRVCTL可以配置和管理RAC One 数据库.(在11.2.0.1中是通过运行脚本"Omotion”, “raconestatus”等等来完成)
DBUA 是RAC One的aware
在11.2.0.2中创建一个新的RAC One包括以下步骤:
在所有的的集群节点上安装并且配置11.2.0.2网格构架是RAC One安装的一部分。
在所有参与的节点中,选择RAC One安装 Oracle RDBMS 软件
使用DBCA创建RAC One 节点数据库
管理RAC One 数据库
(1) 查验一个存在的RAC One 数据库:
命令:srvctl config database -d <db_name>
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 <db_name>
Eg:
[oracle@harac1 bin]$ srvctl status database -d racone
Instance racone_1 is running on node harac1
Online relocation: INACTIVE
(2)执行一个在线的迁移
Command: srvctl relocate database -d <db_unique_name> {[-n <target>] [-w <timeout>] | -a [-r]} [-v]
-d <db_unique_name> Unique name of database to relocate
-n <target> Target node to which to relocate database
-w <timeout> 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
会话迁移的到新的实例,默认的中止时间是30分钟。如果需要设置一个不同的timeout时间,可以使用-w命令选项。
迁移期间的状态:
[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
一旦迁移完成,我们将看到会话移动到远程实例了。
Eg:
[oracle@harac2 orarootagent]$ srvctl status database -d racone
Instance racone_1 is running on node harac1
Online relocation: INACTIVE
(3)将RAC One数据库转换到RAC或者相反的操作
例子:
将一个数据库从RAC One 转到 RAC
Command: srvctl convert database -d <db_unique_name> -c RAC [-n <node>]
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
将一个数据库从RAC转换到RAC One:
command: srvctl convert database -d <db_unique_name> -c RACONENODE -i <inst prefix> -w <timeout>
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
Note: 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.
(4)将一个RAC One 数据库从11.2.0.1升级到11.2.0.2
这些步骤将包括:
更新网格构架到11.2.0.2(Only out of place upgrade is possible)
更新RAC RDBMS 软件到11.2.0.2(an out of place upgrade is recommended)
执行DBUA升级RAC One数据库到11.2.0.2(在11.2.0.2RDBMS_HOME,类似于Omotion , raconestatus脚本将不在出现,RAC One 数据库管理只是使用srvctl)
获取更多的详细信息,请参阅RAC集群管理和部署指南 11g Release 2 (11.2)
http://download.oracle.com/docs/cd/E11882_01/rac.112/e16795/onenode.htm#RACAD7894
相关信息
产品
Oracle Database Products > Oracle Database > Oracle Database > Oracle Server - Enterprise Edition
关键词
RAC; SRVCTL STATUS; SRVCTL; REAL APPLICATION CLUSTERS; 11GR2