Results 1 to 5 of 5
  1. #1
    Join Date
    Apr 2007
    Posts
    3

    Unanswered: Newbie connecting to multiple Informix DB's

    I have 11 different databases to query from, each with a different IP address, name, etc. I have installed SDK, the driver version is 3.80. My problem is this:

    I have created 11 data sources, 11 entries in the hosts file also, but each data source points to the same host. If I change the host on one data source, ALL data sources change. So I can't query from 2 databases at the same time, or automate the queries, because I have to manually change the host each time. I'm able to query from all db's successfully, there are no connection problems.

    I think there's some basic idea I don't understand. Can anyone give me any ideas?

    Thanks,

    Paul B

  2. #2
    Join Date
    Aug 2006
    Location
    The Netherlands
    Posts
    248
    Hi,

    You're operating on Windows clients, I presume? Then check if there are 11 different hosts defined in the Setnet32 utility. The RegKey:
    HKEY_LOCAL_MACHINE\SOFTWARE\Informix\SqlHosts
    should contain a key for every individual machine that hosts an IDS.
    In Setnet define for every server the corresponding host.

    Regards

  3. #3
    Join Date
    Apr 2007
    Posts
    3
    Tyveleyn,

    thanks for your reply. I guess I misstated the situation. All the db's have the same name, even though they have different locations and IP addresses. So when I change the host in setnet, or the data source configuration, they all change. I can't get more than 1 db to appear in the setnet utility.

    I have 11 entries in my hosts file, but I can't figure out how to add hosts to setnet, or the registry. You are correct, I'm using Windows--SQL Server 2005 to be exact.

    Thanks for your help, any other ideas?

  4. #4
    Join Date
    Aug 2006
    Location
    The Netherlands
    Posts
    248
    Hi,

    Don't know if that's the problem but defining a new host in Setnet is a little vague. Just fill in a new hostname and credentials in the 'Host Information' tab in place of the already defined host, like in the attached 'Setnet1.bmp'. On OK you'll be asked if the new host has to be defined and OK results in the creation of a new registry key. After that define the new server for the new host in the 'Server Information' tab, like in 'Setnet2.bmp'. For that the 11 DBSERVERNAME's or DBSERVERALIASES have to be distinct (defined in onconfig.host).

    What I also don't know is how you plan to connect to the different servers from your client. The INFORMIXSERVER environment variable defines the specific IDS your client connect connects with. As far as I know this is static. With an Informix native connection it's easy to define in SQL which server to connect with but I don't know how to do it through ODBC. Perhaps with explicitly defining a datasource in your application?

    Anyway good luck with connecting,
    Hans
    Attached Thumbnails Attached Thumbnails Setnet1.bmp   Setnet2.bmp  

  5. #5
    Join Date
    Apr 2007
    Posts
    3
    Thanks Hans, I think I need to work on getting each host a unique alias. I appreciate your help.

    Regards,

    Paul

Posting Permissions

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