Two simultaneous connections to Informix DBs on different servers
Posted in 2000
Topics: Connectivity: ODBC / JDBC / .NET, Versions, Editions & End-of-Life
I am developing a client application running on Windows98 or NT WS and I need to connect to two Informix Databases simultaneously each on a different SUN server. Informix tells me it cannot be done (seems like a significant limitation to me). I have found bits and pieces in the archives about the ability to do this, however, I haven't been able to piece together exactly how to do it. Does anyone know how? I am using informix 3.30 32 bit ODBC Driver on the workstation and developing the app in VB6 using ADO. The Servers are running IDS 7.2. John
Hi! This might be a limitation of ODBC. However, you can solve this by creating sysnonyms to the second server from the first and then just open one database and access the data. HTH Michael John Svercek wrote: > I am developing a client application running on Windows98 or NT WS and I > need to connect to two Informix Databases simultaneously each on a different > SUN server. Informix tells me it cannot be done (seems like a significant > limitation to me). I have found bits and pieces in the archives about the > ability to do this, however, I haven't been able to piece together exactly > how to do it. > > Does anyone know how? > > I am using informix 3.30 32 bit ODBC Driver on the workstation and > developing the app in VB6 using ADO. The Servers are running IDS 7.2. > > John
Actually it is quite simple once I understood who talks to whom and how. I
am kind of disappointed that informix support couldn't tell me this.
On the servers the dbservernames must be different (or have different
aliases) and they must listen on different ports. So you have the following
sqlhosts entries for System A:
a onipcshm mysysa a
a_gui ontlitcp mysysa sqlexeca
sqlhosts entry for System B:
b onipcshm mysysb b
b_gui ontlitcp mysysb sqlexecb
(actually a and b could both be the same, however, a_gui and b_gui must be
different and their ports must be differnt)
services entry for System A:
sqlexeca 1525/tcp
services entry for System B:
sqlexecb 1526/tcp
onconfig entry for System A:
DBSERVERNAME a
DBSERVERALIASES a_gui
onconfig entry for System A:
DBSERVERNAME b
DBSERVERALIASES b_gui
(again a and b could be identical but a_gui and b_gui must be different)
On the client you need to define two servers with different ports. So you
have the following
in th Services file
sqlexeca 1525/tcp
sqlexecb 1526/tcp
in SetNet
Environment variables
INFORMIXDIR=C:\\informix (or whatever the path is)
INFORMIXSERVER=a_gui (doesn't seem to matter)
Server Info - set up two servers
FIRST SERVER PARMS
Informix Server a_gui
HostName mysysa
Protocolname onsoctcp
Service Name sqlexeca
Current Host mysysa
User Name myuser
Password Option (your choice)
Password ******
SECOND SERVER PARMS
Informix Server b_gui
HostName mysysb
Protocolname onsoctcp
Service Name sqlexecb
Current Host mysysb
User Name myuser
Password Option (your choice)
Password ******
Now you can define an ODBC connection to each of these servers
FIRST ODBC CONNECTION
Data Source Name adb
Server Name a_gui
** Remaining parameters will default to a_gui setings except userid &
password
SECOND ODBC CONNECTION
Data Source Name bdb
Server Name b_gui
** Remaining parameters will default to b_gui settings except userid &
password
Finally you can get to the fun stuff of writing code that can connect to
both systems simultaneously.
Simple isn't it?
John
John Svercek <svercek@attglobal.net> wrote in message
news:RXey4.12664$VM.69179@typhoon.tampabay.rr.com...
> I am developing a client application running on Windows98 or NT WS and I
> need to connect to two Informix Databases simultaneously each on a
different
> SUN server. Informix tells me it cannot be done (seems like a significant
> limitation to me). I have found bits and pieces in the archives about the
> ability to do this, however, I haven't been able to piece together exactly
> how to do it.
>
> Does anyone know how?
>
> I am using informix 3.30 32 bit ODBC Driver on the workstation and
> developing the app in VB6 using ADO. The Servers are running IDS 7.2.
>
> John
>
>
>Subject: Two simultaneous connections to Informix DBs on different servers >From: "John Svercek" svercek@attglobal.net >Date: 10.03.00 23:47 W. Europe Standard Time >Message-id: <RXey4.12664$VM.69179@typhoon.tampabay.rr.com> > >I am developing a client application running on Windows98 or NT WS and I >need to connect to two Informix Databases simultaneously each on a different >SUN server. Informix tells me it cannot be done (seems like a significant >limitation to me). I have found bits and pieces in the archives about the >ability to do this, however, I haven't been able to piece together exactly >how to do it. > >Does anyone know how? > >I am using informix 3.30 32 bit ODBC Driver on the workstation and >developing the app in VB6 using ADO. The Servers are running IDS 7.2. > >John > JDK 1.2 and JDBC 2.10 can do that. Nona