Removing direct connections 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 PROCESS_INFORMATION and locks tables.

NoteNote:

This is not currently supported for ArcSDE geodatabases in PostgreSQL.

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

sdemon –o kill –t {all | <pid>} [–D <database_name>] [-s <datasource>] 
-i <direct_connect_string> –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.

The -i option is used to make the direct connection. See Direct connections from ArcSDE commands to a geodatabase in DB2 for the correct syntax.

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.

Use the –u and –p options to specify a user name and password of a database user who has sufficient permissions to kill a direct connection to the database. SeeUser permissions for geodatabases in DB2 for these permissions.

CautionCaution:

Killing active (as opposed to orphaned) connections is not advised. This is especially true if the connected user is in the process of editing data. If the user has not saved, all unsaved edits are lost when the connection is dropped, and there is the potential for the data to be corrupted.

Steps:
  1. Open an MS-DOS (Windows) or shell (UNIX or Linux) Command Prompt window.
  2. Obtain information about connected users by either using the SE_connection_get_instance_users function, querying the 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 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.


11/18/2013