Finding the Informix Dynamic Server Port Number on Linux

Note: This is publication is now archived. For reference only.

Published 27 June 2003, updated 29 December 2006

More options

Rate and comment

Authors: Chuck Ballard

Abstract

This tip provides information to help determine the Linux port number to use for Informix Dynamic Server when integrating with WebSphere.

Contents

For a Java developer using WebSphere Studio Application Developer, one of the most important things to know is how to connect to the database server that interacts with the application. Typically, you should contact the database administrator and get all the necessary information, such as:

1. Host name
2. IDS server (instance) name
3. Database name
4. TCP/IP port number
5. User name and password with the necessary privileges

Most of this information has to be given by the database administrator, but you may be able to find some of the information yourself. In this section we show how to find the port number configured for an IDS server instance.

Steps to find the port number

1. Log into the Linux server with the user ID that was given by the database administrator (in our case, itso).

2. Open the sqlhosts file. You have to know the location of this file since it can be in any directory, using the INFORMIXSQLHOSTS environment variable. You must ask your database administrator if this variable is set. If so, get the value stored and open the file:


    # vi $INFORMIXSQLHOSTS

If INFORMIXSQLHOSTS is not configured the server uses the default file, so open it up using vi:

    # vi $INFORMIXDIR/etc/sqlhosts

3. Locate the correspondent entry of the instance name. The instance name is stored in the first column of the entry and the service name (port number) is stored on the forth column. In this case we have demo_on as the server name and demo_on_tcp as the service name.

Locate the correspondent entry of the instance name

4. Now that we know the service name we need to find out the TCP/IP port assigned to it. To do that open the /etc/services file.


    # vi /etc/services

5. Search for service demo_on_tcp in the /etc/services file and find the port number. In our case the port 1533 is assigned to demo_on_tcp. Here are the port number and service name that have to be used in your application.

Search for service demo_on_tcp in the /etc/services file


Special Notices

This material has not been submitted to any formal IBM test and is published AS IS. It has not been the subject of rigorous review. IBM assumes no responsibility for its accuracy or completeness. The use of this information or the implementation of any of these techniques is a client responsibility and depends upon the client's ability to evaluate and integrate them into the client's operational environment.

Follow IBM Redbooks

Follow IBM Redbooks