English

How To: Kill direct connect processes to the ArcSDE database

Summary

Instructions provided explain how to kill or disconnect certain ArcSDE connections.

SDEMON command is only able to kill or disconnect ArcSDE connections, which are established using application server connection (three-tier connection), direct connections must be managed using DBMS tools since they are connections made directly to the DBMS.

The instructions below are specific for kill direct connections made to an Oracle database. Consult the database administrator to perform such operations.

Procedure

  1. Find the SDE_ID to kill using sdemon command or querying the SDE.Process_Information table (if SDE service is absent).

    Code:
    With ArcSDE Service:
    C:\>sdemon -o info -I users -i 5151

    ArcSDE Instance 5151 Registered Server Tasks on loan_230800 at Tue Dec 02 15:53:
    04 2008
    -------------------------------------------------------------------------
    S-ID User Host:OS Started
    ----- -------- -------------------------------- ------------------------
    228 GISADMIN loan_230800:Win32 Tue Dec 02 15:52:32 2008

    Without ArcSDE Service:
    In SQLPlus:
    SQL> col sde_id format 99999;
    SQL> COL server_id FORMAT 999999;
    SQL> COL nodename FORMAT A20;
    SQL> COL owner FORMAT A20;

    SQL> SELECT pi.sde_id, server_id, start_time, nodename,owner,direct_connect FROM
    sde.process_information pi;

    SDE_ID SERVER_ID START_TIM NODENAME OWNER D
    ------ --------- --------- -------------------- -------------------- -
    228 2968 02-DEC-08 loan_230800 GISADMIN Y


    Suppose the direct connect we want to kill has the SDE_ID 228.
  2. Run the following query to find the sid and serial# in the database for this direct connect.

    Code:
    SELECT s.sid, s.serial# FROM v$session s WHERE SUBSTR(s.process,1,INSTR(s.process,':')-1) = (SELECT pi.server_id FROM sde.process_information pi WHERE pi.sde_id = 228);
    SID SERIAL#
    ---------- ----------
    8 789

  3. Log in SQLPlus with sys user in Oracle to kill the session using ALTER SYSTEM KILL SESSION syntax.
    Code:
    SQL> ALTER SYSTEM KILL SESSION '8,789' IMMEDIATE;

    System altered.


    Note:
    In Version 10, sdemon commands can be used to kill direct connections. For more information, see the Help topic sdemon in ArcSDE Administration Commands.