RE: Re: Informix and SQL Server
Posted in 2005
we have a similar situation, we have not installed any unix odbc drivers on our unix machine, this is what i do, which works pretty well,
- created import dts package to pull the informix tables in sqlserver with the following settings for Data Source "OLE DB Provider for ODBC Driver" on windows (not on unix) and used informix odbc driver which i believe comes with the sqlserver engine
- run the dts package just before running the query
the dts import packages pulls informix data and loads it to the sqlserver database at the rate of around 3000 rows/second (which is not too bad).
-----Original Message-----
From: owner-informix-list@iiug.org
[mailto:owner-informix-list@iiug.org]On Behalf Of Jean Sagi
Sent: Tuesday, February 15, 2005 10:31 PM
To: datagoob@netscape.net
Cc: informix-list@iiug.org
Subject: Re: Re: Informix and SQL Server
Oh my!
I just want to join some simple tables... the trouble is that one is in Informix the other is in Sql_server... so DTS help to translate Informix data to a temporary SqlServer table.
So if I could do something like
SELECT *
FROM informix_table a
inner join sql_server b on (a.pk=b.pk);
I would be really happy.
My IDS is in HP-UX, so freetds/UnixODBC works on hp-ux?
J.
But OTOH just for learning is good to know about OLE DB, how it compares to ODBC. Id in the process I could do a join like the one before... it will be gladlt welcome.
In this path what you mention give a lots of oportunity to learn more.
-----Original Message-----
From: Data Goob <datagoob@netscape.net>
To: informix-list@iiug.org
Date: Tue, 15 Feb 2005 21:55:17 -0500
Subject: Re: Informix and SQL Server
Based on your comments, doing a direct-connect appears to be fraught
with enough risk that maybe you should just unload then load data
between servers. A bit cumbersome, but perhaps more reliable than
depending on gateway products that may or may not work.
I don't know much about OLEDB or ODBC other than to say that they will
give you a performance hit on load/unload to/from your database, and
DTS packages are notoriously slow. You also have to consider __where__
the DTS package will run, as it uses local resources--this means be
careful not to run it on a low-end workstation if you're interested
in speed. Also keep in mind SQL-Server is going to stay logged,
and you cannot turn off logging, so you have to deal with that.
The fastest/bestest way if I were doing it is to unload to disk, then
bcp to SQL-Server especially if your data volumes are large. If time
or performance are not an issue, then ODBC might be what you want, using
commercial ODBC drivers on both servers. Alternatively I'd even be tempted
to write perl scripts to do the loading into SQL-Server, just to do the data
conversions accurately.
If you go ODBC, then I'd assume you're running Informix on a UNIX or Linux box
and you need to buy an ODBC driver like Merant to connect to
the SQL-Server machine. There are several, follow the money at www.unixODBC.org
and you'll find out who is in control of ODBC drivers for UNIX and Linux.
But you could also do the unload-from-Informix and BCP to SQL-Server
using FreeTDS libs if Informix is on a UNIX or Linux box if you want
to save money. ( www.freetds.org )
The FreeTDS is FREE ( hence the name ) and takes about 10 minutes to
compile and install on your linux machine. Once you install FreeTDS,
you set up an INI file to connect to SQL-Server. You can now BCP using
( guess the name? ) freebcp to the SQL-Server machine.
If FreeTDS doesn't thrill you, you can create a Samba share on the Linux
machine where Informix is living, unload the data with Informix, then use DTS on
the Windows machine using SQL-Server as the client and pull it over, locating
the data files on a Samba share. This is workable but slow.
Keep in mind DTS does not have the capability to use extended
( AWE ) memory on the Windows side so it will be sluggish on big data.
BCP will not be much faster, SQL-Server is no where near Informix with
a high-speed loader, try not to laugh too loud. :o) DTS is a 3rd-party
product that does not take advantage of more than 2GB per process.
You can also use SQSH on your Linux box once you install FreeTDS,
which has a BCP option in it that is somewhat more
compatible with Informix people, allowing delimiter options etc etc, and
probably the preferred, command-line route. SQSH has been acquired by
the borg at Source Forge, start at www.sqsh.org and follow the links.
ODBC will always be slower as it tries to level the playing field
between server and server or server and client. Library-based
connections like FreeTDS are typically faster, compared with ODBC, yet
proprietary. So...as has been suggested, use a gateway product that
isn't interested in being portable if your company can buy it, but
you might find FreeTDS a nice alternative that doesn't cost you
anything but the time to make it work which is about 10-15 minutes.
By the way, if you really want to go crazy, just install Sybase ASE
12.5.2 developer's edition on your Linux box and you get a few more
options with the real BCP etc etc. Takes about 15 minutes and you
get SQL-Server on Linux.
Best of luck to you!
:-)
Jean Sagi wrote:
> RTFMM is in order.
>
> But I hace something pending: That IDS could behave as an OLE DB provider.
>
> Anyone knows how to do it?... I believe that someone refere to this topic previously stating that some querys must be run first in order to IDS to work as a OLE DB provider.
>
> Another question is OLE DB better that ODBC?
>
> J.
>
> -----Original Message-----
> From: "Savio Pinto (s )" <spinto@cap.org>
> To: "Sebastian, Norma J." <NormaJean.Sebastian@tellabs.com>, "William Weaver" <wweaver@amicus.com>
> Date: Tue, 15 Feb 2005 16:53:54 -0600
> Subject: RE: Informix and SQL Server
>
> the books online(help) of sqlserver has pretty good information on how to create link servers, they have examples on how to setup a link server and how to run distributed queries. i beleive you can also use linked servers in DTS packages (including oracle),
>
> Here are few tips, i got it from the help section of sqlserver "DTS driver support for heterogeneous data types"
>
> The Merant Informix OLE DB provider is supported for DTS imports from Informix, but not DTS exports to Informix. This driver also cannot be used to import meta data.
>
> The Intersolv Informix ODBC driver is supported, but with the following restrictions:
> BLOBs cannot be exported to Informix.
>
> When creating new tables on Informix, the DTS Import/Export Wizard will incorrectly map the SQL Server 2000 datetime columns to the Informix 'Datetime year to fraction' data type. Manually change this to the Informix Date type.
>
> The DTS meta data import will not import Informix catalog or table information.
>
>
>
> -----Original Message-----
> From: Sebastian, Norma J. [mailto:NormaJean.Sebastian@tellabs.com]
> Sent: Tuesday, February 15, 2005 4:24 PM
> To: Savio Pinto (s); William Weaver
> Cc: informix-list@iiug.org; owner-informix-list@iiug.org
> Subject: RE: Informix and SQL Server
>@@NL@