Kbase P20925: How to determine user id for a Progress session by using the VST's
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  07/11/2007 |
|
Status: Verified
GOAL:
How to determine user id for a Progress session from the VST's
GOAL:
How to identify which users are connected to a database?
GOAL:
How to use the VST table _Connect to see which processes or users are connected to a database?
FIX:
The _Connect table which is a VST (Virtual System Table) that exists within a Progress Database contains information associated with user processes connected to the database. This table contains information like but not limited to who is connected to a database, the user name, pid (process id) as well as connection time and connection type as well as the processes user number. For a complete listing of fields within the _Connect Virtual System Table, refer to the OpenEdge Data Management: Database Administration Guide.
The following is a piece of 4GL code that makes use of the _Connect VST for the purpose of identifying a user connected to a Progress database as well as the users name, pid (process id) and user number. This information can be used to programmatically identify which users are connected to a database.
FIND FIRST _File WHERE _File-Name = "_Connect" NO-ERROR.
IF AVAILABLE(_File) THEN
FOR EACH _Connect WHERE _Connect-Pid <> INT(?) AND _Connect-Usr <> INT (?) AND _Connect-Name <> (?).
DISPLAY _Connect-Pid _Connect-Usr _Connect-Name.
END.