Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

currently connected users

8 posts in General Discussion Last posting was on 2004-10-01 16:51:24.0Z
lcasi Posted on 2004-09-28 14:25:41.0Z
From: lcasi@katamail.it
Newsgroups: ianywhere.public.general
Subject: currently connected users
Message-ID: <thsil090f0gj0oeuq7j80s40k87gkm4gcb@4ax.com>
X-Newsreader: Forte Free Agent 2.0/32.652
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Original-NNTP-Posting-Host: 62.152.97.123
X-Original-Trace: 28 Sep 2004 07:25:39 -0700, 62.152.97.123
Lines: 14
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 28 Sep 2004 07:25:40 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 28 Sep 2004 07:25:41 -0700
X-Trace: forums-1-dub 1096381541 10.22.108.75 (28 Sep 2004 07:25:41 -0700)
X-Original-Trace: 28 Sep 2004 07:25:41 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:3628
Article PK: 7528

Hi there,

hoping you can give me some help consider the following scenario:

W2000, ASA 8.0.2 (3601)

I need a way to:

- identify all users currently connected to a database
- a way to disconnect some of them in a clean way

TIA

Luigi


lcasi Posted on 2004-09-28 14:29:20.0Z
From: lcasi@katamail.it
Newsgroups: ianywhere.public.general
Subject: Re: currently connected users
Message-ID: <n7til0piqcf07q194jtmlnfrdersq3qupr@4ax.com>
References: <thsil090f0gj0oeuq7j80s40k87gkm4gcb@4ax.com>
X-Newsreader: Forte Free Agent 2.0/32.652
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Original-NNTP-Posting-Host: 62.152.97.123
X-Original-Trace: 28 Sep 2004 07:29:16 -0700, 62.152.97.123
Lines: 19
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 28 Sep 2004 07:29:17 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 28 Sep 2004 07:29:20 -0700
X-Trace: forums-1-dub 1096381760 10.22.108.75 (28 Sep 2004 07:29:20 -0700)
X-Original-Trace: 28 Sep 2004 07:29:20 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:3629
Article PK: 7529

sorry, the email is lcasi@katamail.com

On 28 Sep 2004 07:25:41 -0700, lcasi@katamail.it wrote:

>Hi there,
>
>hoping you can give me some help consider the following scenario:
>
>W2000, ASA 8.0.2 (3601)
>
>I need a way to:
>
>- identify all users currently connected to a database
>- a way to disconnect some of them in a clean way
>
>TIA
>
>Luigi


lcasi Posted on 2004-09-28 15:09:05.0Z
From: lcasi@katamail.com
Newsgroups: ianywhere.public.general
Subject: Re: currently connected users
Message-ID: <gevil0h15a475s6r8tg6vusom03a2v5uan@4ax.com>
References: <thsil090f0gj0oeuq7j80s40k87gkm4gcb@4ax.com>
X-Newsreader: Forte Free Agent 2.0/32.652
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Original-NNTP-Posting-Host: 62.152.97.123
X-Original-Trace: 28 Sep 2004 08:09:02 -0700, 62.152.97.123
Lines: 24
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 28 Sep 2004 08:09:02 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 28 Sep 2004 08:09:05 -0700
X-Trace: forums-1-dub 1096384145 10.22.108.75 (28 Sep 2004 08:09:05 -0700)
X-Original-Trace: 28 Sep 2004 08:09:05 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:3631
Article PK: 7532

Of course not from Sybase central.

I need to do it running a sql from dbisql or a store proc, as a batch
task.

Luigi

On 28 Sep 2004 07:25:41 -0700, lcasi@katamail.it wrote:

>Hi there,
>
>hoping you can give me some help consider the following scenario:
>
>W2000, ASA 8.0.2 (3601)
>
>I need a way to:
>
>- identify all users currently connected to a database
>- a way to disconnect some of them in a clean way
>
>TIA
>
>Luigi


