Brian Tkatch wrote:
alessandro menchini wrote:
>Hello,
i have a problem determining the workstation name of the client user.
i try to do a
SELECT CURRENT CLIENT_WRKSTNNAME .....
but i get an empty string.
I read the manual (SQL Reference 1)...and it says that i must use the
API sqleseti to
set the CLIENT_WRKSTNNAME variable...
But...how can i do that from SQL ?
It's possible to call sqleseti from command line?
or i must write a C function?
Use VALUES like this: VALUES CLIENT WRKSTNNAME
By default it is blank. It must be set by that API call.
I believe that's sqleseti()
Alternatively, you could use the application id (from function
APPLICATION_ID()), parse the IP address encoded therein and then do an
nslookup (C function gethostbyname()). This is also described here:
http://tinyurl.com/9sjqh
--
Knut Stolze
DB2 Information Integration Development
IBM Germany