Subject RE: [ib-support] Counting users
Author Leyne, Sean
Brad,

> I know I could write an entry to a table when users connect
> and then remove
> it when they disconnect but this is so fraught with perils I
> hate to do it!

This would be the 'best' approach -- you could make the process more
intelligent by updating the usage data on a timed basis (in a thread),
such that entries which have not been updated (last updated 16 minutes
ago but the update interval is 15 minutes) can be deleted from the list.
That way the user/login count is accurate.

Remember that IB really only counts/restricts connections which is not
the same thing as users, since a number of application use many-many
connections.

Additionally, depending on the design of your application, an
application user might not match up to a DB user (for our applications,
user login using a unique userid but the application connects to the
database using common/hidden user/password). Also, in the case of
multi-tier application the application server usually pool connections
which have been openned using a common username/password. You want to
count application users/logins, not database connections.


Sean