sessid or other connection info in SELECT
Posted in 2004
Topics: SQL Development & Query Writing, Connectivity: ODBC / JDBC / .NET
We have applications that access Informix (IDS 2000 Version 9.21 on Unix) via generic usernames. When a table is updated via one of these applications, I am looking for a way to tie, within Informix, the actual user with the change. If there is something similar to SELECT USER, but for some other parameter, like sessid, related to a connection, that would work -- or if there is a way to pass data via the connection string that can be picked up in a SELECT statement, that would work, too. Has anyone addressed this? Thanks. -Mike Gage
Mike, isn't DBINFO what you need: select dbinfo("sessionid") ... Nebojsa On 23 Mar 2004 12:51:24 -0800, mgage@talx.com (Mike Gage) wrote: >We have applications that access Informix (IDS 2000 Version 9.21 on >Unix) via generic usernames. When a table is updated via one of these >applications, I am looking for a way to tie, within Informix, the >actual user with the change. If there is something similar to SELECT >USER, but for some other parameter, like sessid, related to a >connection, that would work -- or if there is a way to pass data via >the connection string that can be picked up in a SELECT statement, >that would work, too. > >Has anyone addressed this? > >Thanks. > >-Mike Gage ------------------------------------ Remove spam block (DELETE_) to reply
mgage@talx.com (Mike Gage) wrote: >We have applications that access Informix (IDS 2000 Version 9.21 on >Unix) via generic usernames. When a table is updated via one of these >applications, I am looking for a way to tie, within Informix, the >actual user with the change. Interesting question. We are presently considering a conversion from our current individual-user-based approach (which means having to administer access privileges on a per-user basis) to a generic-user- approach, but are hesitating for the same reason. >If there is something similar to SELECT >USER, but for some other parameter, like sessid, related to a >connection, that would work How would sessid help you? You'd still have to find a way to tie a session id to an individual user or process accessing the database. We are not so much looking for the capability to trace changes in data to individual users, but we need to be able to identify which user or process uses up which resources. Since we are in a client-server environment, how could we link an Informix session on the database server to a user or process on a client machine? >-- or if there is a way to pass data via >the connection string that can be picked up in a SELECT statement, >that would work, too. I am not aware of such extra parameters. Regards, Richard -- +-------------------------------+-------------------------------+ | Dr. med Richard Spitz | Tel : +49-89-7095-6110 | | Klinik f'r Anaesthesiologie | FAX : +49-89-7095-6420 | | Klinikum der Univ. M'nchen | Page: +49-89-7095-789-2116 | | 81366 M'nchen, Germany | | +-------------------------------+-------------------------------+