---------------------转载-----------------------
a)创建加载路径——st_shapelib.dll
执行创建库脚本:create or replace library st_shapelib as 'C:\Program Files\ArcGIS\ArcSDE\ora10gexe\bin\st_shapelib.dll';
查看是否创建成功:select * from user_libraries;
b)Oracle监听器设置——修改listener.ora文件
添加(ENVS="EXTPROC_DLLS=ANY")
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = d:\oracle\product\10.2.0\db_1)
(PROGRAM = extproc)
(ENVS="EXTPROC_DLLS=ANY")
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
(ADDRESS = (PROTOCOL = TCP)(HOST = dbserver)(PORT = 1521))
)
)
c)修改tnsnames.ora文件
添加(ADDRESS = (PROTOCOL = TCP)(HOST = dbserver)(PORT = 1521))
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
(ADDRESS = (PROTOCOL = TCP)(HOST = dbserver)(PORT = 1521))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)
d)重启oracle监听器
lsnrctl stop
lsnrctl start
e)ST_Geometry测试
select sde.st_astext(shape) from ***;