ID assigned by the host computer to the process in which the client application runs. This data column is populated if the host process ID is provided by the client. To determine the host ID, use the HOST_ID function.
If you are tracing a Query Analyzer session to SQL Server, the Host Process ID in Profiler should have the same value as the SELECT HOST_ID() run from the Query Analyzer and both should return the PID of the Query Analyzer process (which still shows up as isqlw.exe in Task Manager).
When you actually perform the trace, the value that displays under the Host Process ID field in Profiler is different from the value returned by SELECT HOST_ID(). However, the value returned by SELECT HOST_ID() in the Query Analyzer matches the PID for isqlw.exe as shown by Task Manager.
Microsoft has confirmed this to be a problem in SQL Server 7.0. This problem has been corrected in U.S. Service Pack 2 for Microsoft SQL Server 7.0. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
254561 INF: How to Obtain Service Pack 2 for Microsoft SQL Server 7.0 and Microsoft Data Engine (MSDE) 1.0
For more information, contact your primary support provider.
To reproduce this problem, follow these steps:
Start SQL Server.
From the Tools menu, choose Options.
In the Trace Options dialog box, under the General tab, in the Data Columns section make sure that you select the "All data columns" option.
Click the New Trace button.
In the Trace Properties dialog box, under the General tab, name the trace Test.
Go to the Data Columns tab.
In the Unselected Data window double-click the Host Process ID column.
You should see the Host Process ID column listed in the Selected Data window.
Click OK to start the trace.
Open Query Analyzer and connect to the server.
Next, run the following query:
Note the value.
Compare the preceding value with the value in Profiler under the Host Process ID column. The two values should be different.
Open Task Manager.
Go to the Process tab.
Note the PID for the isqlw.exe program.
Compare the preceding value with the value returned when you executed SELECT HOST_ID() from Query Analyzer. The two values should be the same.