Removing an ArcSDE service connection from the geodatabase

Sometimes, a connection may hang and a record become orphaned in one or more geodatabase repository tables. When that happens, you may need to forcibly end the connection. To do this, use the sdemon administration command.

Executing the sdemon command with the kill operation removes the connection to the geodatabase and cleans up any records in the sde_process_information and locks tables.

The syntax for the sdemon command with the kill operation is as follows:

sdemon –o kill –t {all | <pid>} [–D <database_name>] [–s <server_name>]
-i <service> -u <user_name> -p <password>

The –t option specifies whether all the connections should be removed from the geodatabase (all) or only a specific connection (<pid>). In most cases, type the process identifier (pid) for a specific connection that has been left in the geodatabase repository.

If you are connecting to any database except Oracle, type the name of the database with the –D option. (If connecting to Oracle, do not specify the -D option.)

If you are connecting to a database on a remote server, specify the –s option with the name of that server on which the database resides.

Specify the service port number of the ArcSDE service.

Use the –u and –p options to specify a user name and password of the ArcSDE administrator user.

Steps:
  1. Open an MS-DOS (Windows) or shell (UNIX or Linux) command prompt on a computer on which you have access to the ArcSDE administration commands.
  2. Obtain information about connected users by either using the SE_connection_get_instance_users function, querying the sde_process_information table, or executing the sdemon command with the info operation and the user or users_long option. See Displaying connected sessions for instructions on how to use the sdemon command to get a list of connections.
  3. In the information returned, identify the SDE ID of the connection you want to remove. For the users option of sdemon –o info, this is S–ID. For the users_long option, this is Server task ID. For the SE_connection_get_instance_users function, this is svr_id. If you query the sde_process_information table, it is sde_id.
  4. Type the sdemon command with the kill operation and the appropriate options described earlier in this topic. Use the –t option to specify the value of the SDE ID for the connection to be removed.
TipTip:

For more information on the sdemon command, see the ArcSDE Administration Command Reference provided with the ArcSDE component of ArcGIS Server at the Enterprise level.

Related Topics


8/19/2013