Go Back

Getting information on connected SQL OpenNet clients

Article Number: 2484
First Published:
Modified:
Recent Activity:
Views: 93
OS: Windows, Unix, OpenVMS
Product: xfODBC

Synergex does not provide a utility to report on connected SQL OpenNet clients (the design of vtxnetd/2 precludes this), but there are a couple of ways to get this information:

  1. vtxnetd/2 logging
  2. netstat


When SQL OpenNet is started with the log option, client IP addresses are written to the log file, which is named tcm_pid.log (where pid is the current process ID). This method is a bit cumbersome, however, and it may not be practical to have logging enabled on the server. (See vtxnetd and vtxnet2 programs in the Synergy/DE documentation for details on vtxnetd/2 logging.)


Fortunately, there is a much simpler method: use the netstat (network statistics) utility, which is included with Windows, Unix, and OpenVMS. When this command line utility is run with the -a switch, it reports on connected clients. As the netstat help (netstat -?) states, the -a option “Displays all connections and listening ports.” Note that the netstat command should be run on the machine with the SQL OpenNet service. And keep in mind that netstat -a returns a lot of information, so it might be best, for example, to pipe the output through find on Windows or grep on UNIX.


The following example shows what netstat would report for a Windows machine named ZENO with an xfODBC connection to SQL OpenNet running on the default port (1958) on a UNIX machine named bob64:


netstat -a|grep 1958

tcp       0     0 0.0.0.0:1958           0.0.0.0:*              LISTEN

tcp       0     0 bob64.mydomain.loc:1958 ZENO.mydomain.:50634 ESTABLISHED



THE INFORMATION PROVIDED TO YOU IN THIS SERVICE IS FOR YOUR USE ONLY. THE INFORMATION MAY HAVE BEEN DEVELOPED INTERNALLY BY SYNERGEX OR BY EXTERNAL SOURCES. SYNERGEX MAKES NO WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS INFORMATION, INCLUDING THE WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SYNERGEX BE LIABLE FOR ANY DAMAGES OR LOSSES INCURRED BY YOU IN USING OR RELYING ON THIS INFORMATION, INCLUDING WITHOUT LIMITATION GENERAL DAMAGES, DIRECT, INCIDENTAL, SPECIAL OR CONSEQUENTIAL DAMAGES, OR LOSS OF PROFITS, EVEN IF SYNERGEX HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
Please log in to comment on this article.