oracleoracle19coracle-spatial

wk buffer error when running .get_WKT Oracle Spatial function on SDO_GEOMETRY objects


My company runs Oracle 19 and we recently (October 25) installed the October Oracle quarterly patch. Since the patch was applied, I have been unable to run the .Get_WKT function without frequently experiencing the following error

Runtime Exception
ORA-13199: wk buffer merge failure
ORA-06512: at "MDSYS.SDO_UTIL", line 729 
ORA-06512: at "MDSYS.SDO_UTIL", line 768
ORA-06512: at "MDSYS.SDO_GEOMETRY", line 36

The command I ran which generated this error is

select a.sfref, a.geom4326.Get_WKT() from feat_geom a where sfref between 62000 and 63000;

SFREF is a primary key indicator for each geometry.

Prior to the quarterly patch being applied, I would get a list of hundreds of HUGECLOB objects, which I could interrogate individually or through other code, and would link to some of our other business processes. One other anomaly is that the .Get_WKT code sometimes gives HUGECLOBS for a particular geometry, and sometimes it fails, giving the wk buffer error.

What I am looking for in this message please is whether anyone has (i) come across a similar error when dealing with .Get_WKT (ii) whether this error was encountered by people prior to the October 2021 Oracle patch (iii) what resolution you were able to apply to solve the issue?

Thanks

Sean


Solution

  • just for information, my Oracle third party support have been in discussion with Oracle themselves on this and it turns out this issue is a known bug

    Bug 33561708 : ORA-13199: WK BUFFER MERGE FAILURE

    There is a patch for this, which is available from Oracle at https://support.oracle.com/epmos/faces/BugMatrix?id=33561708

    It has been applied to my database instance and resolved my problem.

    Thanks