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 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.
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?