| Newsgroups |
gmane.comp.db.tds.freetds |
| Message-ID |
<[email protected]> |
----- Message from [email protected] ---------
Date: Wed, 7 Apr 2010 09:46:25 -0400
From: [email protected]
Reply-To: FreeTDS Development Group <[email protected]>
Subject: Re: [freetds] bulk copy API
To: FreeTDS Development Group <[email protected]>
> On Wed, Apr 07, 2010 at 10:31:56AM -0400, [email protected] 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
> [email protected]
> http://lists.ibiblio.org/mailman/listinfo/freetds
>
----- End message from [email protected] -----
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