pssinfo

Description

Returns information from the Adaptive Server process status structure (pss).

Syntax

pssinfo(spid | 0, 'pss_field')

Parameters

spid

is the process ID. When you enter 0, the current process is used.

pss_field

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.

Examples

Example 1

Displays the port number for spid number 14

select pssinfo(14,'ipport')
----------------
           52039

Usage

Permissions

The permission checks for pssinfo differ based on your granular permissions settings.

Granular permissions enabled

With granular permissions enabled, you must be the owner of the proccess ID, or have manage server permission to execute pssinfo.

Granular permissions disabled

With granular permissions disabled, you must be the owner of the process ID, or be a user with sa_role or sso_role to execute pssinfo.