Checking The Number Of Users Connected During A Session

Zadock

New Member
Hi All,

Assuming I have a 5 user database running, and all the 5 users are active. If the 6th person tries logging into my application, I want the system to bring up an error that the system is fully logged in and so this 6th user should wait and log in later.

How do I achieve this?

Thanks in advance.

Regards

Zadock
 

Rob Fitzpatrick

ProgressTalk.com Sponsor
You can achieve this with the _Connect VST. It contains one record for every possible user connection and it has fields that let you distinguish which connection slots are currently in use and which types of users they are: brokers, servers, background processes, self-service 4GL clients, remote 4GL clients, SQL clients, utilities, etc.

Iterate over the connection types you care about and count them. Example:
Code:
for each dictdb._connect no-lock
  where _connect._connect-type = "SELF"
     or _connect._connect-type = "REMC":
  v-count = v-count + 1.
end.

if v-count > 5 then
  /* give user the bad news */
 

tamhas

ProgressTalk.com Sponsor
First, you need to define "user". Is it going to match PSC's definition of Named User or Registered Client or something else. Then you need to implement logic and database that reflects that definition and provide management tools including how to notice that a user has disconnected in some way without logging in. There is nothing built in to manage this for you. In fact, to the extent that Progress is measuring something like this, it measures connections, i.e., if one user has three sessions open on one device, the data base sees that as 3 connections even though it is only one *user* under any of the license models. If connections is good enough for you, then you can limit connections with the -n start up parameter, but be aware that batch processes and the like will consume those connections too.
 
Top