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

标题: ORACLE 19C RAC如何把POLICY 管理 调整到 administrator 管理 [打印本页]

作者: 郑全    时间: 2023-6-20 17:41
标题: ORACLE 19C RAC如何把POLICY 管理 调整到 administrator 管理
目前没有直接调整的办法,但可以通过从集群中把数据库剔除,再加入的方式,实现管理方式的转换。

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


2.停止数据库
[oracle@rac01 ~]$ srvctl  stop database -db orcl
[oracle@rac01 ~]$
[oracle@rac01 ~]$
[oracle@rac01 ~]$ srvctl  status database -db orcl
Instance orcl_1 is not running on node rac02
Instance orcl_2 is not running on node rac01


3.剔除数据库
[oracle@rac01 ~]$ srvctl  remove database -db orcl
Remove the database orcl? (y/[n]) y


[oracle@rac01 ~]$ srvctl  status database -db orcl
PRCD-1120 : The resource for database orcl could not be found.
PRCR-1001 : Resource ora.orcl.db does not exist


4.添加到集群
[oracle@rac01 ~]$ srvctl add database -db orcl -oraclehome /u01/app/oracle/product/19.3.0/db_1 -spfile +DATA/ORCL/PARAMETERFILE/spfile.268.1099575253


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



[oracle@rac01 ~]$ srvctl  status database -db orcl
Instance orcl1 is not running on node rac01
Instance orcl2 is not running on node rac02


5.确认已经调整为POLICY 管理
[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
[oracle@rac01 ~]$











作者: 郑全    时间: 2023-6-20 18:56
如果把administrator转换为policy 呢?

执行一下命令即可
$ srvctl modify database -d db_name -g pool名字

具体如下:
$ srvctl modify database -d orcl -g racdbpool






作者: 郑全    时间: 2023-6-20 18:59
如果没有服务池,可以创建

srvctl add srvpool  -g racdbpool -n "rac01,rac02"

查看服务池情况:
srvctl config srvpool





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