Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 10308 invoked from network); 21 Aug 2008 07:07:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 21 Aug 2008 07:07:59 -0000 Received: (qmail 99284 invoked by uid 500); 21 Aug 2008 07:07:56 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 99256 invoked by uid 500); 21 Aug 2008 07:07:56 -0000 Mailing-List: contact derby-user-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Discussion" Delivered-To: mailing list derby-user@db.apache.org Received: (qmail 99245 invoked by uid 99); 21 Aug 2008 07:07:56 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 Aug 2008 00:07:56 -0700 X-ASF-Spam-Status: No, hits=4.0 required=10.0 tests=DNS_FROM_OPENWHOIS,FORGED_YAHOO_RCVD,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 Aug 2008 07:06:58 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1KW4GU-00017l-Th for derby-user@db.apache.org; Thu, 21 Aug 2008 00:07:26 -0700 Message-ID: <19083549.post@talk.nabble.com> Date: Thu, 21 Aug 2008 00:07:26 -0700 (PDT) From: JM Malmedy To: derby-user@db.apache.org Subject: Re: Kill user session In-Reply-To: <48AC420E.1070205@sun.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: jmmalmedy@yahoo.com References: <158650.59252.qm@web36106.mail.mud.yahoo.com> <48AACCC0.2040909@sun.com> <19064917.post@talk.nabble.com> <48AC420E.1070205@sun.com> X-Virus-Checked: Checked by ClamAV on apache.org Hello, Unfortunately, the users connect to the database using products like SQuirreL or some reporting products. That means I have no control on the way they connect their sessions. I know this is not the best way to work and certainly not the safest. Unfortunately that's the choice of the customers I work for and I have to deal with it. Anyway thank you very much for your advices. JM Malmedy Rick Hillegas-2 wrote: > > Hi Jean-Marc, > > I don't know of any support in Derby for this. Maybe you could code the > support outside Derby. For instance, if your clients got their sessions > from a connection manager which you controlled, then you could cache > open connections and kill them as needed. To kill a connection, I think > that the following would work: > > conn.rollback(); > conn.close(); > > If you are running Derby under an application server, it is possible > that the application server may provide some support for what you need > to do. > > Hope this helps, > -Rick > > JM Malmedy wrote: >> Hi Rick, >> >> First of all, thank you for your fast and useful answer. >> >> In fact my problem is that the database is used together by customer GUI >> applications that execute small and well-controlled transactions but also >> by >> some "power" users that execute their own SQL requests for reporting. >> Very >> often these users run a SQL which is not optimized and that take a lot of >> resources and, of course, that's very disturbing for the GUI >> applications. >> That's why I'd like to be able to kill these SQL requests when needed >> directly on the server. Is there any workaround to do this? >> >> Thanks again. >> >> Jean-Marc >> >> >> Rick Hillegas-2 wrote: >> >>> Hi Jean-Marc, >>> >>> The following query will list the in-flight transactions and the users >>> who are running them. For more information, please see the section >>> titled "SYSCS_DIAG diagnostic tables and functions" in the Derby >>> Reference Manual: http://db.apache.org/derby/docs/10.4/ref/ >>> >>> select * from SYSCS_DIAG.TRANSACTION_TABLE >>> >>> I'm not aware of any graceful way to terminate another user's session. >>> >>> Hope this helps, >>> -Rick >>> >>> Jean-Marc MALMEDY wrote: >>> >>>> Hi, >>>> I'd like to know whether there is a way to retrieve the list of the >>>> users >>>> currently connected to Derby (network server environment) and their >>>> running transactions. Is it possible to force the disconnection of a >>>> user >>>> and to kill his running transactions without having to restart the >>>> server? >>>> Thank you in advance. >>>> JM Malmedy >>>> >>>> >>>> >>>> >>>> >>>> >>> >>> >> >> > > > -- View this message in context: http://www.nabble.com/Kill-user-session-tp19050316p19083549.html Sent from the Apache Derby Users mailing list archive at Nabble.com.