freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: mgrosman AT pathcom.com
- To: FreeTDS Development Group <freetds AT lists.ibiblio.org>, jklowden AT schemamania.org
- Subject: Re: [freetds] bulk copy API
- Date: Wed, 07 Apr 2010 12:18:41 -0400
----- Message from jklowden AT schemamania.org ---------
Date: Wed, 7 Apr 2010 09:46:25 -0400
From: jklowden AT schemamania.org
Reply-To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
Subject: Re: [freetds] bulk copy API
To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
On Wed, Apr 07, 2010 at 10:31:56AM -0400, mgrosman AT pathcom.com wrote:
So, if I understand correctly, I'll have to open a separate connection
via dblib's dbopen() to use bcp API.
Are there any plans to move bcp support to ODBC? Microsoft's 2008 SQL
Server is the last one which supports dblib connections.
I have an interest in ODBC BCP. More interest than time, though. I'm happy to apply patches and offer advice....
Don't worry about end-of-life for DB-Library. As far as the server is concerned, ODBC is practically indistinguishable from db-lib. As an open source project, we can make sure the bytes arriving at the server are the same regardless of the API used.
What Microsoft means by "won't be supported" is that they will (may) modify the server in such a way that NTWDBLIB.DLL -- which they haven't updated since 2002 or so -- won't work. I expect the next version of the server to require ANSI_DEFAULTS session properties, or something like that. It could even be simpler: the login packet has a "client is ODBC" flag. It's set ON for ODBC connections and OFF (of course) for db-lib. The server could just refuse connections with it OFF. Cf. http://msdn.microsoft.com/en-us/library/dd304019%28PROT.13%29.aspx, the "fODBC" bit.
File it under "planned obsolescence". They'd do the same thing with the C standard library if they could. (_CRT_SECURE_NO_WARNINGS, anyone?) Ask Joel about Fire and Motion.
Whatever happens, as long as the server speaks TDS, FreeTDS's db-lib will be able to adapt. That promise doesn't come from me; it's courtesy of the LGPL and copyright law.
--jkl
_______________________________________________
FreeTDS mailing list
FreeTDS AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds
----- End message from jklowden AT schemamania.org -----
Your words are encouraging. For now I'm planning to port an application that doesn't use bcp to UNIX platform, so bcp is not critical. But we have another app that uses bcp API extensively to upload large chunks of data to temporary tables without any indexes and then run stored procedures to incorporate temp table into the permanent tables already having millions of records.
The application first opens ODBC connection handle, then issues CREATE TABLE to create a temp table, then makes bcp calls to upload a file with corresponding format description file to the temp table, then issues a call to a stored procedure passing it a name of the temp table, so that the data can be stored in other tables.
BCP is used on the same connection so that it would see the temporary table. That's why I cannot combine ODBC API with dblib's bcp API - they will use different connections.
Otherwise a big redesign of the application would be required, which is difficult. So I guess that app stays on Windows for the time being.
Thanks,
Mike
-
[freetds] SQL_TXN_ISOLATION_OPTION,
mgrosman, 04/01/2010
- Re: [freetds] SQL_TXN_ISOLATION_OPTION, Frediano Ziglio, 04/01/2010
-
[freetds] SQL_ATTR_TRACE option doesn't work,
mgrosman, 04/01/2010
-
[freetds] bulk copy API,
mgrosman, 04/06/2010
-
Re: [freetds] bulk copy API,
Frediano Ziglio, 04/07/2010
-
Re: [freetds] bulk copy API,
mgrosman, 04/07/2010
-
Re: [freetds] bulk copy API,
jklowden, 04/07/2010
- Re: [freetds] bulk copy API, mgrosman, 04/07/2010
-
Re: [freetds] bulk copy API,
jklowden, 04/07/2010
-
Re: [freetds] bulk copy API,
mgrosman, 04/07/2010
-
Re: [freetds] bulk copy API,
Frediano Ziglio, 04/07/2010
-
Re: [freetds] SQL_ATTR_TRACE option doesn't work,
James K. Lowden, 04/07/2010
- Re: [freetds] SQL_ATTR_TRACE option doesn't work, Mikhail Grosman, 04/07/2010
-
[freetds] bulk copy API,
mgrosman, 04/06/2010
Archive powered by MHonArc 2.6.24.