The value for file_spec must match the st_shapelib.dll's physical file location on the server. If it does not match, st_geometry operators and functions fail to execute.
If for any reason the path to the library must be changed, for example, the administrator moves the file location for SDEHOME or an Oracle export file is being imported from another instance where the path to the st_shapelib.dll is different, then the library specification must be updated to match the correct location of the st_shapelib.dll.
A possible indicator as to when the library location may need to be updated is when the following error message is encountered when executing a st_geometry function or operator (the error is an indicator that the value for the specified library location may be invalid).
Code: SQL> SELECT sde.st_astext(shape) FROM sewers WHERE objectid = 10; ERROR: ORA-06520: PL/SQL: Error loading external library ORA-06522: Unable to load DLL ORA-06512: at "SDE.ST_GEOMETRY_SHAPELIB_PKG", line 70 ORA-06512: at "SDE.ST_GEOMETRY_OPERATORS", line 68
To fix the problem, update the library path in SQL*Plus, as the SDE user, by setting the file directory to the location where the st_shapelib.dll resides.
Code: SQL> CREATE OR REPLACE LIBRARY st_shapelib 2 AS 'C:\Program Files\ESRI\ArcSDE\ora11gexe\bin\st_shapelib.dll'; 3 /
Creating the library causes dependent objects to become invalid. Oracle best practices recommend all objects should be compiled and valid. To ensure all objects are valid in the SDE schema, execute the following command as the SDE user: