English

How To: Check if the Oracle extproc is set up correctly for direct ST_GEOMETRY SQL queries

Summary

This article describes one method of validating the setup and configuration of the Oracle extproc to be able to use ST_GEOMETRY through direct SQL queries.

Procedure

Run the following SQL query:

Code:
select sde.ST_AsText(SDE.ST_Geometry('POINT (10 10)', 0)) from dual;

This should return:

Code:
SQL> select sde.ST_AsText(SDE.ST_Geometry('POINT (10 10)', 0)) from dual;

SDE.ST_ASTEXT(SDE.ST_GEOMETRY('POINT(1010)',0))
--------------------------------------------------------------------------------
POINT ( 10.00000000 10.00000000)

If the extproc is not set up correctly an error is displayed. One potential error may be something like the following:

Code:

SQL> select sde.ST_AsText(SDE.ST_Geometry('POINT (10 10)', 0)) from dual;

ERROR:
ORA-06520: PL/SQL: Error loading external library
ORA-06522: Unable to load DLL
ORA-06512: at "SDE.ST_GEOMETRY_SHAPELIB_PKG", line 0
ORA-06512: at "SDE.ST_GEOMETRY_OPERATORS", line 68

Related Information