Subject Better way to know connected users ?(application manages users)
Author Kamlesh
Dear Friends

my application manages all users and their rights.(thats the need)

1. application connects to database as sysdba.
2. inserts a record to LoggedUser table and place a update lock
(without commiting)to that record to signal liveness of the user and
when user disconnects nornally entry in LoggedUser table is deleted.
3. if another user is able to lock the same record it means that user
is disconnected abnormally, then entry is deleted.

this way i m limiting connections and can always know who is live.

but it needs long running transaction (till user disconnects).

is there any problem with this ?
is there any better way ?

is there any way to know connection id (CURRENT_CONNECTION) of all
present connections ?


Thanks
Kamlesh