ORA-12850: Could not allocate slaves on all specified instances

当Oracle 19.10 RAC数据库遇到查询错误ORA-12850时,可能由于执行计划差异或资源分配问题导致。重启集群数据库可以暂时解决问题。诊断方法包括检查与gv$视图相关的跟踪文件,启用特定的会话跟踪,并通过DBMS_SHARED_POOL清除库缓存。已知问题可在文档1345758.1中查找。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

oracle 19.10 rac本来好好的,突然查询报错。网上类似报错各种修改参数,别这样乱动。

重启下集群数据库就好了。

srvctl stop database -d xxx

srvctl start database -d xxx

 

更多参考:

How To Diagnose ORA-12850 Could Not Allocate Slaves On All Specified Instances (Doc ID 1350377.1)

Concepts/Definitions

The error ORA-12850 is raised by the Query Coordinator for a parallel query against a gv$ view. For a query against a gv$ view results in slaves spawned on every node.

See Note:734139.1 What are gv$ views?

In case that the Query Coordinator can not allocate slaves on every node a ORA-12850 is thrown. In some cases the root cause is a execution plan difference between the slaves and the Query Coordinator. 

How to diagnose

You see the ORA-12850 only on RAC systems. In most cases a ORA-12850 there are traces files written to the trace folders. Queries against gv$ views are using slaves allocated from the high end, that means they start with slaves PZ99 and go down ( PZ98,PZ97,.. ) . So look for traces with the pattern ..pz99..trc created/updated at the time the ORA-12850 occur. 

In case the ORA-12850 is reproducible in SQL Plus it can help for Oracle Support if you reproduce the problem with the following tracing on, and collect the generated trace files:

alter session set tracefile_identifier='PX_traces_12850';
alter session set "_px_compilation_debug" = 1;
alter session set events '12850 trace name errorstack level 1';
alter session set events '10053 trace name context forever, level 1';
alter session set "_px_trace" = all;
<run the failing query>
alter session set "_px_compilation_debug" = 0;
alter session set events '10053 trace name context off';
alter session set events '12850 trace name errorstack off';
alter session set "_px_trace" = none


In case you know the SQL that caused the ORA-12850, experienced DBAs/developers can purge the SQL from the library cache on all nodes and try to execute the SQL again. 
For more information about purge please readNote:457309.1 How To Flush an Object Out The Library Cache [SGA] Using The DBMS_SHARED_POOL Package

 

Known issues

You can find list of known issues inNote:1345758.1 OERR: ORA-12850 Could not allocate slaves on all specified instances

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值