重庆思庄Oracle、Redhat认证学习论坛

标题: oracle 19c 如何把administrator 管理的RAC转换为raconenode [打印本页]

作者: 郑全    时间: 2023-6-20 18:09
标题: oracle 19c 如何把administrator 管理的RAC转换为raconenode
如题,当前为rac,想把它转换为RACONENODE,如何实现?
1.查看当前的类型:
[oracle@rac01 ~]$ srvctl config database -db orcl
Database unique name: orcl
Database name:
Oracle home: /u01/app/oracle/product/19.3.0/db_1
Oracle user: oracle
Spfile: +DATA/ORCL/PARAMETERFILE/spfile.268.1099575253
Password file:
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools:
Disk Groups:
Mount point paths:
Services:
Type: RAC
Start concurrency:
Stop concurrency:
OSDBA group: dba
OSOPER group: oper
Database instances: orcl1,orcl2
Configured nodes: rac01,rac02
CSS critical: no
CPU count: 0
Memory target: 0
Maximum memory: 0
Default network number for database services:
Database is administrator managed


2.转换需要service
[oracle@rac01 ~]$ srvctl convert database -db orcl -dbtype raconenode -instance orcl1
PRCD-1242 : Unable to convert RAC database orcl to RAC One Node database because the database had no service added


3.添加服务
[oracle@rac01 ~]$ srvctl add service -db orcl -service racdb  -preferred orcl1  -available orcl2

[oracle@rac01 ~]$ srvctl status service -db orcl -service racdb
Service racdb is not running.


4.管理员模式只能有一个实例

[oracle@rac01 ~]$ srvctl convert database -db orcl -dbtype raconenode -instance orcl1
PRCD-1214 : Administrator-managed RAC database orcl has more than one instance

5.保留一个实例
[oracle@rac01 ~]$ srvctl remove instance -db orcl -instance orcl2
Remove instance from the database orcl? (y/[n]) y


6.成功转换
[oracle@rac01 ~]$ srvctl convert database -db orcl -dbtype raconenode -instance orcl1

7.验证
  [oracle@rac01 ~]$ srvctl config database -d orcl
Database unique name: orcl
Database name:
Oracle home: /u01/app/oracle/product/19.3.0/db_1
Oracle user: oracle
Spfile: +DATA/ORCL/PARAMETERFILE/spfile.268.1099575253
Password file:
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools:
Disk Groups:
Mount point paths:
Services: racdb
Type: RACOneNode
Online relocation timeout: 30
Instance name prefix: orcl1
Candidate servers: rac01
OSDBA group: dba
OSOPER group: oper
Database instances: orcl1_1
CSS critical: no
CPU count: 0
Memory target: 0
Maximum memory: 0
Default network number for database services:
Database is administrator managed











作者: 郑全    时间: 2023-6-20 18:15
要从raconenode转换回RAC

[oracle@rac01 ~]$ srvctl convert database -db orcl -dbtype rac

[oracle@rac01 ~]$ srvctl config database -d orcl
Database unique name: orcl
Database name:
Oracle home: /u01/app/oracle/product/19.3.0/db_1
Oracle user: oracle
Spfile: +DATA/ORCL/PARAMETERFILE/spfile.268.1099575253
Password file:
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools:
Disk Groups:
Mount point paths:
Services: racdb
Type: RAC
Start concurrency:
Stop concurrency:
OSDBA group: dba
OSOPER group: oper
Database instances: orcl1_1
Configured nodes: rac01
CSS critical: no
CPU count: 0
Memory target: 0
Maximum memory: 0
Default network number for database services:
Database is administrator managed
[oracle@rac01 ~]$


[oracle@rac01 ~]$ srvctl add instance -db orcl -instance orcl2 -node rac02

[oracle@rac01 ~]$ srvctl STATUS database -d orcl
Instance orcl1_1 is not running on node rac01
Instance orcl2 is not running on node rac02










欢迎光临 重庆思庄Oracle、Redhat认证学习论坛 (http://bbs.cqsztech.com/) Powered by Discuz! X3.2