Skip to main content

Finding the Informix Dynamic Server Port Number on Linux

Web Doc

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


Published on 27 June 2003, updated 29 December 2006

  1. View in HTML

Share this page:   

IBM Form #: TIPS0195

Authors: Chuck Ballard

    menu icon


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


    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:


    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

    The material included in this document is in DRAFT form and is provided 'as is' without warranty of any kind. IBM is not responsible for the accuracy or completeness of the material, and may update the document at any time. The final, published document may not include any, or all, of the material included herein. Client assumes all risks associated with Client's use of this document.