If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > Newbie connecting to multiple Informix DB's

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-11-07, 16:16
pbibler pbibler is offline
Registered User
 
Join Date: Apr 2007
Posts: 3
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
Reply With Quote
  #2 (permalink)  
Old 04-12-07, 03:44
Tyveleyn Tyveleyn is offline
Registered User
 
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:
Quote:
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
Reply With Quote
  #3 (permalink)  
Old 04-12-07, 09:10
pbibler pbibler is offline
Registered User
 
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?
Reply With Quote
  #4 (permalink)  
Old 04-12-07, 14:42
Tyveleyn Tyveleyn is offline
Registered User
 
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 Images
File Type: bmp Setnet1.bmp (1,008.6 KB, 42 views)
File Type: bmp Setnet2.bmp (1,000.8 KB, 46 views)
Reply With Quote
  #5 (permalink)  
Old 04-13-07, 09:14
pbibler pbibler is offline
Registered User
 
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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On