将 Administrator-Managed 数据库转换为Policy-Managed 数据库

1 实验

1.1 查看数据库配置信息

[[email protected]~]$ srvctl config database -db cndba
Database unique name: cndba
Database name: cndba
Oracle home: /u01/app/oracle/12.2.0/db_1
Oracle user: oracle
Spfile: +DATA/CNDBA/PARAMETERFILE/spfile.276.951664119
Password file: +DATA/CNDBA/PASSWORD/pwdcndba.256.951662701
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools:
Disk Groups: DATA
Mount point paths:
Services:
Type: RAC
Start concurrency:
Stop concurrency:
OSDBA group: dba
OSOPER group: oper
Database instances: cndba1,cndba2
Configured nodes: rac1,rac2
Database is administrator managed
[[email protected]~]$ srvctl config service -db cndba
[[email protected]~]$

1.2 创建server pool用于policy-managed database

[[email protected]~]$ srvctl add srvpool -serverpool cndba_pool -min 0 -max 2

1.3 关闭数据库

[[email protected]~]$ srvctl stop database -db cndba

1.4 修改数据库到新的server pool中

Root用户执行

[[email protected]~]# /u01/app/12.2.0/grid/bin/srvctl modify database -db cndba -serverpool cndba_pool

1.5 再查看数据库配置

[[email protected]~]$ srvctl config database -db cndba
Database unique name: cndba
Database name: cndba
Oracle home: /u01/app/oracle/12.2.0/db_1
Oracle user: oracle
Spfile: +DATA/CNDBA/PARAMETERFILE/spfile.276.951664119
Password file: +DATA/CNDBA/PASSWORD/pwdcndba.256.951662701
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: cndba_pool
Disk Groups: DATA
Mount point paths:
Services:
Type: RAC
Start concurrency:
Stop concurrency:
OSDBA group: dba
OSOPER group: oper
Database instances:
Configured nodes:
Database is policy managed

至此就转换完成了

你可能感兴趣的:(Oracle,12c)