Configuring the geo database to access spatial data from external clients

Print Previous page Top page Next page

This item is executed when the geo database ArcSDE is already deployed to the database Oracle.

To enable external clients to access the geo database, if is necessary to connect and configure the library ST_SHAPELIB.DLL. This library is provided as part of ArcGIS products and it is designed to work with the spatial data format St_Geometry (ArcSDE).

Before performing the setup of the library ST_SHAPELIB.DLL in the database Oracle, it should be located on the server DBMS Oracle and certain settings must be made in the configuration files of the DBMS Oracle.

Then, in the database Oracle, which hosts the geo database ArcSDE, it should follow these steps: It is assumed that the geo database ArcSDE is created in the database Oracle in the user scheme SDE. To execute the following commands, use any SQL-query interpreter Oracle. For example, Oracle SQL Developer.

1)  Connect to the database as super-user SYS (AS SYSDBA).

2)  Assign the user SDE necessary permissions, to do this on behalf of SYS:

 GRANT EXECUTE ON dbms_pipe TO SDE;

 GRANT EXECUTE ON dbms_lock TO SDE;

 GRANT EXECUTE ON dbms_lob TO SDE;

 GRANT EXECUTE ON dbms_utility TO SDE;

 GRANT EXECUTE ON dbms_sql TO SDE;

 GRANT EXECUTE ON utl_raw TO SDE;

 GRANT EXECUTE ON utl_recomp TO sde;

 GRANT CREATE LIBRARY TO SDE;  

 GRANT EXECUTE ON DBMS_CRYPTO TO SDE;

3)  Connect to the database on behalf of the user SDE.

4)  Check the correctness of the path to the external library:

 SELECT * FROM user_libraries WHERE LIBRARY_NAME='ST_SHAPELIB';

5)  If the query does not produce a result, or as a result of the request, the path specified in the parameter FILE_SPEC does not correspond to the path specified in the configuration file of DBMS Oracle EXTPROC.ORA, to execute the query to recreate the library in the database:

 CREATE or REPLACE LIBRARY ST_SHAPELIB AS 'C:\\ArcGIS\\st_shapelib.dll';

or, if the server is running OS Linux or OS UNIX:

 CREATE or REPLACE LIBRARY ST_SHAPELIB AS ' /user/arcgis/libst_shapelib.so';

6)  Execute compilation of the scheme SDE:

 ALTER PACKAGE sde.st_geometry_shapelib_pkg COMPILE REUSE SETTINGS;

 EXEC dbms_utility.compile_schema( 'SDE' );

7)  Verify the correctness of objects registration by executing the query:

         SELECT object_name FROM user_objects WHERE status = 'INVALID';

 

There are no objects, which have the status «INVALID». Moreover, there are no objects with status «INVALID» for personal data type St_Geometry.

 

8)  Verify the correctness for connection of the library ST_SHAPELIB to the database Oracle by running a simple query that uses functions from this library. For example:

SELECT

 SDE.ST_AsText( SDE.ST_GeomFromWKB

         ( SDE.ST_AsBinary( SDE.ST_GeomFromText

                 ( 'POINT(334895.21690000 2326812.63830000)', 3405)), 3405))

 as MYTEST FROM DUAL;

The request must work without errors.

 

If the final checks indicate that the library ST_SHAPELIB is connected to the database Oracle incorrectly, it should repeat all the steps from the beginning, guided additionally by the documentation for locating geo databases ArcGIS in Oracle.