Stephen Rice Posted on 2004-09-28 15:18:01.0Z
Newsgroups: ianywhere.public.general
Subject: Re: currently connected users
From: Stephen Rice <srice_nospam@ianywhere.com>
References: <thsil090f0gj0oeuq7j80s40k87gkm4gcb@4ax.com> <gevil0h15a475s6r8tg6vusom03a2v5uan@4ax.com>
Organization: iAnywhere Solutions
Message-ID: <Xns957272F18C565sricenospamianywhere@10.22.241.106>
User-Agent: Xnews/5.04.25
X-Original-NNTP-Posting-Host: srice-pc1.sybase.com
X-Original-Trace: 28 Sep 2004 08:17:57 -0700, srice-pc1.sybase.com
Lines: 43
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 28 Sep 2004 08:17:58 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 28 Sep 2004 08:18:01 -0700
X-Trace: forums-1-dub 1096384681 10.22.108.75 (28 Sep 2004 08:18:01 -0700)
X-Original-Trace: 28 Sep 2004 08:18:01 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:3632
Article PK: 7531

lcasi@katamail.com wrote in news:gevil0h15a475s6r8tg6vusom03a2v5uan@
4ax.com:

> Of course not from Sybase central.
>
> I need to do it running a sql from dbisql or a store proc, as a batch
> task.
>
> Luigi
>
> On 28 Sep 2004 07:25:41 -0700, lcasi@katamail.it wrote:
>
>>Hi there,
>>
>>hoping you can give me some help consider the following scenario:
>>
>>W2000, ASA 8.0.2 (3601)
>>
>>I need a way to:
>>
>>- identify all users currently connected to a database
>>- a way to disconnect some of them in a clean way
>>
>>TIA
>>
>>Luigi
>

Check out sa_conn_info() and DROP CONNECTION they should do the job for
you

/steve

--
Stephen Rice
Technical Services Manager
iAnywhere Solutions

- Please Post-
Whitepapers, TechDocs, and bug fixes are all available through the
iAnywhere
Developer Community at www.ianywhere.com/developer


Luigi Casiraghi Posted on 2004-09-28 16:19:41.0Z
From: Luigi Casiraghi <lcasi@katamail.com>
Newsgroups: ianywhere.public.general
Subject: Re: currently connected users
Message-ID: <jd3jl0hms5da2t91nkfl61hd59h9o64f9j@4ax.com>
References: <thsil090f0gj0oeuq7j80s40k87gkm4gcb@4ax.com> <gevil0h15a475s6r8tg6vusom03a2v5uan@4ax.com> <Xns957272F18C565sricenospamianywhere@10.22.241.106>
X-Newsreader: Forte Free Agent 2.0/32.652
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 62.152.97.123
X-Original-NNTP-Posting-Host: 62.152.97.123
Date: 28 Sep 2004 09:19:41 -0700
X-Trace: forums-1-dub 1096388381 62.152.97.123 (28 Sep 2004 09:19:41 -0700)
X-Original-Trace: 28 Sep 2004 09:19:41 -0700, 62.152.97.123
Lines: 49
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:3638
Article PK: 7539

On 28 Sep 2004 08:18:01 -0700, Stephen Rice

<srice_nospam@ianywhere.com> wrote:

>lcasi@katamail.com wrote in news:gevil0h15a475s6r8tg6vusom03a2v5uan@
>4ax.com:
>
>> Of course not from Sybase central.
>>
>> I need to do it running a sql from dbisql or a store proc, as a batch
>> task.
>>
>> Luigi
>>
>> On 28 Sep 2004 07:25:41 -0700, lcasi@katamail.it wrote:
>>
>>>Hi there,
>>>
>>>hoping you can give me some help consider the following scenario:
>>>
>>>W2000, ASA 8.0.2 (3601)
>>>
>>>I need a way to:
>>>
>>>- identify all users currently connected to a database
>>>- a way to disconnect some of them in a clean way
>>>
>>>TIA
>>>
>>>Luigi
>>
>
>Check out sa_conn_info() and DROP CONNECTION they should do the job for
>you
>
>/steve

