This content has been marked as final. Show 3 replies
The only way I can see to get this cross-schema validation to work is via a view.
Here is my use case.
This worked for me (all points passed validation). If it works for you, and you believe your question is answered please award points.
DROP TABLE VALIDATION_RESULTS; CREATE TABLE VALIDATION_RESULTS( sdo_rowid ROWID, status VARCHAR2(2000) ); select count(*) from CODESYS.GEODPOINT2D; grant select on geodpoint2d to public with grant option; create view geodpoint2d as select * from codesys.geodpoint2d; insert into user_sdo_geom_metadata (table_name,column_name,diminfo,srid) select table_name,column_name,diminfo,srid from all_sdo_geom_metadata where owner = 'CODESYS' and table_name = 'GEODPOINT2D' and column_name = 'GEOM'; commit; BEGIN SDO_GEOM.VALIDATE_LAYER_WITH_CONTEXT('GEODPOINT2D','GEOM','VALIDATION_RESULTS'); END; / Select * from VALIDATION_RESULTS; SDO_ROWID STATUS --------- --------------- NULL Rows Processed <500>
Thanks for the prompt reply.
I forgot to mention that the validation script was ran by a DBA with full rights to the schema 'ALS', where the spatial table is located. Asides from being an internal error, can you explain what error ORA-13199 means exactly?
As far as I can see, the problem is inside the VALIDATE_LAYER_WITH_CONTEXT not being able to be run cross-schema.
You can run this connected as SYS: it still won't work.
If an Oracle Spatial developer is lurking on this thread can you confirm what the situation is?
DROP TABLE VALIDATION_RESULTS; CREATE TABLE VALIDATION_RESULTS( sdo_rowid ROWID, status VARCHAR2(2000) ); BEGIN SDO_GEOM.VALIDATE_LAYER_WITH_CONTEXT('CODESYS.GEODPOINT2D','GEOM','VALIDATION_RESULTS'); END; / SELECT* FROM VALIDATION_RESULTS;