ORA-00942 Sem_apis.Remove_duplicates Does Not Work For Version Enabled Tables (Doc ID 1386611.1)

Last updated on FEBRUARY 08, 2017

Applies to:

Oracle Spatial - Version: 11.2.0.2 and later   [Release: 11.2 and later ]
Information in this document applies to any platform.

Symptoms

exec sem_apis.remove_duplicates generates error ORA-942 Table or view does not exist when used in a model that has been version enabled

conn scott/tiger
EXEC SEM_APIS.DROP_SEM_MODEL('family');
drop table FAMILY_RDF_DATA;
purge recyclebin;


CREATE TABLE family_rdf_data (id NUMBER, triple SDO_RDF_TRIPLE_S);
ALTER TABLE family_rdf_data ADD CONSTRAINT family_rdf_data_pk PRIMARY KEY (id);
GRANT SELECT ON family_rdf_data TO mdsys;

-- Create the model.
BEGIN
sem_apis.create_rdf_model(MODEL_NAME => 'family'
, TABLE_NAME => 'FAMILY_RDF_DATA'
, COLUMN_NAME=> 'triple');
END;
/

exec dbms_wm.enableVersioning (table_name => 'FAMILY_RDF_DATA');
exec DBMS_WM.createworkspace('STAGING1');
exec DBMS_WM.gotoworkspace('STAGING1');

INSERT INTO family_rdf_data VALUES (1, SDO_RDF_TRIPLE_S('family'
,'http://www.example.org/family/John'
,'http://www.example.org/family/fatherOf'
,'http://www.example.org/family/Suzie')
);

INSERT INTO family_rdf_data VALUES (-1, SDO_RDF_TRIPLE_S('family'
,'http://www.example.org/family/John'
,'http://www.example.org/family/fatherOf'
,'http://www.example.org/family/Suzie')
);

COMMIT;

alter session set events '942 trace name ERRORSTACK level 3';
exec sem_apis.remove_duplicates(MODEL_NAME=> 'family',THRESHOLD=>0.01);

/*
*
ERROR at line 1:
ORA-00942: table or view does not exist
ORA-06512: at "MDSYS.SDO_RDF", line 2642
ORA-06512: at "MDSYS.RDF_APIS", line 1280
ORA-06512: at line 1
*/



Trace file shows:

----- Error Stack Dump -----
ORA-00942: table or view does not exist
----- Current SQL Statement for this session (sql_id=6drx48wbfs5k1) -----
ALTER TABLE "SCOTT"."FAMILY_RDF_DATA" DISABLE ALL TRIGGERS

When using Workspace Manager the main table becomes a view and the table is with suffix _LT

select object_name, object_type from all_objects where object_name like 'FAMILY_RDF_DATA%' and owner='SCOTT';

OBJECT_NAME OBJECT_TYPE
------------------------------ -------------------
FAMILY_RDF_DATA VIEW
...
FAMILY_RDF_DATA_LT TABLE

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms