Host Processes and SPIDs explained

Question

In the context of a Jiwa connection to the database, what is the Host Process and what is the SPID?



Answer

The host process refers to the application connected to the database.  If Jiwa is running, it will have a host process reference number. If Excel or MS Access are directly connected to the database, they will each have their own host process.

If a user is running more than one Jiwa application, on the same or different machines, each Jiwa will have a different host process number.

The SPID is the unique ID for the SQL connection. 

  • The Jiwa host process will have a SPID for the SQL connection. 

  • A search window inside Jiwa has it's own SQL connection so will have a different SPID for the same host process. 

  • Reports also have their own SQL connection, however Crystal Reports handles these connections so they won't have the same HostProcess or HostName as the Jiwa application (program_name for Crystal Reports connections within Jiwa is 'Jiwa 7 ', whereas the Jiwa application itself is 'Jiwa Financials.%LicenceID%.%UserName%'). 

  • The login screen also has it's own connection to retrieve credentials before the user logs on.  This connection is killed as part of the login process, but there may be a time delay so there's the potential for a transient second SPID with the one host process.

  • Reports when printed from Jiwa will create it's own connection with the same HostProcess but different SPID as the Jiwa Application.  Each report will have it's own SPID and will remain even when the report is closes until all reports in Jiwa have been closed, at which point all SPID's related to reports for the process will disappear.

  • Services, like the Jiwa Plugin Scheduler Service and the Jiwa API service, have their own SQL connection and therefore SPID.

How can a user avoid multiple Jiwa host processes?

The most common reason why a user might have multiple host processes is because they've left Jiwa running when they've disconnected from a remote desktop.

Using X on the connection bar at the top of your screen merely disconnects you from the remote server.  It doesn't close what you were doing on that server.  In fact, it still leaves you logged in to the server.  Make sure you Exit Jiwa first, then sign-off properly using the Windows menu. 

How do you avoid creating multiple SPIDs for a Jiwa host process?

Multiple SPIDs for a host process are not necessarily a problem.  If you're experiencing performance issues though, make sure your users are exiting Jiwa properly.  Our advice is to always use the Exit button in the bottom right of the Jiwa screen.

  • Right-mouse click on the key and padlock

  • Select Exit

Remember, Logout will exit your current session but immediately launch the Login screen again (to facilitate switching between users). This screen itself has created a new connection to the database.