Re: Which port is Informix listening?



Nuno Paquete wrote:
Hi group,

I need to know which port is Informix listening because I need this information to configure an ODBC connection from Windows clients.
The Informix database I need to connect is running on an AIX machine.
When I run "netstat" command I get this information:


Active Internet connections
Proto Recv-Q Send-Q Local Address Foreign Address (state)
tcp4 0 0 portonova.telnet 195.23.121.26.1123 ESTABLISHED
tcp4 0 0 loopback.49213 *.* LISTEN
tcp4 0 0 loopback.smux loopback.32768 ESTABLISHED
tcp4 0 0 loopback.32768 loopback.smux ESTABLISHED


Which port is it running? 49213 or 32768?
I know that Informix database was running on this machine at the time I got the above information.


Thanks in advance,
Nuno Paquete




You need to understand how it is setup...
Each Informix instance can be listening on one or more ports (or zero, but more on this later).


With the Informix environment setup you will have 4 environment variables that are important for this:

1- INFORMIXSERVER - is the main name of the instance
2- INFORMIXDIR - product installation dir
3- ONCONFIG - name of the configuration file (located in $INFORMIXDIR/etc/ the default is $INFORMIXDIR/etc/onconfig.std)
4- INFORMIXSQLHOSTS - the sqlhosts file (default if $INFORMIXDIR/etc/sqlhosts)


You'll have to look in the $INFORMIXDIR/etc/$ONCONFIG for the lines with SERVERNAME and DBSERVERALIAS.

The value in front of SERVERNAME is the main instance name.
The names in DBSERVERALIAS are alternatives name for the instance.
This names are mapped in the $INFORMIXSQLHOSTS file to protocols and port names/numbers. Example:


main_instance_name onsoctcp   myhost   1526

This would mean that the instance has a listening port on host "myhost" at port 1526. You may have have other protocols beside TCP. One of them is shared memory which means that only local clients can connect.
In this case you won't be able to connect via ODBC from a remote client.



Besides all this, if you only have one instance, and assuming it's running Informix version 7 you can look at the oninit proceses... You'll see one which is the parent of them all. With a tool called "lsof" you can see which file descriptors it's using. In this list you'll see the TCP port numbers.


Regards/Cumprimentos.

Fernando Nunes
.



Relevant Pages

  • [HPADM] SUMMARY: Network driver cannot bind a name to the port
    ... Despite the results confirmed no process was using the port, ... The first email came from Jordan Wiseman gave me an idea. ... Indeed, after DBA reinstalled Informix, the problem is solved. ...
    (HP-UX-Admin)
  • Re: oninit fails using onsoctcp on linux
    ... I installed Informix 10 on my linux box, ... All necessary environment variables set, ... 08:55:30 IBM Informix Dynamic Server Started. ... Check if the port is free ...
    (comp.databases.informix)
  • Re: Which port is Informix listening?
    ... > Each Informix instance can be listening on one or more ports (or zero, ... > port names/numbers. ... > This would mean that the instance has a listening port on host "myhost" ... > is shared memory which means that only local clients can connect. ...
    (comp.databases.informix)
  • Re: DBIx::DBH - Perl extension for simplifying database connections
    ... database - Informix doesn't directly use host or port. ... (That's the Informix DBMS that doesn't support directly naming the ...
    (perl.dbi.users)
  • Re: Winsock1 broadcast question?
    ... and have about 5 clients listening on a ... Also, it's best to make the server listen on a specific port, such as 5555, ... you use specific ports for the clients, you will run into problems with ...
    (microsoft.public.vb.general.discussion)