ArcSDE is an important "path" between spatial data and GIS programs. It can be used to associate ArcGIS and other programs with the relational database system. These relational databases are not table-type such as access, it is a Distributed Relational Database Service system similar to Oracle and sqlserver.
ArcSDE provides two data connection architectures: Two-layer and three-layer models. Generally, we use a three-layer architecture. If you need to use the former, you can select "generate a direct join" in arccatalog ".
Sdemon
The command allows the Administrator to manage and monitor the ArcSDE service. After the SDE service is started, there is always a giomgr SDE server process, which is responsible for listening to connection requests (server name and end
Port), verify the connection (password and user), assign an independent gsrvr process to each successful connection, and gsrvr is responsible for communication between the client and the server (using the same server name and end)
Port ).
ArcSDE is a Client/Server mode, so there are several attributes to be aware:
1. The home directory is a recorded path and becomes sdehome. This directory contains executable files, configuration files, and dynamic shared libraries.
2. Two processes: giomgr and gsrvr (as before)
3. Because SDE uses the TCP/IP protocol, server names and ports play an important role in communication. After the service is created, the service name and port number are stored in the services file "C: \ winnt \ system32 \ drivers \ etc. It has two forms: Service name: Port, IP: port.
4. The configuration parameters are saved in a table named SDE. server_config. The default parameter file is giomgr. defs, which is stored in the ETC folder in sdehome.
Start the service:
1. Use the normal service to start the program
2. sdemon-o start-P SDE
Parameter configuration:
The parameters of the SDE service can be modified. In this process, you can modify the table in the database or the service. sde Or dbinit. SDE files, both of which are saved in the ETC folder in sdehome.
For an SDE service, the method that the external program contacts it is through the TCP/IP protocol. Therefore, by default, when we open the service. SDE file, we will find the following code:
Esri_sde 5151/tcp # ArcSDE 9.0 for Oracle9i
This is the port number of the SDE service named esri_sde. When we execute sdemon-o start-p sde, the system will look for the parameters of this file to see if they match. Verify the password and user if the Password Matches.
Multiple SDE services can exist on one machine at the same time. These service names are different and the ports used are different, but their parameters are saved in the service. Sde file, for example:
Esri_sde2 5152/tcp # ArcSDE 9.0 for Oracle9i
The SDE service needs to read some system environment variables from the dbinit. Sde file to obtain necessary relational database information, such:
# Oracle SID for service esri_sde.
Set oracle_sid = SDE
The preceding statement indicates that the SDE Service uses the Oracle Data Warehouse routine.
The following command is used to obtain all parameters:
Sdemon-O Info-I config
You can also open the SDE. server_config table to view the specific parameters.
Server Management:
Server Management includes service startup, pause, and shutdown. On Windows, services can be started and shut down, while routines can be visualized, the following describes how to use the command line:
1. Start a remote SDE Service
Sdemon-o start-P mypassword-s service-I ArcSDE
-P is the password,-S is the remote machine name, and-I is the SDE service name.
2. Suspend a service
Sdemon-O pause-P mypassword
3. Restart
Sdemon-O resume-P mypassword
4. Shut down a giomgr Process
Cd % sdehome % \ tools
Killp 100 (100 is the process number)
Do you really want to kill the process with PID 100 (y/n )?
Y
5. Close a service
Sdemon-O shutdown-P mypassword
6. Close all user sessions
Sdemon-o kill-T ALL
SDE service monitoring:
To display the SDE service status, we need to use the sdemon command to display some information:
1. Status Monitoring
Sdemon-o status
2. Data lock
Sdemon-O Info-I locks
SDE provides four types of locks:
Object lock: used for activation of versions and geographic databases
Table lock: used to lock a table
Area locks: used to lock the spatial range of an element class
Status lock state locks: used to lock the version status of a element class or table
3. User status
Sdemon-O Info-I users
SDE service troubleshooting:
1. What happens when the SDE service is started?
The SDE service program starts a giomgr process.
The process obtains the system environment variables from the dbinit. Sde file.
Whether the process probe service license has been installed
The process reads the services. Sde file.
The process obtains the TCP/IP protocol and service name.
Giomgr uses the connection information defined by dbinit. SDE and system variables to connect to a DBMS.
Giomgr traverses all locked tables
The service is started. The giomgr process starts to listen to its port to determine whether the outside world is connected.
2. What happened when the SDE client connects to the service?
The giomgr process listens to its port
The program confirms a connection request to the service.
Giomgr compares the lock time and host time of the program computer. If the time is later than maxtimediff, the connection is not allowed.
Gimogr starts to compare the ArcSDE and ArcSDE Server versions of the client program. If the former is earlier than the latter, the connection will be rejected.
The gimogr process starts a gsrvr process to serve the client program.
The gsrvr process obtains the shared memory.
Once the above process is successfully connected to the DBMS, giomgr will continue to listen to the next connection
In addition, we can also manage services and data through command lines. These programs are all placed in the % sdehome % \ bin folder, for example:
Alphabetical listing of commands
Command description
Cov2sde
Converts ArcInfo coverages to ArcSDE feature classes.
Sde2cov
Converts ArcSDE feature classes to ArcInfo coverages.
Sde2shp
Converts an ArcSDE feature class to an ESRI shapefile.
Sde2tbl
Converts ArcSDE tables into info and DBASE tables.
Sdeconfig
Manages your ArcSDE server configuration file
Sdedbtune
Exports and imports an ArcSDE dbtune file.
Sdeexport
Creates an ArcSDE export file.
Sdegcdrules
Manages ArcSDE geocoding rules
Sdegroup
Merges feature classes.
Sdeimport
Imports data from an ArcSDE export file.
Sdelayer
Administers feature classes.
Sdelocator
Manages ArcSDE locators.
Sdelog
Administers ArcSDE log files.
Sdemon
Manages the ArcSDE server.
Sderaster
Manages ArcSDE raster layers.
Sdeservice
Manages the ArcSDE service on Windows NT platforms.
Sdesetup
Initial setup program for ArcSDE for your RDBMS.
Sdetable
Administers business tables and their data.
Sdeversion
Manages versions of a Geodatabase.
Sdexinfo
Provides descriptive information of an ArcSDE export file.
Sdexml
Administers XML columns.
Shp2sde
Converts an ESRI shapefile to an ArcSDE feature class.
Tbl2sde
Converts info and DBASE tables into ArcSDE tables.