Controversial, the ARCSDE spatial database engine provides two ways to connect to a database. One is the service connection method, one is the direct connect way. The latter is also the way ESRI advocates. However, both of these approaches are required in both the customer's production environment and the developer's development environment. Here's a description of the general process and considerations for installing and configuring the spatial database engine in ArcGIS10.0 and 10.1.
1. Direct Connect mode
The direct connect approach is recommended by ESRI because the Direct connect approach has the obvious advantage of being able to bring greater efficiency and value to the customer.
A. The main advantages of the Direct connect approach:
A The Direct connect mode offloads 20%-40% load from the service connection mode;
B Direct connection reduces the need for server-side memory;
C The direct connection process is faster and performs processing on the client;
D You do not need to install ARCSDE software.
B. Direct-attached configuration requirements
As mentioned above, the direct Connect method eliminates the installation steps of the ARCSDE software. But it needs to install the corresponding database client, followed by ORACLE11GR2 as an example. After you have configured the Oracle data installation correctly, you need to know the SYS user password, port number, instance name, and service name.
C. Configuration process
A . Installing and Configuring the Oracle Client (+)
For ArcGIS Desktop connections, there is currently a need to install ORACLE11GR2 clients, but you can use the corresponding version of the install-free client, but you need to manually configure the environment variables.
If the client is installed after the database is installed, the environment variable does not need to be modified manually. The contents are as follows:
E:\app\weihu\product\11.2.0\client_1\bin; e:\app\weihu\product\11.2.0\dbhome_1\bin;%systemroot%\system32;%systemroot%;%systemroot%\system32\wbem;% Systemroot%\system32\windowspowershell\v1.0\; C:\Program Files\arcgis\arcsde\ora11gexe\bin
Then, you need to use the client's Netmanager tool to configure the service name, such as ArcSDE.
For installation-free clients, you need to manually configure the Tnsnames.ora file under Network/admin.
B . ArcGIS Desktop connection parameter Settings
Once the Oracle client installation is complete, you can connect in the ArcGIS desktop, with a slightly different set of parameters and connection options than the versions in ArcGIS desktops.
A.arcgis Desktop10.1
10.1 Add a spatial database connection in the database connection in Arccatalog, such as. Specify the parameter data type, instance (\\ip:port\servicename can refer to abort Database Connections in the lower left corner), authentication.
B.arcgis Desktop10.0
The direct Connect method in 10.1 and 10.0 difference is small, pay attention to the relevant parameters, mainly machine (IP), service (sde:oracle11g: Service name [ARCSDE: Use the parameters configured by the client]), authentication is the same, such as.
2. Service Connection mode
A. Service Connectivity benefits
For many implementers, their application may be simpler, and the main consideration is the ease of deployment. Then the advantages of service connections are reflected. No client installation and configuration is required.
B. Software Installation and Configuration
For the service connection mode, you need to install the ARCSDE for database version of the package. This is a big difference in ArcGIS10.1 and ArcGIS10.0.
A. installation and configuration of arcsde in ArcGIS10.1 :
Find the corresponding data type and version of the software installation package can be installed, there is no post Install Wizard. After the software installation is complete, use the command to create the SDE service.
Locate the Service.sde file in the ARCSDE installation directory to cancel the # # comment in front of Esri_sde 5151/tcp.
Also, locate the service (SYSTEM32/DRIVERS/ETC) file in Windows to add a line esri_sde 5151/tcp.
Then use the command Sdeservice to create the SDE service, such as the database type, instance name, SDE user password, service name, and so on.
Once the service is configured successfully, you can connect using the service in ArcGIS Desktop. However, a 10.1 service connection requires the use of a tool to create a connection file, and then connect instead of using the service name or 5151 connection directly, as in 10.0.
Use the Create ArcSDE Connection file tool in the workspace toolbox to create a connection file.
Parameters: Connection file storage location, file name, machine, service name (ESRI_SDE), database name, authentication, etc.
You can complete the service connection for the spatial database in ArcGIS Desktop10.1 by double-clicking it or assigning it to the file using the Add Data button.
B. Installation and configuration of arcsde in ArcGIS10.0 :
The Post Install Wizard is available in ArcSDE10.0 to provide a more convenient service connection. The configuration that the wizard can complete, such as:
The initial installation selects all, and the next step is to enable the Oracle database connection check (to ensure that the instance is functioning properly).
Next, you can set the SDE user name and password to create the SDE tablespace.
Then, set the service name, port number, machine name, oracle instance name, and so on.
Follow the Post Inatall Wizard to set the parameters and finalize the authorization to complete the Service connection installation and configuration for the 10.0 environment. You do not need to use the command line to create a service, you can directly set up parameters in ArcGIS desktop to connect.
In ArcGIS10.0, the service mode connection and direct connect can use the node of the space database connection in Arccatalog, set the parameters to connect, the only difference is the service parameters. Service connection Input ESRI_SDE or 5151, direct connection need to input SDE:ORACLE11G:ARCSDE, the specific can be compared related.
3.st_geometry Configuration
St_geometry is a type of spatial information storage that follows the ISO and OGC specifications and can be read directly by SQL. This storage method makes it possible to better utilize Oracle's resources for better compatibility with Oracle's features. ESRI's ArcSDE9.2 begins to support this type of storage.
A.st_geometry Main Advantages
The advantages of st_geometry are mainly reflected in the following aspects:
A Spatial data can be accessed directly through SQL functions;
B Using SQL statements to manipulate spatial data can be as convenient as other types of data;
C The complex spatial data retrieval and sharing can be carried out through the stored procedure;
D Other business systems can access the data in Geodatabase through SQL statements;
How St_geometry is configured
It is important to note that when configuring St_geometry, the corresponding version of the ARCSDE software needs to be installed according to the version and number of bits of the database (for example, Oracle is win64_11gr2_database, you need to install the ARCSDE for Oracle 11G64-bit software). This includes the configuration of dynamic libraries (St_shapelib.dll, Pe.dll, Sg.dll) that need to be referenced.
There are two ways to configure the website:
http://support.esri.com/en/knowledgebase/techarticles/detail/38043
Related information:
Http://help.arcgis.com/zh-cn/arcgisserver/10.0/help/arcgis_server_dotnet_help/index.html#/na/0093000015qp000000/
A. Configuring Listener.ora and Tnsnames.ora file modes;
Add the following information when the database listener configuration is guaranteed to be healthy.
First, locate the Tnsnames.ora file in the ORACLE installation directory (%oracle_home%\network\admin\) and add the Extproc_connection_data information as follows:
Extproc_connection_data =
(DESCRIPTION =
(Address_list =
(ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC1521))
)
(Connect_data =
(SID = Clrextproc)
(PRESENTATION = RO)
)
)
Second, find (%oracle_home%\network\admin\) under the Listener.ora under Sid_list_listener add:
(Sid_desc =
(Sid_name = Clrextproc)
(Oracle_home = C:\app\Administrator\product\11.2.0\dbhome_1)
(program = EXTPROC)
(Envs = "Extproc_dlls=c:\arcsde\ora11gexe\bin\st_shapelib.dll,path=c:\arcsde\ora11gexe\bin")
Note:
A It is best not to have spaces in the path;
B The above configuration requires attention to the same SID and Key in two files Listener.ora and Tnsnames.ora.
Otherwise, the following error message will appear:
After the configuration is correct, restart the Oracle Listener (Lsnrctl stop, lsnrctl start);
Finally, test the st_geometry configuration with a command.
Sql> SELECT * from user_libraries to check the location configuration of the St_shapelib.dll.
If the DLL path is not correct (there is also a corresponding number of bits 64/32) can be modified by the following command: Create or replace library St_shapelib as.
The above command only can explain the DLL location configuration is correct, whether the normal work should be judged by SQL function:
For example, the St_astext function can output information correctly, indicating that the St_geometry configuration was successful.
- Configure Extproc.ora mode;
Under the ORACLE installation directory, locate the Extproc.ora file under%oracle_home%\hs\admin\, and set the set extproc_dlls parameter.
Extproc_dlls=only:c:\\arcsde\\ora11gexe\\bin\\st_shapelib.dll or Extproc_dlls=any. It is important to note that the latter requires copying St_shapelib.dll, Pe.dll, sg.dll Three library files to the ORACLE installation directory (%oracle_home%\bin). Check the same method as above.
4. Spatial data Registration
For developers or users, they do well in addition to the spatial database configuration. It also involves issues such as data organization and service publishing. The ability to register spatial databases and folders is provided in ArcGIS Server10.1. In fact, the registration of the folder is similar to the ArcGIS Server10.0 we need to set up the data store directory, share and set permissions to organize the data. Registering databases and folders in Server10.1 also serves as a consistent requirement for production data and publishing service data. In the non-registered state, when the service is published, the service-related data is uploaded to the GIS server, which not only increases the storage space, especially the image data. It will also extend the time of Service release. Therefore, we generally recommend that GIS data be organized in registered folders or spatial databases to improve productivity. There are two ways to register databases and folders in ArcGIS Server10.1, both on the desktop and on the manager Web side.
A. Server Connection property settings for the desktop:
In the ArcGIS desktop in Arccatalog has a GIS server connection node, click can add GIS server, on the GIS server connection right-click Properties can open the following dialog box, in the data store can register databases and folders, and verify.
B. settings on the ArcGIS Server Manager page
In Server10.1 Manager page, click Site--gis Server-data storage, you can find the configuration page, registered in the same way as the desktop side.
5. Summary
The spatial database engine ARCSDE's direct Connect and service connection methods are applicable to different application scenarios respectively. The direct connect method, because it performs processing on the client, does not only process faster, but also reduces the consumption and load of server-side memory. Therefore, it is recommended that you use Direct Connect and register the relevant databases and folders when you publish the service. However, because the direct connection requires the installation of a database client, the configuration is relatively cumbersome. It may be more convenient to use a service connection for simple apps that have less concurrency. In addition, the St_geometry storage format allows GIS professionals to use SQL to easily, quickly and efficiently manipulate spatial information just like other data, so it is recommended for everyone.
ARCSDE database connection (direct connection, service connection) and Gt_geometry storage configuration plots