Clients processes still alive even clients shutdown their PCs.

  • hey everyone

    its about running different transactions on server from client computers. if someone do some query or get report from server and quit that program or even shut down their pc, but the query still there in server processes, and sometimes it is running as the originally runs by users.

    it happens several times, and i test it too. i asked developers that they properly close connections in their program ending, they r positive. tell me what i do or what i check. c u

    Waqas Younis

  • Yes I have also faced the same issue..

  • And what was the solution?

  • I simply killed that session after knowing that user has quited.

  • If the applications or reports are using ODBC or ADO to connect to SQL Server, there is a connection pooling behaviour that will keep the connection open even after the application explicitly closes the connection or the application ends.  This is the default behaviour of ODBC/ADO and I believe it cannot be changed. 

    The purpose for this is to make applications faster by reusing connections.  An application opening a SQL Server connection consumes a lot of time (often more that the query itself).  OBDC/ADO will keep a connection open for 10 minutes, so that the application can reuse it if it is needed again.  This will make the connection still open on SQL Server, even if no application on the client is running.  The connection should drop after 10 minutes of inactivity.



    Mark

  • Dear mark,

    Thanks..a ton

  • Add the following to your connection string and the connection will be removed immediately upon disconnect.

     

    ;OLE DB Services=-2

     

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply