When does the Oracle library for st_shapelib.dll need to be changed?

简介: Question When does the Oracle library for st_shapelib.dll need to be changed? Answer The library is the path for Oracle to locate the external .dll file used by st_geometry functions an

Question

When does the Oracle library for st_shapelib.dll need to be changed?

Answer

The library is the path for Oracle to locate the external .dll file used by st_geometry functions and operators with Oracle's external process. 

To identify the st_shapelib library's current location in Oracle, execute the following SQL statement, as the SDE user, in SQL*Plus:
SQL> SELECT library_name, file_spec FROM user_libraries;

LIBRARY_NAME FILE_SPEC
------------ --------------------------------------------
ST_SHAPELIB  D:\ESRI\ArcSDE\ora10gexe\bin\st_shapelib.dll
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). 
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.
SQL> CREATE OR REPLACE LIBRARY st_shapelib
  2  AS 'C:\Program Files\ESRI\ArcSDE\ora11gexe\bin\st_shapelib.dll';
  3  /

Library created.
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: 
EXECUTE sys.utl_recomp.recomp_serial('SDE');
PL/SQL procedure successfully completed.

Verify all objects are valid. 

SQL> SELECT object_name FROM user_objects WHERE status = 'INVALID';

no rows selected


目录
相关文章
|
Oracle 关系型数据库 数据库
Navicat连接Oracle报错:Oracle library is not loaded
Navicat连接Oracle报错:Oracle library is not loaded
517 0
|
Oracle 关系型数据库 数据库
navicat提示oracle library is not loaded
navicat提示oracle library is not loaded
3648 0
navicat提示oracle library is not loaded
|
Oracle 关系型数据库 Windows
Oracle Databases Need to be Patched to a Minimum Patchset/PSU/RU level before April 2019 (DOC ID 2361478.1)
In this Document Description   What we are announcing   What action you need to take    What is the change introduced by the patches listed above?  .
2384 0
|
SQL 运维 Oracle
《Oracle高性能自动化运维》一一2.3 Library Cache
本节书摘来自华章出版社《Oracle高性能自动化运维》一 书中的第2章,第2.3 节,作者:冷菠  著 ,更多章节内容可以访问云栖社区“华章计算机”公众号查看。
1325 0
|
SQL Oracle 关系型数据库
ORACLE11G QMNC引起的library cache: mutex X
   操作系统类型:Linux ### 2.6.39-400.17.1.el6uek.x86_64 #1 SMP Fri Feb 22 18:16:18 PST 2013 x86_64 x86_64 x86_64 GNU/Linux       数据库版本:SQL*Plus: Release 11.
1084 0