一、添加services:


srvctl add service -d woo -s onenode -r "woo1,woo2"
srvctl config service -d woo


二、查看服务状态:


[oracle@ora19crac1 ~]$ srvctl config service -d woo
Service name: onenode
Server pool: 
Cardinality: 2
Service role: PRIMARY
Management policy: AUTOMATIC
DTP transaction: false
AQ HA notifications: false
Global: false
Commit Outcome: false
Failover type: 
Failover method: 
Failover retries: 
Failover delay: 
Failover restore: NONE
Connection Load Balancing Goal: LONG
Runtime Load Balancing Goal: NONE
TAF policy specification: NONE
Edition: 
Pluggable database name: 
Hub service: 
Maximum lag time: ANY
SQL Translation Profile: 
Retention: 86400 seconds
Replay Initiation Time: 300 seconds
Drain timeout: 
Stop option: 
Session State Consistency: DYNAMIC
GSM Flags: 0
Service is enabled
Preferred instances: woo1,woo2
Available instances: 
CSS critical: no


三、查看数据库状态:

[oracle@ora19crac1 ~]$ srvctl status database -d woo
Instance woo1 is running on node ora19crac1
Instance woo2 is running on node ora19crac2


四、停掉并移除一个实例:


[oracle@ora19crac1 ~]$ srvctl stop instance -d woo -i woo2
[oracle@ora19crac1 ~]$ srvctl remove instance -d woo -i woo2
Remove instance from the database woo? (y/[n]) y
[oracle@ora19crac1 ~]$


五、转换为OneNode


[oracle@ora19crac1 ~]$ srvctl convert database -d woo -c raconenode -w 30 -i woo


六、检查数据库角色:


[oracle@ora19crac1 ~]$ srvctl convert database -d woo -c raconenode -w 30 -i woo
[oracle@ora19crac1 ~]$ srvctl config database -d woo
Database unique name: woo
Database name: woo
Oracle home: /u01/app/oracle/product/19.3.0/dbhome_1
Oracle user: oracle
Spfile: +DATA_GP01/WOO/PARAMETERFILE/spfile.272.1034102483
Password file: +DATA_GP01/WOO/PASSWORD/pwdwoo.256.1034100671
Domain: 
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: 
Disk Groups: DATA_GP01
Mount point paths: 
Services: onenode,server_taf
Type: RACOneNode
Online relocation timeout: 30
Instance name prefix: woo
Candidate servers: ora19crac1
OSDBA group: dba
OSOPER group: oper
Database instances: woo_1
CSS critical: no
CPU count: 0
Memory target: 0
Maximum memory: 0
Default network number for database services: 
Database is administrator managed