HC:SDO_relate Function Fails With Database Link - ORA-14551: Cannot perform DML operation within a query
(Doc ID 2823259.1)
Last updated on JANUARY 28, 2022
Applies to:
Oracle Database - Enterprise Edition - Version 19.7.0.0.0 and laterInformation in this document applies to any platform.
Symptoms
In a given test package a Test2 fails, because the sdo_relate function returns nothing found. There is an identical Test1 which contains a dummy select, thus sdo_relate works fine.
In the debug window we get for the sdo_relate function, now following errorcode (the sdo_geom.relate function works):
--------------------------------------------------------
ORA-29902: Error while executing routine ODCIIndexStart ()
ORA-13200: Internal error [ODCIIndexStart] during spatial indexing.
ORA-13249: INSERT INTO "MDSYS". "SDO_DIST_METADATA_TABLE" VALUES (: sdo_index_owner,: sdo_index_name,: sdo_partition_name,: txnid,: sdo_tsname,: sdo_table_name,: is_geodetic, . del_bb_start4,: del_bb_end4,: ins_no,: del_no)
ORA-29400: Data Cartridge Error
ORA-14551: Cannot perform DML operation within a query
ORA-06512: in "MDSYS.SDO_INDEX_METHOD_10I", line 591
ORA-06512: in "HR.TEST_PACKAGE", line 88
ORA-06512: in line 2
--------------------------------------------------------
The dummy select that acts as a workaround for Test1:
declare
t_dummyCount integer;
begin
select 1
into t_dummyCount
from dual@SECONDDB;
end;
----
The slower function sdo_geom.relate returns for both tests the correct result.
Changes
Cause
To view full details, sign in with your My Oracle Support account. |
|
Don't have a My Oracle Support account? Click to get started! |
In this Document
Symptoms |
Changes |
Cause |
Solution |
References |