温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

12c如何在集群操作rac与rac one node互相转换

发布时间:2021-11-29 10:01:19 来源:亿速云 阅读:377 作者:柒染 栏目:关系型数据库

今天就跟大家聊聊有关12c如何在集群操作rac与rac one node互相转换,可能很多人都不太了解,为了让大家更加了解,小编给大家总结了以下内容,希望大家根据这篇文章可以有所收获。

-- 首先在集群里停掉2号节点的实例
[oracle@host01 app]$ srvctl stop instance -d racdb -i racdb_2

--查看rac的类型,目前显示为(Type: RAC)
[oracle@host01 app]$ srvctl config database -d racdb
Database unique name: racdb
Database name: racdb
Oracle home: /u01/app/oracle/product/12.1.0/db_1
Oracle user: oracle
Spfile: +DATA/RACDB/PARAMETERFILE/spfile.288.960026421
Password file: +DATA/RACDB/PASSWORD/pwdracdb.276.960026013
Domain: 
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: racdbpool
Disk Groups: FRA,DATA
Mount point paths: 
Services: RACDBACN
Type: RAC
Start concurrency: 
Stop concurrency: 
OSDBA group: dba
OSOPER group: oper
Database instances: 
Configured nodes: 
Database is policy managed


-- 转换成rac one node类型
[oracle@host01 app]$ srvctl convert database -d racdb -c RACONENODE


-- 再查看rac的类型,此时显示(Type: RACOneNode)
[oracle@host01 app]$ srvctl config database -d racdb
Database unique name: racdb
Database name: racdb
Oracle home: /u01/app/oracle/product/12.1.0/db_1
Oracle user: oracle
Spfile: +DATA/RACDB/PARAMETERFILE/spfile.288.960026421
Password file: +DATA/RACDB/PASSWORD/pwdracdb.276.960026013
Domain: 
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: racdbpool
Disk Groups: FRA,DATA
Mount point paths: 
Services: RACDBACN
Type: RACOneNode
Online relocation timeout: 30
Instance name prefix: racdb
Candidate servers: 
OSDBA group: dba
OSOPER group: oper
Database instances: 
Database is policy managed


-- 尝试再重新转换回rac类型
[oracle@host01 app]$ srvctl convert database -d racdb -c RAC


-- 查看rac的类型,已经变成rac了,而且在两个节点上的实例也被起来了
[oracle@host01 app]$ srvctl config database -d racdb
Database unique name: racdb
Database name: racdb
Oracle home: /u01/app/oracle/product/12.1.0/db_1
Oracle user: oracle
Spfile: +DATA/RACDB/PARAMETERFILE/spfile.288.960026421
Password file: +DATA/RACDB/PASSWORD/pwdracdb.276.960026013
Domain: 
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: racdbpool
Disk Groups: FRA,DATA
Mount point paths: 
Services: RACDBACN
Type: RAC
Start concurrency: 
Stop concurrency: 
OSDBA group: dba
OSOPER group: oper
Database instances: 
Configured nodes: 
Database is policy managed


-- 再重新转换回rac one node
[oracle@host01 app]$ srvctl convert database -d racdb -c RACONENODE
PRCD-1154 : Failed to convert the configuration of cluster database racdb into its equivalent RAC One Node database configuration because cluster database is running on more than one server [host02, host01]


-- 提示有两个节点在跑,关掉2号节点
[oracle@host01 app]$ srvctl stop instance -d racdb -i racdb_2
PRCD-1315 : failed to stop instances for database racdb
PRCR-1014 : Failed to stop resource ora.racdb.db
PRCR-1065 : Failed to stop resource ora.racdb.db
CRS-2529: Unable to act on 'ora.racdb.db' because that would require stopping or relocating 'ora.racdb.racserv.svc', but the force option was not specified


-- 提示要先关掉racserv这个service才能关闭2号节点实例
[oracle@host01 app]$ srvctl stop service -d RACDB -s racserv


-- 再次关闭实例
[oracle@host01 app]$ srvctl stop instance -d racdb -i racdb_2


-- 转换rac至rac one node
[oracle@host01 app]$ srvctl convert database -d racdb -c RACONENODE


-- 查状态,转换成功
[oracle@host01 app]$ srvctl config database -d racdb
Database unique name: racdb
Database name: racdb
Oracle home: /u01/app/oracle/product/12.1.0/db_1
Oracle user: oracle
Spfile: +DATA/RACDB/PARAMETERFILE/spfile.288.960026421
Password file: +DATA/RACDB/PASSWORD/pwdracdb.276.960026013
Domain: 
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: racdbpool
Disk Groups: FRA,DATA
Mount point paths: 
Services: RACDBACN
Type: RACOneNode
Online relocation timeout: 30
Instance name prefix: racdb
Candidate servers: 
OSDBA group: dba
OSOPER group: oper
Database instances: 
Database is policy managed

看完上述内容,你们对12c如何在集群操作rac与rac one node互相转换有进一步的了解吗?如果还想了解更多知识或者相关内容,请关注亿速云行业资讯频道,感谢大家的支持。

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI