Returns the client computer’s operating system process ID for the current Adaptive Server client.
host_id()
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
host_id, a system function, returns the host process ID of the client process (not the server process).
For general information about system functions, see “String functions”.
ANSI SQL – Compliance level: Transact-SQL extension.
Any user can execute host_id.
Function host_name
Copyright © 2005. Sybase Inc. All rights reserved. |