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.

Limit Concurent logins for each user.

2 posts in General Discussion Last posting was on 2004-03-02 15:52:48.0Z
gjohnson Posted on 2004-03-02 15:21:03.0Z
Sender: 39b1.4044a63d.1804289383@sybase.com
From: gjohnson@intellimed.com
Newsgroups: ianywhere.public.general
Subject: Limit Concurent logins for each user.
X-Mailer: WebNews to Mail Gateway v1.1s
Message-ID: <4044a65f.39b3.846930886@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 2 Mar 2004 07:21:03 -0800
X-Trace: forums-1-dub 1078240863 10.22.241.41 (2 Mar 2004 07:21:03 -0800)
X-Original-Trace: 2 Mar 2004 07:21:03 -0800, 10.22.241.41
Lines: 6
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:2684
Article PK: 6153

I have an ASA 9 database I know how to limit total
connections to the database using login_check. How can I
limit connections for each user ID. In example I want User
ID "test" to only be able to connect to the database once.

Thanks.


David Fishburn Posted on 2004-03-02 15:52:48.0Z
Newsgroups: ianywhere.public.general
Subject: Re: Limit Concurent logins for each user.
From: David Fishburn <fishburn_spam_off@ianywhere.com>
References: <4044a65f.39b3.846930886@sybase.com>
Organization: iAnywhere Solutions
Message-ID: <Xns94A06E7B51381fishburnsybasecom@10.22.241.106>
User-Agent: Xnews/06.08.25
NNTP-Posting-Host: 172.31.141.3
X-Original-NNTP-Posting-Host: 172.31.141.3
Date: 2 Mar 2004 07:52:48 -0800
X-Trace: forums-1-dub 1078242768 172.31.141.3 (2 Mar 2004 07:52:48 -0800)
X-Original-Trace: 2 Mar 2004 07:52:48 -0800, 172.31.141.3
Lines: 35
X-Authenticated-User: techsupp
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:2687
Article PK: 6158

gjohnson@intellimed.com wrote in news:4044a65f.39b3.846930886@sybase.com:

g> I have an ASA 9 database I know how to limit total
g> connections to the database using login_check. How can I
g> limit connections for each user ID. In example I want User
g> ID "test" to only be able to connect to the database once.

Doing the same code, you can check if that userid has already logged in.
select 1
from sa_conn_info()
where ... = your user_id.

There are other ways than using sa_conn_info, but that was a simple
example.
--
David Fishburn
Certified ASA Developer Version 8
iAnywhere Solutions - Sybase
Professional Services
Please only post to the newsgroup
Please ALWAYS include version and MORE importantly BUILD number with
EACH post (dbeng9 -v).

EBFs and Maintenance Releases
http://downloads.sybase.com/swx/sdmain.stm

Developer Community / Whitepapers
http://www.ianywhere.com/developer

CaseXpress - to report bugs
http://casexpress.sybase.com

CodeXchange - Free samples
http://ianywhere.codexchange.sybase.com/servlets/ProjectDocumentList