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
>>>
>>>
>>>
>>>
>>>
>>>
>>
>>
>
>
|