host_id

Description

Returns the client computer’s operating system process ID for the current Adaptive Server client.

Syntax

host_id()

Parameters

None.

Examples

Example 1

In this example, the name of the client computer is “ephemeris” and the process ID on the computer “ephemeris” for the Adaptive Server client process is 2309:

select host_name(), host_id()
----------------------------- -----------------------
 ephemeris                    2309

The following is the process information, gathered using the UNIX ps command, from the computer “ephemeris” showing that the client in this example is “isql” and its process ID is 2309:

2309 pts/2    S  0:00 /work/as125/OCS-12_5/bin/isql

Usage

Standards

ANSI SQL – Compliance level: Transact-SQL extension.

Permissions

Any user can execute host_id.

See also

Documentation Transact-SQL Users Guide

Function host_name