Mark:
For clients connecting with a user id & pwd the server or trusted connection the user has to have a local login with the same user name. The engine does a getuser() call to validate and gets the uid from there. For mapped users, the uid will that of the local template user. All regardless of whether the client is running on Linux/Unix or Windows. If Kerberos or other authentication was used, I don't know where the uid would be coming from or how you would look it up. For Linux/Unix based servers, for most uid's just grep /etc/passwd:
art@Elezar-II:~$ grep 1000 /etc/passwd
------------------------------
Art S. Kagel, President and Principal Consultant
ASK Database Management Corp.
www.askdbmgt.com------------------------------
Original Message:
Sent: Tue March 21, 2023 01:42 PM
From: Mark Scranton
Subject: SQLTRACE uid mapping
Thanks Art. I haven't "overthinked" (sic) anything since uh, yesterday.
So for windows client or a web app coming in with a connection string/passwd embedded - where does UID come from in those cases?
Any thoughts on Q#2 n original thread? May just be a syntax issue ... if so, nevermind, I'll work through it eventually.
Thanks!
------------------------------
Thanks!
Mark Scranton
The Mark Scranton Group
mark@markscranton.com
------------------------------
Original Message:
Sent: Tue March 21, 2023 11:32 AM
From: Art Kagel
Subject: SQLTRACE uid mapping
Mark:
You are overthinking this one. The sql_uid is the OS user id for the connected user:
informix@Elezar-II:~$ dbaccess sysmaster -
> select * from syssqltrace where sql_database = 'art';
sql_id 65
sql_address 1501114952
sql_sid 90
sql_uid 1000
sql_stmttype 1
sql_stmtname DATABASE
sql_finishtime 1679412473
sql_begintxtime 1210465378
sql_runtime 0.00246567244
...
art@Elezar-II:~$ id
uid=1000(art) gid=1000(art) groups=1000(art),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),122(lpadmin),133(lxd),134(sambashare),1001(informix)
------------------------------
Art S. Kagel, President and Principal Consultant
ASK Database Management Corp.
www.askdbmgt.com