Unix Technical Forum

Which port is Informix listening?

This is a discussion on Which port is Informix listening? within the Informix forums, part of the Database Server Software category; --> Hi group, I need to know which port is Informix listening because I need this information to configure an ...


Go Back   Unix Technical Forum > Database Server Software > Informix

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-20-2008, 09:28 AM
Nuno Paquete
 
Posts: n/a
Default Which port is Informix listening?

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


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-20-2008, 09:28 AM
Neil Truby
 
Posts: n/a
Default Re: Which port is Informix listening?

"Nuno Paquete" <nmp@ispgaya.pt> wrote in message
news:4364b031$0$22093$a729d347@news.telepac.pt...
> 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.



Possibly both.

Can you send the output of:

onstat -c | grep -i server
and
cat $INFORMIXDIR/etc/sqlhosts




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-20-2008, 09:28 AM
Fernando Nunes
 
Posts: n/a
Default 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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-20-2008, 09:28 AM
Nuno Paquete
 
Posts: n/a
Default Re: Which port is Informix listening?

> 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


Hi,

Now I understand a little bit more of Informix.
Here is the result of /informix/etc/sqlhosts file:
porto onipcshm portonova sqlexec
lisboa onipcshm portonova lis_sqlexec
euro onipcshm portonova euro_sqlexec

I search inside /etc/services and efectively there is a declaration of
that services (sqlexec, lis_sqlexec and euro_sqlexec), I suppose this
was appended manualy.

> 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.


I think the server is using shared memory. Do you think that I can't
access Informix database using ODBC? And is it possible to access the
database using .NET libraries?

Thanks again,
Nuno Paquete

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-20-2008, 09:29 AM
Fernando Nunes
 
Posts: n/a
Default Re: Which port is Informix listening?

Nuno Paquete wrote:
>>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

>
>
> Hi,
>
> Now I understand a little bit more of Informix.
> Here is the result of /informix/etc/sqlhosts file:
> porto onipcshm portonova sqlexec
> lisboa onipcshm portonova lis_sqlexec
> euro onipcshm portonova euro_sqlexec
>
> I search inside /etc/services and efectively there is a declaration of
> that services (sqlexec, lis_sqlexec and euro_sqlexec), I suppose this
> was appended manualy.
>
>
>>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.

>
>
> I think the server is using shared memory. Do you think that I can't
> access Informix database using ODBC? And is it possible to access the
> database using .NET libraries?
>
> Thanks again,
> Nuno Paquete
>


From that sqlhosts file it clearly is using only shared memory.
In this case you won't be able to connect from a remote server
independently from the technology you use.


You would have to request the Informix admin to activate a DBSERVERALIAS
using TCP/IP. After that you can connect with ODBC, OLEDB, JDBC and
..NET (the .NET provider has a few problems, but as far as I know are
performance related (and were recently discussed here).

All the drivers you need are included in a package called Informix
Client SDK. The version should be around 2.90. I'm not really sure if it
includes the JDBC driver...

Regards.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 04-20-2008, 09:29 AM
Nuno Paquete
 
Posts: n/a
Default Re: Which port is Informix listening?

Hi,

"You would have to request the Informix admin to activate a
DBSERVERALIAS
using TCP/IP. After that you can connect with ODBC, OLEDB, JDBC and
..NET..."

I've got root access to the system. How can I do that?
Do I have to append any line to sqlhosts file?
Can you tell me how can I activate DBSERVERALIAS?
Will this changes affect previous settings? I mean, we've got an
application that was developed by another company, that app was
develped using C language and is installed on client machines
(Windows). That application accesses an Informix database. I don't want
to affect negatively the app, because it is very important to my
company.
Now I want to develop another application (using .NET) that will use
the tables of the Informix database.
Any help would be very appreciated.

Regards,
Nuno Paquete

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 04-20-2008, 09:30 AM
Fernando Nunes
 
Posts: n/a
Default Re: Which port is Informix listening?

Nuno Paquete wrote:
> Hi,
>
> "You would have to request the Informix admin to activate a
> DBSERVERALIAS
> using TCP/IP. After that you can connect with ODBC, OLEDB, JDBC and
> .NET..."
>
> I've got root access to the system. How can I do that?
> Do I have to append any line to sqlhosts file?
> Can you tell me how can I activate DBSERVERALIAS?


You would have to change your sqlhosts and your onconfig, and then stop
and start the instance... but read ahead...

> Will this changes affect previous settings? I mean, we've got an
> application that was developed by another company, that app was
> develped using C language and is installed on client machines
> (Windows). That application accesses an Informix database. I don't want
> to affect negatively the app, because it is very important to my
> company.


If you have clients accessing the database remotely than you must have a
listener on a TCP port. And your sqlhosts file must have more then
you've show. Are you sure you're looking at the correct sqlhosts file?
Don't you have the INFORMIXSQLHOSTS variable pointing to another file?

> Now I want to develop another application (using .NET) that will use
> the tables of the Informix database.
> Any help would be very appreciated.


All this changes are easier to make, but if you're not used to do it,
you can make a mistake that could harm your environment. And I don't
feel confortable "teaching" you, because I may overlook something and
this together with your lack of knowledge in the Informix environment
can cause troubles... You should get help from someone with access to
the environment.

Besides this, everything I've written assumes you're using Informix
Dynamic Server 7, 9 or 10. If you're using other IBM informix database
the scenario can change.

Regards.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 10:25 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com