












![]()
In this Document
| Symptoms |
| Changes |
| Cause |
| Solution |
| References |
Following query over dblink having Local database 9iR2 and remote 10gR2 works..
select *
from ctps3.institutions@ctps3 i,
ctps3.state_types@ctps3 s,ods.institutions oi
where s.stt_state_type_id (+) = i.stt_state_type_id
and oi.ctps_insttn_id = i.inst_insttn_id
and i.inst_modifd_dt = trunc(sysdate)
and (nvl (oi.inst_state_txt, 'x') <> nvl (s.stt_state_type_nm, 'x'))
and (nvl (oi.inst_phone_txt, 17) <> nvl (i.inst_phone_txt, 17));
The same query fails when both local and remote databases are 10g R2, with following errors:
ERROR at line 2:
ORA-00904: "OI"."INST_STATE_TXT": invalid identifier
ORA-02063: preceding line from CTPS3
Outer join query over dblink can fail with ORA-904, as referenced in:
BUG 6620988 QUERY OVER DBLINK FAILS WITH ORA-904 SELECTING DATE
Predicates are not checked to verify if they belong to same network node when we attempt to colocate the remote tables. This results in wrongly generating remote query and ORA-904
REDISCOVERY INFORMATION:
1. ORA-904
2. DB link
3. OJ predicates across network nodes
4. predicates wrongly pushed network nodes
-- To implement the solution, please execute the following steps::
Use the workaround of disabling colocated joins via event 10176 and force a hard parse to happen
(ie by flushing the shared pool), ie:
SQL> alter session set events '10176 trace name context forever';
SQL> alter system flush shared_pool;
or
For a permanent fix, request a One-Off Backport of 6620988 for the appropiate platform.
欢迎转载,但请注明出处!
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。