GetConnectedUsers: IConnectedUsersInfo;
The GetConnectedUsers method enables getting information about the users that are connected to the repository.
NOTE. The Oracle server should have the Select grant on the V_$SESSION view for the user, that performs viewing or disconnecting of the users that are connected to the repository.
Sub Main;
Var
MB: IMetabase;
Users: IConnectedUsersInfo;
User: IConnectedUserInfo;
Begin
MB := MetabaseClass.Active;
Users := MB.GetConnectedUsers;
For Each User In Users Do
Debug.WriteLine("Station: " + User.HostName + "; MAC-address: " + User.NetAddress);
Debug.WriteLine("DBMS user: " + User.UserDbName + "; OS user: " + User.UserOsName);
End For;
End Sub Main;
After executing the example information about all users, connected to the current repository, is displayed in a development environment console.
See also: