Hi there,

I have created a simple function that returns an SDO_GEOMETRY object
based on x,y and SRID, as seen below:


Code:
FUNCTION Create_Point_SOR(x NUMBER, y NUMBER, srid NUMBER) RETURN 
SDO_GEOMETRY DETERMINISTIC IS 
New_Point SDO_GEOMETRY; 
BEGIN 
new_point := 
SDO_GEOMETRY(2001,srid,SDO_POINT_TYPE(x,y,NULL),NULL,NULL); 
RETURN New_Point; 
END Create_Point_SOR;
The package compiles fine, but when i try to execute the function i get
the following error message:


ORA-02311: cannot alter with COMPILE option a valid type with type or
table dependents

ALTER TYPE MDSYS.SDO_POINT_TYPE COMPILE DEBUG

However, the function executes without any errors but then the
procedure that calls this function falls over with the message:


ORA-29861: domain index is marked LOADING/FAILED/UNUSABLE

I cannot understand where the error is arising, can someone please
advise? Note that if i remove the function all of my problems go away,
but unfortunately my spatial column is not updated.

Thanks

Dan