Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2008
    Posts
    1

    Unanswered: Unable to connect to informix server

    Hi,

    My informix server is running in UNIX machine ( sabik).
    I am try to connect with informix server from client machine (Unix) using following java code.

    url ="jdbc:informix-sqli://sabik:1542/netballs_client:INFORMIXSERVER=sabik_940"
    Connection con=DriverManager.getConnection(url, "schidha","january1@");

    I am getting error,

    java.sql.SQLException: com.informix.asf.IfxASFException: Attempt to connect to database server failed.


    Whether i have to add the IP address of informix server into client machine (Obelix) in somewhere?

    Please can you help me to solve this issue

    Thanks

    Suresh C
    Last edited by sureshaathirai; 08-05-08 at 09:00.

  2. #2
    Join Date
    Apr 2007
    Location
    Jundiai / SP - Brasil
    Posts
    311

    Post

    I never worked with JDBC (i hate Java) , but...
    To connect to IDS you need to configure at least 4 things:
    1) dbservername (=sabik_940)
    2) protocol (default onsoctcp to JDBC )
    3) hostname ( = sabik )
    4) TCP portnumber (= 1542)

    To make sure you can access the database execute this tests, on the command line:
    1) ping the server by name to discover if the name are resolved by DNS: ping sabik
    2) execute a telnet on the port of database: telnet sabik 1542
    the connection must be accept (to close the conection press "CONTROL+[" )
    3) make sure the database name is "netballs_client" and the user have GRANT CONNECT
    4) if all this work well, get the error number with some this functions:
    v getMessage()
    Returns a description of the error
    SQLException inherits this method from the java.util.Throwable class.
    v getErrorCode()
    Returns an integer value that corresponds to the Informix database server or
    IBM Informix JDBC Driver error code
    v getSQLState()
    Returns a string that describes the SQLSTATE value
    The string follows the X/Open SQLSTATE conventions.
    look for more information on the JDBC of CSDK manual:
    http://publib.boulder.ibm.com/infoce...g.doc/jdbc.htm
    ________________________________________
    César Inacio Martins
    Jundiai / SP - Brasil
    http://www.imartins.com.br/informix - em Português
    http://www.imartins.com.br/informix - English (translated by Google).
    ________________________________________

  3. #3
    Join Date
    Apr 2007
    Location
    Jundiai / SP - Brasil
    Posts
    311
    I forgot..

    make sure your DB server name is sabik_940 and on side of the server if it are configured with the same hostnam/protocol/port on the sqlhosts.
    ________________________________________
    César Inacio Martins
    Jundiai / SP - Brasil
    http://www.imartins.com.br/informix - em Português
    http://www.imartins.com.br/informix - English (translated by Google).
    ________________________________________

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •