时间:2021-07-01 10:21:17 帮助过:38人阅读
看到有人问如何区分RAC 创建后是Admin managed 还是Policy managed 。11g RAC 首先默认有一个Server Pool,如果你不用自定义设置
看到有人问如何区分RAC 创建后是Admin managed 还是Policy managed 。
首先要看定义:
Administrator-managed: Database administrators define the servers on which databases resource run, and place resources manually as needed. This is the management strategy used in previous releases.
Policy managed: Database administrators specify in which server pool (excluding generic or free) the database resource will run. Oracle Clusterware is responsible for placing the database resource on a server.
()
就是说11g RAC 首先默认有一个Server Pool,,如果你不用自定义设置。RAC 的所有Service 都会按照默认的策略管理,这种管理就叫 Admin managed。
如果你需要对有些服务做定制,或按自己的商业逻辑进行配置,那首先你要自定义一个server pool 然后修改数据库配置信息就可以了。
--------------------------------------分割线 --------------------------------------
在CentOS 6.4下安装Oracle 11gR2(x64)
Oracle 11gR2 在VMWare虚拟机中安装步骤
Debian 下 安装 Oracle 11g XE R2
Oracle Linux 6.3 安装Oracle 11g R2 笔记
--------------------------------------分割线 --------------------------------------
如何检查是否Admin managed:
[grid@rac1 bin]$ $GRID_HOME/bin/srvctl config database -d mydb
Database unique name: mydb
Database name: mydb
Oracle home: /opt/app/oracle/product/11.2.0/dbhome_1
Oracle user: oracle
Spfile: +DATA/mydb/spfilemydb.ora
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: mydb
Database instances: mydb1
Disk Groups: DATA
Services: Database is administrator managed
这就说明是以Admin Managed 来管理RAC。
如果要修改Admin Managed 的话,首先需要加一个service 到RAC,语法如下:
srvctl add service -d
-r "
-g
[-k
[-l [PRIMARY][,PHYSICAL_STANDBY][,LOGICAL_STANDBY][,SNAPSHOT_STANDBY]]
[-y {AUTOMATIC | MANUAL}]
[-q {TRUE|FALSE}]
[-x {TRUE|FALSE}]
[-j {SHORT|LONG}]
[-B {NONE|SERVICE_TIME|THROUGHPUT}]
[-e {NONE|SESSION|SELECT}]
[-m {NONE|BASIC}]
[-z
[-w
这些选项不一定都用,但要大体了解。基本上只管理数据库选项 一般用 -l,-u. 如果用TAF 的话需要用-c,-e,-s,-m,-w 等。
下面用一个例子来说明如何加一个Service
[grid@rac1 bin]$ $GRID_HOME/bin/srvctl add serverpool -g mypool -l 2 -u 2
将数据库加入到自定义的Server Pool 里面:
[grid@rac1 bin]$ $GRID_HOME/bin/srvctl modify database -d mydb -g mypool
检查mydb RAC 新的Policy
[grid@rac1 bin]$ $GRID_HOME/bin/srvctl config database -d mydb
Database unique name: mydb
Database name: mydb
Oracle home: /opt/app/oracle/product/11.2.0/dbhome_1
Oracle user: oracle
Spfile: +DATA/mydb/spfilemydb.ora
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: mypool
Database instances:
Disk Groups: DATA
Services: Database is policy managed
数据库已经使用Policy Managed 选项了。
特别提醒:
如果没有特别强烈需要就不用自定义加 Policy Managed ,Admin Managed 能兼容11g RAC 和之前的版本,更通用。
本文永久更新链接地址: