PxPlus User Forum

Main Board => Discussions => ODBC => Topic started by: ChrisKCAi on February 12, 2019, 10:45:06 AM

Title: ODBC licenses used?
Post by: ChrisKCAi on February 12, 2019, 10:45:06 AM
When accessing PxPlus data via client/server ODBC, the accessing application will sometimes be denied the connection because all available (server) licenses are in use. Is there a simple way to tell which processes (Windows) are consuming the licenses?
Title: Re: ODBC licenses used?
Post by: Devon Austen on February 12, 2019, 02:10:14 PM
Hi Chris,

The PxPlus SQL Server is a single process. Each client connection spawns a new thread and not a new process.

You can find out the IP address of all of the connected clients so you can then get them to shut down the application that is connecting to the server. To do this you can use the Windows command  netstat from the Windows command line. Look for any line that has a local address with the PxPlus SQL Server port (default 20222). This should let you know who is connected.

There is also a useful Windows program called Process Explorer (download here https://docs.microsoft.com/en-gb/sysinternals/downloads/process-explorer) that will allow you to select the server process pxpsqlsvr.exe and right click it and select properties then see all of it's TCP/IP connections. You could also figure out who is connected this way. This tool will also allow you to see a list of threads where any thread with a higher TID then the ntdll.dll timer thread should be a client connection thread. I would not recommend killing the threads as it may not clean up nicely. In a pinch if you can't get a client to disconnect this may be worth trying before restarting the whole server.