oracle多个instance,Oracle中的INSTANCE_GROUPS和PARALLEL_INSTANCE_GROUP

In

10g, parallel execution in RAC instances is controlled with two

initialization parameters: INSTANCE_GROUPS and PARALLEL_INSTANCE_GROUP.

Both must be used together in 10g.

INSTANCE_GROUPS can have multiple values but it is static;

PARALLEL_INSTANCE_GROUP can be modified dynamically at the system level

and can also be set at the session level.

In 10g, in order for parallel execution to occur in a session where you

have PARALLEL_INSTANCE_GROUP set, the value for PARALLEL_INSTANCE_GROUP

has to be found in the list of groups specified by INSTANCE_GROUPS for

that instance.

For example, a 3-node RAC in 10gR2 might have the following settings in the spfile:

MYRAC1.instance_groups='MYRAC','MYRAC1'

MYRAC2.instance_groups='MYRAC','MYRAC2'

MYRAC3.instance_groups='MYRAC','MYRAC3'

MYRAC1.parallel_instance_group='MYRAC1' # executions started on node 1 runs only on node 1

MYRAC2.parallel_instance_group='MYRAC2' # executions started on node 2 runs only on node 2

MYRAC3.parallel_instance_group='MYRAC3' # executions started on node 3 runs only on node 3

These settings mean that executions starting on any node will only run on that node.

Here is another way to use the same instance groups to achieve different results:

MYRAC1.instance_groups='MYRAC','MYRAC1'

MYRAC2.instance_groups='MYRAC','MYRAC2'

MYRAC3.instance_groups='MYRAC','MYRAC3'

MYRAC1.parallel_instance_group='MYRAC1' # executions started on node 1 runs only on node 1

MYRAC2.parallel_instance_group='MYRAC1' # execution started on node 2 runs only on node 1

MYRAC3.parallel_instance_group='MYRAC' # execution started on node 3 runs on all nodes

You can also set parallel_instance_group dynamically in the session.

For example, suppose that you connected to MYRAC1, and the spfile has the first set of settings above:

MYRAC1.instance_groups='MYRAC','MYRAC1'

MYRAC2.instance_groups='MYRAC','MYRAC2'

MYRAC3.instance_groups='MYRAC','MYRAC3'

MYRAC1.parallel_instance_group='MYRAC1' # executions started on node 1 runs only on node 1

MYRAC2.parallel_instance_group='MYRAC2' # executions started on node 2 runs only on node 2

MYRAC3.parallel_instance_group='MYRAC3' # executions started on node 3 runs only on node 3

You can set parallel_instance_groups dynamically in your session:

alter session set parallel_instance_group='MYRAC';

Now, queries started in your session will run on all 3 of the nodes.

摘自Oracle的metalinkRAC: How to control parallel execution across instances in 10g? [ID 1260674.1]

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值