Returns information from the Adaptive Server process status structure (pss).
pssinfo(spid | 0, 'pss_field')
is the process ID. When you enter 0, the current process is used.
is the process status structure field. Valid values are:
dn – distinguished name when using LDAP authentication.
extusername – when using external authentication like (PAM, LDAP), extusername returns the external PAM or LDAP user name used.
ipaddr – client IP address.
ipport – client IP port number used for the client connection associated with the user task being queried.
isolation_level – isolation level for the current session.
tempdb_pages – number of tempdb pages used.
Displays the port number for spid number 14
select pssinfo(14,'ipport')
---------------- 52039
The pssinfo function also includes the option to display the external user name and the distinguish name.
ipport output, combined with ipaddr output, allows you to uniquely identify network traffic between Adaptive Server and the client.