I am suspecting this is a dumb question, and I'm actually hoping it is.
Is there a way to tell which users that have access to a database are being
used to connect to the database through an application and which ones are
being used locally(someone logging into the box and then doing sudo su - user
to access database)?
↪ replying to BENJI LONG
Hi Benji.
If you mean "currently connected to your Informix engine", yes.
An onstat -g ses will show you local connected users using a tty which is not
a machine name (tty/1, tty/3, or even the informix server hostname, if they
are using ssh to connect to the server.
All external connections are shown with its hostname or ip address in hostname
column, and also on tty column (uppercased).
If you want a more specific way to get this kind of information, a simple
select on sysmaster:syssessions would ease your investigation a lot, instead
of onstat command.
HTH
Best regards.