Hi Steve,

yes it should work fine.
One question.

What is exactly the "connection-id" parameter taken by
sa_conn_info() ?
Where can I find it ?
I have 2 database under the same server engine, I connected to the one
with no users connected and executed sa_conn_info() without parameters
but it displayed the info about the 2nd database. Why this behaviour.

Luigi


Stephen Rice Posted on 2004-09-30 19:47:24.0Z
Newsgroups: ianywhere.public.general
Subject: Re: currently connected users
From: Stephen Rice <srice_nospam@ianywhere.com>
References: <thsil090f0gj0oeuq7j80s40k87gkm4gcb@4ax.com> <gevil0h15a475s6r8tg6vusom03a2v5uan@4ax.com> <Xns957272F18C565sricenospamianywhere@10.22.241.106> <jd3jl0hms5da2t91nkfl61hd59h9o64f9j@4ax.com>
Organization: iAnywhere Solutions
Message-ID: <Xns9574A0A25FB51sricenospamianywhere@10.22.241.106>
User-Agent: Xnews/5.04.25
NNTP-Posting-Host: srice-pc1.sybase.com
X-Original-NNTP-Posting-Host: srice-pc1.sybase.com
Date: 30 Sep 2004 12:47:24 -0700
X-Trace: forums-1-dub 1096573644 10.25.100.160 (30 Sep 2004 12:47:24 -0700)
X-Original-Trace: 30 Sep 2004 12:47:24 -0700, srice-pc1.sybase.com
Lines: 34
X-Authenticated-User: techsupp
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:3657
Article PK: 7557


>
> yes it should work fine.
> One question.
>
> What is exactly the "connection-id" parameter taken by
> sa_conn_info() ?
> Where can I find it ?
> I have 2 database under the same server engine, I connected to the one
> with no users connected and executed sa_conn_info() without parameters
> but it displayed the info about the 2nd database. Why this behaviour.
>
> Luigi
>

You are getting a list of connections to the engine. From the docs "If
no connection-id is supplied, information for all current connections to
databases on the server is returned."

If you need to differentiate between databases you will also need to use
sa_dbinfo to determine which dbnumber you are interested in.

/steve


--
Stephen Rice
Technical Services Manager
iAnywhere Solutions

- Please Post-
Whitepapers, TechDocs, and bug fixes are all available through the
iAnywhere
Developer Community at www.ianywhere.com/developer


Luigi Casiraghi Posted on 2004-10-01 14:57:36.0Z
From: Luigi Casiraghi <lcasi@katamail.com>
Newsgroups: ianywhere.public.general
Subject: Re: currently connected users
Message-ID: <fsrql0p81st00p3tibvmb2ii2hnvqn1ecs@4ax.com>
References: <thsil090f0gj0oeuq7j80s40k87gkm4gcb@4ax.com> <gevil0h15a475s6r8tg6vusom03a2v5uan@4ax.com> <Xns957272F18C565sricenospamianywhere@10.22.241.106> <jd3jl0hms5da2t91nkfl61hd59h9o64f9j@4ax.com> <Xns9574A0A25FB51sricenospamianywhere@10.22.241.106>
X-Newsreader: Forte Free Agent 2.0/32.652
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 62.152.97.123
X-Original-NNTP-Posting-Host: 62.152.97.123
Date: 1 Oct 2004 07:57:36 -0700
X-Trace: forums-1-dub 1096642656 62.152.97.123 (1 Oct 2004 07:57:36 -0700)
X-Original-Trace: 1 Oct 2004 07:57:36 -0700, 62.152.97.123
Lines: 34
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:3672
Article PK: 7571

On 30 Sep 2004 12:47:24 -0700, Stephen Rice

<srice_nospam@ianywhere.com> wrote:

>>
>> yes it should work fine.
>> One question.
>>
>> What is exactly the "connection-id" parameter taken by
>> sa_conn_info() ?
>> Where can I find it ?
>> I have 2 database under the same server engine, I connected to the one
>> with no users connected and executed sa_conn_info() without parameters
>> but it displayed the info about the 2nd database. Why this behaviour.
>>
>> Luigi
>>
>
>You are getting a list of connections to the engine. From the docs "If
>no connection-id is supplied, information for all current connections to
>databases on the server is returned."
>
>If you need to differentiate between databases you will also need to use
>sa_dbinfo to determine which dbnumber you are interested in.
>
>/steve

Thanks for the help,
I've been able to create a Stored Procedure to identify specific
active connections that then I need to drop but the problem is that it
seems that the DROP CONNECTION statement don't wotk from within SP. Is
it correct and if so, what can I do ? If I can't manage connections
from a SP all I'm doing is useless.

Luigi


"Bruce Hay" <h_a_y Posted on 2004-10-01 16:51:24.0Z
From: "Bruce Hay" <h_a_y@i~a~n~y~w~h~e~r~e.com>
Newsgroups: ianywhere.public.general
References: <thsil090f0gj0oeuq7j80s40k87gkm4gcb@4ax.com> <gevil0h15a475s6r8tg6vusom03a2v5uan@4ax.com> <Xns957272F18C565sricenospamianywhere@10.22.241.106> <jd3jl0hms5da2t91nkfl61hd59h9o64f9j@4ax.com> <Xns9574A0A25FB51sricenospamianywhere@10.22.241.106> <fsrql0p81st00p3tibvmb2ii2hnvqn1ecs@4ax.com>
Subject: Re: currently connected users
Lines: 45
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
X-Original-NNTP-Posting-Host: hay-t30.sybase.com
Message-ID: <415d8b0a$1@forums-2-dub>
X-Original-Trace: 1 Oct 2004 09:51:22 -0700, hay-t30.sybase.com
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 1 Oct 2004 09:51:23 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 1 Oct 2004 09:51:24 -0700
X-Trace: forums-1-dub 1096649484 10.22.108.75 (1 Oct 2004 09:51:24 -0700)
X-Original-Trace: 1 Oct 2004 09:51:24 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:3678
Article PK: 7578

You will need to use EXECUTE IMMEDIATE to perform a DROP CONNECTION within a
stored procedure. For example:
execute immediate 'drop connection ' || conn_id;

Whitepapers, TechDocs, bug fixes are all available through the iAnywhere
Developer Community at http://www.ianywhere.com/developer

"Luigi Casiraghi" <lcasi@katamail.com> wrote in message
news:fsrql0p81st00p3tibvmb2ii2hnvqn1ecs@4ax.com...
> On 30 Sep 2004 12:47:24 -0700, Stephen Rice
> <srice_nospam@ianywhere.com> wrote:
>
> >>
> >> yes it should work fine.
> >> One question.
> >>
> >> What is exactly the "connection-id" parameter taken by
> >> sa_conn_info() ?
> >> Where can I find it ?
> >> I have 2 database under the same server engine, I connected to the one
> >> with no users connected and executed sa_conn_info() without parameters
> >> but it displayed the info about the 2nd database. Why this behaviour.
> >>
> >> Luigi
> >>
> >
> >You are getting a list of connections to the engine. From the docs "If
> >no connection-id is supplied, information for all current connections to
> >databases on the server is returned."
> >
> >If you need to differentiate between databases you will also need to use
> >sa_dbinfo to determine which dbnumber you are interested in.
> >
> >/steve
>
> Thanks for the help,
> I've been able to create a Stored Procedure to identify specific
> active connections that then I need to drop but the problem is that it
> seems that the DROP CONNECTION statement don't wotk from within SP. Is
> it correct and if so, what can I do ? If I can't manage connections
> from a SP all I'm doing is useless.
>
> Luigi