From lacak at zoznam.sk Wed Apr 1 04:04:10 2015 From: lacak at zoznam.sk (LacaK) Date: Wed, 01 Apr 2015 10:04:10 +0200 Subject: [freetds] Assertin failed: unknown bindtype with unknown varlen In-Reply-To: <551A7654.8090104@zoznam.sk> References: <551A7654.8090104@zoznam.sk> Message-ID: <551BA67A.4040603@zoznam.sk> Attached patch, which works for me ... Thanks -Laco. > Hi, > I get this error "unknown bindtype with unknown varlen" when calling > dbconvert() in dblib. > This is my situation: > I have table with VARBINARY column with value which is empty not null > (dbdatlen() = 0) > Then I call dbconvert with srctype=SQLBINARY, srclen=0, > desttype=SQLBINARY, destlen > 0 and I get above mentioned assertion. > > Looking into dbconvert there is in the begining (note condition: > srclen==0): > > if (src == NULL || srclen == 0) { > int bind = dbbindtype(desttype); > int size = tds_get_size_by_type(desttype); > > if (SYBCHAR == desttype) { > if (destlen > 0) { > size = destlen; > bind = CHARBIND; > } else { > size = 1; > bind = NTBSTRINGBIND; > } > } > > dbgetnull(dbproc, bind, size, dest); // <--- HERE OCCURS > ASSERTION > return size; > } > > Next look into dbgetnull(): > > /* > * For variable-length types, nonpositive varlen indicates > * buffer is "big enough" but also not to pad. > * Apply terminator (if applicable) and go home. > */ > if (varlen <= 0) { > switch (bindtype) { > case STRINGBIND: > case NTBSTRINGBIND: > varaddr[pnullrep->len] = '\0'; > /* fall thru */ > case CHARBIND: > case VARYCHARBIND: > + case BINARYBIND: // <--- MISSING HERE ? > + case VARYBINBIND: // <--- MISSING HERE ? > break; > > As BINARYBIND is not handled ATM default is executed: > default: > assert(!"unknown bindtype with unknown varlen"); > > Can you please fix it ? > Thanks > -Laco. > _______________________________________________ > FreeTDS mailing list > FreeTDS at lists.ibiblio.org > http://lists.ibiblio.org/mailman/listinfo/freetds > -------------- next part -------------- --- dblib.c.orig Fri Mar 27 07:13:04 2015 +++ dblib.c Wed Apr 01 10:01:10 2015 @@ -2245,6 +2245,8 @@ size = 1; bind = NTBSTRINGBIND; } + } else if (SYBBINARY == desttype) { + size = destlen; } dbgetnull(dbproc, bind, size, dest); From freddy77 at gmail.com Fri Apr 3 16:48:57 2015 From: freddy77 at gmail.com (Frediano Ziglio) Date: Fri, 3 Apr 2015 21:48:57 +0100 Subject: [freetds] Assertin failed: unknown bindtype with unknown varlen In-Reply-To: <551BA67A.4040603@zoznam.sk> References: <551A7654.8090104@zoznam.sk> <551BA67A.4040603@zoznam.sk> Message-ID: 2015-04-01 9:04 GMT+01:00 LacaK : > Attached patch, which works for me ... > Thanks > -Laco. > I don't know... dbgetnull is a function which is declared only on our public headers but is exported by our library. I would prefer if dbgetnull does not throw an exception for invalid types/varlen Frediano > >> Hi, >> I get this error "unknown bindtype with unknown varlen" when calling >> dbconvert() in dblib. >> This is my situation: >> I have table with VARBINARY column with value which is empty not null >> (dbdatlen() = 0) >> Then I call dbconvert with srctype=SQLBINARY, srclen=0, >> desttype=SQLBINARY, destlen > 0 and I get above mentioned assertion. >> >> Looking into dbconvert there is in the begining (note condition: >> srclen==0): >> >> if (src == NULL || srclen == 0) { >> int bind = dbbindtype(desttype); >> int size = tds_get_size_by_type(desttype); >> >> if (SYBCHAR == desttype) { >> if (destlen > 0) { >> size = destlen; >> bind = CHARBIND; >> } else { >> size = 1; >> bind = NTBSTRINGBIND; >> } >> } >> >> dbgetnull(dbproc, bind, size, dest); // <--- HERE OCCURS >> ASSERTION >> return size; >> } >> >> Next look into dbgetnull(): >> >> /* >> * For variable-length types, nonpositive varlen indicates >> * buffer is "big enough" but also not to pad. >> * Apply terminator (if applicable) and go home. >> */ >> if (varlen <= 0) { >> switch (bindtype) { >> case STRINGBIND: >> case NTBSTRINGBIND: >> varaddr[pnullrep->len] = '\0'; >> /* fall thru */ >> case CHARBIND: >> case VARYCHARBIND: >> + case BINARYBIND: // <--- MISSING HERE ? >> + case VARYBINBIND: // <--- MISSING HERE ? >> break; >> >> As BINARYBIND is not handled ATM default is executed: >> default: >> assert(!"unknown bindtype with unknown varlen"); >> >> Can you please fix it ? >> Thanks >> -Laco. >> _______________________________________________ >> FreeTDS mailing list >> FreeTDS at lists.ibiblio.org >> http://lists.ibiblio.org/mailman/listinfo/freetds >> > > _______________________________________________ > FreeTDS mailing list > FreeTDS at lists.ibiblio.org > http://lists.ibiblio.org/mailman/listinfo/freetds > From freddy77 at gmail.com Fri Apr 3 16:42:00 2015 From: freddy77 at gmail.com (Frediano Ziglio) Date: Fri, 3 Apr 2015 21:42:00 +0100 Subject: [freetds] ODBC bcp In-Reply-To: <984582980.20150330220338@rhughes.net> References: <996340536.20150312193606@rhughes.net> <6910288090.20150313210908@rhughes.net> <937668676.20150317224028@rhughes.net> <1295775916.20150319195756@rhughes.net> <984582980.20150330220338@rhughes.net> Message-ID: 2015-03-30 22:03 GMT+01:00 Richard Hughes : > Here's my v3 patch (hopefully in a slightly more gitish format - still > trying to figure out which of the various workflows on offer is > appropriate). > > I think I've addressed everything discussed, including redoing how the > new functions are called, adding some more stuff to the unit test and > fixing a few bugs thereby found. > > I've got a couple of questions outstanding: > > 1) I think I've found a bug in Microsoft's sqlncli11: inserting from > an application type of SQL_NUMERIC_STRUCT to a column of type varchar > appears to ignore the 'scale' of the decimal. This is commented in the > unit test, but causes an attempt to insert 3.141593 > (SQL_NUMERIC_STRUCT) to come out as '3141593' (varchar). What's the > general policy for things like this? Do we attempt bug-compatibility? > I don't imagine many people will want this particular conversion - I > only spotted it by accident. > > 2) I'm testing inserting to a datetime2 column. It works fine but > tcpdump shows that it's actually being sent as a nvarchar over the > wire, not binary. I'm assuming this is not my fault, but rather an > underlying problem in src/tds/bulk.c which should be treated as a > separate patch. If you think it is my fault then I'd appreciate it if > you could point out where I might have gone wrong. > > Richard. A note about inline. inline is actually C99 which is already 16 years old. If compilers does not support inline I would prefer a #define inline something instead of using a TDSODBC_INLINE Frediano From lacak at zoznam.sk Sun Apr 5 13:38:55 2015 From: lacak at zoznam.sk (LacaK) Date: Sun, 05 Apr 2015 19:38:55 +0200 Subject: [freetds] Assertin failed: unknown bindtype with unknown varlen In-Reply-To: References: <551A7654.8090104@zoznam.sk> <551BA67A.4040603@zoznam.sk> Message-ID: From freddy77 at gmail.com Mon Apr 6 10:54:46 2015 From: freddy77 at gmail.com (Frediano Ziglio) Date: Mon, 6 Apr 2015 15:54:46 +0100 Subject: [freetds] Certification verification Message-ID: Hi, this is my last stopover before release. I wrote a patch to start doing certificate verification, see https://github.com/freddy77/freetds/commit/557caf0e0af1c385d6cfd1602f593f9683ed6fc8. Now the problem is when to check. If a mssql is installed without certificate a dummy certificate (self signed with a "Self_Signed_Fallback" common name) is generate every time the sql instance is started (not during the install so you cannot cache the certificate of a given server). So there is no way to check these certificates, FreeTDS (and MSSQL driver too) has to accept by default these certificates. The patch add two options to freetds.conf, "ca file" and "crl file", respectively the file containing the root authorities and the certificates revocation list (list of certificates to not accept). So the key of the patch is: if you specify CA list you want to check certificate, if not accept any certificates sent. Now, the questions are: - should FreeTDS check the common name (with server name inside) of the certificate? - should I add an option to disable name verification? - should I read system CA list so to check the global list installed in the system? I don't know if this is useful, are mssql with proper certificate using a public CA? Regards, Frediano From peterd at iea-software.com Mon Apr 6 11:54:49 2015 From: peterd at iea-software.com (Peter Deacon) Date: Mon, 6 Apr 2015 08:54:49 -0700 (Pacific Daylight Time) Subject: [freetds] Certification verification In-Reply-To: References: Message-ID: On Mon, 6 Apr 2015, Frediano Ziglio wrote: > Hi, > this is my last stopover before release. I wrote a patch to start > doing certificate verification, see > https://github.com/freddy77/freetds/commit/557caf0e0af1c385d6cfd1602f593f9683ed6fc8. > > Now the problem is when to check. If a mssql is installed without > certificate a dummy certificate (self signed with a > "Self_Signed_Fallback" common name) is generate every time the sql > instance is started (not during the install so you cannot cache the > certificate of a given server). So there is no way to check these > certificates, FreeTDS (and MSSQL driver too) has to accept by default > these certificates. > The patch add two options to freetds.conf, "ca file" and "crl file", > respectively the file containing the root authorities and the > certificates revocation list (list of certificates to not accept). So > the key of the patch is: if you specify CA list you want to check > certificate, if not accept any certificates sent. Now, the questions > are: > - should FreeTDS check the common name (with server name inside) of > the certificate? Important if a global CA is used. Without checking an attacker can buy a cert from that CA and compromise security. Might also be important for company-wide CAs. Company might hand out a cert for a test server in a satellite office that compromises an important production server without the name checking. Ususally hostname TDS is using (e.g. sqlserver.mydomain.com) would match CN of servers public key. In OpenSSL after you SSL_accept connection fetching CN might look something like: peer = SSL_get_peer_certificate(myconnection); X509_NAME_get_text_by_NID(X509_get_subject_name(peer),NID_commonName,output_cn_goes_here...) X509_free(peer); Sometimes CN can contain wildcards *.mydomain.com or additional valid hosts present in subject alternate name attributes of servers public key.. not sure either is needed/useful here. > - should I add an option to disable name verification? > - should I read system CA list so to check the global list installed > in the system? I don't know if this is useful, are mssql with proper > certificate using a public CA? Dunno might be useful for someone connecting to a commercially hosted server..? Have Fun! Peter From freddy77 at gmail.com Mon Apr 6 13:10:53 2015 From: freddy77 at gmail.com (Frediano Ziglio) Date: Mon, 6 Apr 2015 18:10:53 +0100 Subject: [freetds] Certification verification In-Reply-To: References: Message-ID: 2015-04-06 16:54 GMT+01:00 Peter Deacon : > On Mon, 6 Apr 2015, Frediano Ziglio wrote: > >> Hi, >> this is my last stopover before release. I wrote a patch to start >> doing certificate verification, see >> >> https://github.com/freddy77/freetds/commit/557caf0e0af1c385d6cfd1602f593f9683ed6fc8. >> >> Now the problem is when to check. If a mssql is installed without >> certificate a dummy certificate (self signed with a >> "Self_Signed_Fallback" common name) is generate every time the sql >> instance is started (not during the install so you cannot cache the >> certificate of a given server). So there is no way to check these >> certificates, FreeTDS (and MSSQL driver too) has to accept by default >> these certificates. >> The patch add two options to freetds.conf, "ca file" and "crl file", >> respectively the file containing the root authorities and the >> certificates revocation list (list of certificates to not accept). So >> the key of the patch is: if you specify CA list you want to check >> certificate, if not accept any certificates sent. Now, the questions >> are: > > >> - should FreeTDS check the common name (with server name inside) of >> the certificate? > > > Important if a global CA is used. Without checking an attacker can buy a > cert from that CA and compromise security. > > Might also be important for company-wide CAs. Company might hand out a cert > for a test server in a satellite office that compromises an important > production server without the name checking. > Mmm... perhaps would be nice to have a "ca files" instead with a list of filenames like "file1:file2" were fileX is a file or "system" for global system CAs. > Ususally hostname TDS is using (e.g. sqlserver.mydomain.com) would match CN > of servers public key. > > In OpenSSL after you SSL_accept connection fetching CN might look something > like: > > peer = SSL_get_peer_certificate(myconnection); > X509_NAME_get_text_by_NID(X509_get_subject_name(peer),NID_commonName,output_cn_goes_here...) > X509_free(peer); > > > Sometimes CN can contain wildcards *.mydomain.com or additional valid hosts > present in subject alternate name attributes of servers public key.. not > sure either is needed/useful here. > >> - should I add an option to disable name verification? > I think this can be useful, but default should be enabled. > >> - should I read system CA list so to check the global list installed >> in the system? I don't know if this is useful, are mssql with proper >> certificate using a public CA? > > > Dunno might be useful for someone connecting to a commercially hosted > server..? > > Have Fun! > Peter Thanks Frediano From lacak at zoznam.sk Tue Apr 7 00:55:40 2015 From: lacak at zoznam.sk (LacaK) Date: Tue, 07 Apr 2015 06:55:40 +0200 Subject: [freetds] Assertin failed: unknown bindtype with unknown varlen In-Reply-To: References: <551A7654.8090104@zoznam.sk> <551BA67A.4040603@zoznam.sk> Message-ID: <5523634C.40506@zoznam.sk> > I don't know... dbgetnull is a function which is declared only on our > public headers but is exported by our library. I would prefer if > dbgetnull does not throw an exception for invalid types/varlen I do not know also ;-) But my patch (attached also in previous email) patches dbconvert() as there is not handled correctly situation when converting from : srctype=SQLBINARY, srclen=0 to: desttype=SQLBINARY, destlen > 0 If this patch will be applied then I do not need touch dbgetnull() I will be happy if this will be fixed before new release of FreeTDS ;-) Thanks -Laco. P.S. Sorry for previous empty email :-) > Frediano > >>> Hi, >>> I get this error "unknown bindtype with unknown varlen" when calling >>> dbconvert() in dblib. >>> This is my situation: >>> I have table with VARBINARY column with value which is empty not null >>> (dbdatlen() = 0) >>> Then I call dbconvert with srctype=SQLBINARY, srclen=0, >>> desttype=SQLBINARY, destlen > 0 and I get above mentioned assertion. >>> >>> Looking into dbconvert there is in the begining (note condition: >>> srclen==0): >>> >>> if (src == NULL || srclen == 0) { >>> int bind = dbbindtype(desttype); >>> int size = tds_get_size_by_type(desttype); >>> >>> if (SYBCHAR == desttype) { >>> if (destlen > 0) { >>> size = destlen; >>> bind = CHARBIND; >>> } else { >>> size = 1; >>> bind = NTBSTRINGBIND; >>> } >>> } >>> >>> dbgetnull(dbproc, bind, size, dest); // <--- HERE OCCURS >>> ASSERTION >>> return size; >>> } >>> >>> Next look into dbgetnull(): >>> >>> /* >>> * For variable-length types, nonpositive varlen indicates >>> * buffer is "big enough" but also not to pad. >>> * Apply terminator (if applicable) and go home. >>> */ >>> if (varlen <= 0) { >>> switch (bindtype) { >>> case STRINGBIND: >>> case NTBSTRINGBIND: >>> varaddr[pnullrep->len] = '\0'; >>> /* fall thru */ >>> case CHARBIND: >>> case VARYCHARBIND: >>> + case BINARYBIND: // <--- MISSING HERE ? >>> + case VARYBINBIND: // <--- MISSING HERE ? >>> break; >>> >>> As BINARYBIND is not handled ATM default is executed: >>> default: >>> assert(!"unknown bindtype with unknown varlen"); >>> >>> Can you please fix it ? >>> Thanks >>> -Laco. >>> _______________________________________________ >>> FreeTDS mailing list >>> FreeTDS at lists.ibiblio.org >>> http://lists.ibiblio.org/mailman/listinfo/freetds >>> >> _______________________________________________ >> FreeTDS mailing list >> FreeTDS at lists.ibiblio.org >> http://lists.ibiblio.org/mailman/listinfo/freetds >> > _______________________________________________ > FreeTDS mailing list > FreeTDS at lists.ibiblio.org > http://lists.ibiblio.org/mailman/listinfo/freetds > -------------- next part -------------- --- dblib.c.orig Fri Mar 27 07:13:04 2015 +++ dblib.c Wed Apr 01 10:01:10 2015 @@ -2245,6 +2245,8 @@ size = 1; bind = NTBSTRINGBIND; } + } else if (SYBBINARY == desttype) { + size = destlen; } dbgetnull(dbproc, bind, size, dest); From freddy77 at gmail.com Tue Apr 7 06:31:12 2015 From: freddy77 at gmail.com (Frediano Ziglio) Date: Tue, 7 Apr 2015 11:31:12 +0100 Subject: [freetds] Assertin failed: unknown bindtype with unknown varlen In-Reply-To: <5523634C.40506@zoznam.sk> References: <551A7654.8090104@zoznam.sk> <551BA67A.4040603@zoznam.sk> <5523634C.40506@zoznam.sk> Message-ID: 2015-04-07 5:55 GMT+01:00 LacaK : >> I don't know... dbgetnull is a function which is declared only on our >> public headers but is exported by our library. I would prefer if >> dbgetnull does not throw an exception for invalid types/varlen > > > I do not know also ;-) > > But my patch (attached also in previous email) patches dbconvert() as there > is not handled correctly situation when converting from : > srctype=SQLBINARY, srclen=0 > to: > desttype=SQLBINARY, destlen > 0 > If this patch will be applied then I do not need touch dbgetnull() > I think we could add some checks to t0019 test. I was wondering if your patch cover all cases. Probably would be better to test for bind == BINARYBIND (which catches all binaries like VARBINARY or IMAGE). > I will be happy if this will be fixed before new release of FreeTDS ;-) Added as a TODO in https://trello.com/b/bk0UZNRJ/freetds-todo-list. > Thanks > -Laco. > P.S. Sorry for previous empty email :-) > > Frediano >> >>>> Hi, >>>> I get this error "unknown bindtype with unknown varlen" when calling >>>> dbconvert() in dblib. >>>> This is my situation: >>>> I have table with VARBINARY column with value which is empty not null >>>> (dbdatlen() = 0) >>>> Then I call dbconvert with srctype=SQLBINARY, srclen=0, >>>> desttype=SQLBINARY, destlen > 0 and I get above mentioned assertion. >>>> >>>> Looking into dbconvert there is in the begining (note condition: >>>> srclen==0): >>>> >>>> if (src == NULL || srclen == 0) { >>>> int bind = dbbindtype(desttype); >>>> int size = tds_get_size_by_type(desttype); >>>> >>>> if (SYBCHAR == desttype) { >>>> if (destlen > 0) { >>>> size = destlen; >>>> bind = CHARBIND; >>>> } else { >>>> size = 1; >>>> bind = NTBSTRINGBIND; >>>> } >>>> } >>>> >>>> dbgetnull(dbproc, bind, size, dest); // <--- HERE OCCURS >>>> ASSERTION >>>> return size; >>>> } >>>> >>>> Next look into dbgetnull(): >>>> >>>> /* >>>> * For variable-length types, nonpositive varlen indicates >>>> * buffer is "big enough" but also not to pad. >>>> * Apply terminator (if applicable) and go home. >>>> */ >>>> if (varlen <= 0) { >>>> switch (bindtype) { >>>> case STRINGBIND: >>>> case NTBSTRINGBIND: >>>> varaddr[pnullrep->len] = '\0'; >>>> /* fall thru */ >>>> case CHARBIND: >>>> case VARYCHARBIND: >>>> + case BINARYBIND: // <--- MISSING HERE ? >>>> + case VARYBINBIND: // <--- MISSING HERE ? >>>> break; >>>> >>>> As BINARYBIND is not handled ATM default is executed: >>>> default: >>>> assert(!"unknown bindtype with unknown varlen"); >>>> >>>> Can you please fix it ? >>>> Thanks >>>> -Laco. From lacak at zoznam.sk Tue Apr 7 07:52:26 2015 From: lacak at zoznam.sk (LacaK) Date: Tue, 07 Apr 2015 13:52:26 +0200 Subject: [freetds] Assertin failed: unknown bindtype with unknown varlen In-Reply-To: References: <551A7654.8090104@zoznam.sk> <551BA67A.4040603@zoznam.sk> <5523634C.40506@zoznam.sk> Message-ID: <5523C4FA.6070206@zoznam.sk> > I think we could add some checks to t0019 test. Yes good idea! may be add line: TEST((SYBBINARY, "", 0, SYBBINARY, 8), "len=8 00 00 00 00 00 00 00 00 2A 2A"); > > I was wondering if your patch cover all cases. Probably would be > better to test for bind == BINARYBIND (which catches all binaries like > VARBINARY or IMAGE). May be. I used it as there was already: if (SYBCHAR == desttype) Do you think, that this condition should be changed as well: if (bind == NTBSTRINGBIND) ? I leave decision up to you. For me are okay both alternatives. >> I will be happy if this will be fixed before new release of FreeTDS ;-) > Added as a TODO in https://trello.com/b/bk0UZNRJ/freetds-todo-list. Thanks -Laco. > >> Thanks >> -Laco. >> P.S. Sorry for previous empty email :-) >> >> > Frediano > >>>>> Hi, >>>>> I get this error "unknown bindtype with unknown varlen" when calling >>>>> dbconvert() in dblib. >>>>> This is my situation: >>>>> I have table with VARBINARY column with value which is empty not null >>>>> (dbdatlen() = 0) >>>>> Then I call dbconvert with srctype=SQLBINARY, srclen=0, >>>>> desttype=SQLBINARY, destlen > 0 and I get above mentioned assertion. >>>>> >>>>> Looking into dbconvert there is in the begining (note condition: >>>>> srclen==0): >>>>> >>>>> if (src == NULL || srclen == 0) { >>>>> int bind = dbbindtype(desttype); >>>>> int size = tds_get_size_by_type(desttype); >>>>> >>>>> if (SYBCHAR == desttype) { >>>>> if (destlen > 0) { >>>>> size = destlen; >>>>> bind = CHARBIND; >>>>> } else { >>>>> size = 1; >>>>> bind = NTBSTRINGBIND; >>>>> } >>>>> } >>>>> >>>>> dbgetnull(dbproc, bind, size, dest); // <--- HERE OCCURS >>>>> ASSERTION >>>>> return size; >>>>> } >>>>> >>>>> Next look into dbgetnull(): >>>>> >>>>> /* >>>>> * For variable-length types, nonpositive varlen indicates >>>>> * buffer is "big enough" but also not to pad. >>>>> * Apply terminator (if applicable) and go home. >>>>> */ >>>>> if (varlen <= 0) { >>>>> switch (bindtype) { >>>>> case STRINGBIND: >>>>> case NTBSTRINGBIND: >>>>> varaddr[pnullrep->len] = '\0'; >>>>> /* fall thru */ >>>>> case CHARBIND: >>>>> case VARYCHARBIND: >>>>> + case BINARYBIND: // <--- MISSING HERE ? >>>>> + case VARYBINBIND: // <--- MISSING HERE ? >>>>> break; >>>>> >>>>> As BINARYBIND is not handled ATM default is executed: >>>>> default: >>>>> assert(!"unknown bindtype with unknown varlen"); >>>>> >>>>> Can you please fix it ? >>>>> Thanks >>>>> -Laco. > _______________________________________________ > FreeTDS mailing list > FreeTDS at lists.ibiblio.org > http://lists.ibiblio.org/mailman/listinfo/freetds > From freddy77 at gmail.com Tue Apr 7 08:58:38 2015 From: freddy77 at gmail.com (Frediano Ziglio) Date: Tue, 7 Apr 2015 13:58:38 +0100 Subject: [freetds] Assertin failed: unknown bindtype with unknown varlen In-Reply-To: <5523C4FA.6070206@zoznam.sk> References: <551A7654.8090104@zoznam.sk> <551BA67A.4040603@zoznam.sk> <5523634C.40506@zoznam.sk> <5523C4FA.6070206@zoznam.sk> Message-ID: 2015-04-07 12:52 GMT+01:00 LacaK : > >> I think we could add some checks to t0019 test. > > > Yes good idea! may be add line: > TEST((SYBBINARY, "", 0, SYBBINARY, 8), "len=8 00 00 00 00 00 00 00 00 2A > 2A"); > >> >> I was wondering if your patch cover all cases. Probably would be >> better to test for bind == BINARYBIND (which catches all binaries like >> VARBINARY or IMAGE). > > > May be. I used it as there was already: if (SYBCHAR == desttype) > Do you think, that this condition should be changed as well: if (bind == > NTBSTRINGBIND) ? > I leave decision up to you. > For me are okay both alternatives. > > >>> I will be happy if this will be fixed before new release of FreeTDS ;-) >> >> Added as a TODO in https://trello.com/b/bk0UZNRJ/freetds-todo-list. > > > Thanks > -Laco. > How does it sound this patch? https://github.com/freddy77/freetds/commit/40968645d10ea32455806a1068c4f63ab0fb6f5e Is it ok the signed off line ? Frediano >> >>>>>> Hi, >>>>>> I get this error "unknown bindtype with unknown varlen" when calling >>>>>> dbconvert() in dblib. >>>>>> This is my situation: >>>>>> I have table with VARBINARY column with value which is empty not null >>>>>> (dbdatlen() = 0) >>>>>> Then I call dbconvert with srctype=SQLBINARY, srclen=0, >>>>>> desttype=SQLBINARY, destlen > 0 and I get above mentioned assertion. >>>>>> >>>>>> Looking into dbconvert there is in the begining (note condition: >>>>>> srclen==0): >>>>>> >>>>>> if (src == NULL || srclen == 0) { >>>>>> int bind = dbbindtype(desttype); >>>>>> int size = tds_get_size_by_type(desttype); >>>>>> >>>>>> if (SYBCHAR == desttype) { >>>>>> if (destlen > 0) { >>>>>> size = destlen; >>>>>> bind = CHARBIND; >>>>>> } else { >>>>>> size = 1; >>>>>> bind = NTBSTRINGBIND; >>>>>> } >>>>>> } >>>>>> >>>>>> dbgetnull(dbproc, bind, size, dest); // <--- HERE OCCURS >>>>>> ASSERTION >>>>>> return size; >>>>>> } >>>>>> >>>>>> Next look into dbgetnull(): >>>>>> >>>>>> /* >>>>>> * For variable-length types, nonpositive varlen indicates >>>>>> * buffer is "big enough" but also not to pad. >>>>>> * Apply terminator (if applicable) and go home. >>>>>> */ >>>>>> if (varlen <= 0) { >>>>>> switch (bindtype) { >>>>>> case STRINGBIND: >>>>>> case NTBSTRINGBIND: >>>>>> varaddr[pnullrep->len] = '\0'; >>>>>> /* fall thru */ >>>>>> case CHARBIND: >>>>>> case VARYCHARBIND: >>>>>> + case BINARYBIND: // <--- MISSING HERE ? >>>>>> + case VARYBINBIND: // <--- MISSING HERE ? >>>>>> break; >>>>>> >>>>>> As BINARYBIND is not handled ATM default is executed: >>>>>> default: >>>>>> assert(!"unknown bindtype with unknown varlen"); >>>>>> >>>>>> Can you please fix it ? >>>>>> Thanks >>>>>> -Laco. From lacak at zoznam.sk Wed Apr 8 02:00:27 2015 From: lacak at zoznam.sk (LacaK) Date: Wed, 08 Apr 2015 08:00:27 +0200 Subject: [freetds] Assertin failed: unknown bindtype with unknown varlen In-Reply-To: References: <551A7654.8090104@zoznam.sk> <551BA67A.4040603@zoznam.sk> <5523634C.40506@zoznam.sk> <5523C4FA.6070206@zoznam.sk> Message-ID: <5524C3FB.6070004@zoznam.sk> > How does it sound this patch? Very good ;-) No objections from me side. > > https://github.com/freddy77/freetds/commit/40968645d10ea32455806a1068c4f63ab0fb6f5e > > Is it ok the signed off line ? Do you think my name and email ? Feel free remove me as patch is your ;-) (or if you want use my name from f.e. this commit: https://github.com/FreeTDS/freetds/commit/81fc73a84ff0907186473a42adc1308ea191f170) Thank you -Laco. From freddy77 at gmail.com Wed Apr 8 03:56:02 2015 From: freddy77 at gmail.com (Frediano Ziglio) Date: Wed, 8 Apr 2015 08:56:02 +0100 Subject: [freetds] Assertin failed: unknown bindtype with unknown varlen In-Reply-To: <5524C3FB.6070004@zoznam.sk> References: <551A7654.8090104@zoznam.sk> <551BA67A.4040603@zoznam.sk> <5523634C.40506@zoznam.sk> <5523C4FA.6070206@zoznam.sk> <5524C3FB.6070004@zoznam.sk> Message-ID: 2015-04-08 7:00 GMT+01:00 LacaK : > >> How does it sound this patch? > > > Very good ;-) No objections from me side. > >> >> >> https://github.com/freddy77/freetds/commit/40968645d10ea32455806a1068c4f63ab0fb6f5e >> >> Is it ok the signed off line ? > > > Do you think my name and email ? Feel free remove me as patch is your ;-) > (or if you want use my name from f.e. this commit: > https://github.com/FreeTDS/freetds/commit/81fc73a84ff0907186473a42adc1308ea191f170) > > Thank you > > -Laco. > Committed! Enjoy! Frediano From geoff.montee at gmail.com Thu Apr 9 11:40:49 2015 From: geoff.montee at gmail.com (Geoff Montee) Date: Thu, 9 Apr 2015 08:40:49 -0700 Subject: [freetds] Out-of-the-box "date format" values for "default" and "en_US" locales Message-ID: In FreeTDS, the "default" and "en_US" locales have the following values of "date format" defined in locales.conf: [default] date format = %b %e %Y %I:%M:%S:%z%p [en_US] date format = %b %e %Y %I:%M:%S:%z%p language = us_english charset = iso_1 Is there a reason that FreeTDS chose to separate the seconds and milliseconds with a colon (':'), rather than a dot ('.')? A few users of tds_fdw recently ran into issues with this: https://github.com/GeoffMontee/tds_fdw/issues/13 Because of the ISO 8601 standard, I think most applications expect a dot separator between seconds and milliseconds. http://en.wikipedia.org/wiki/ISO_8601 These days, it may make sense to use ISO 8601 as the default "date format", since it is pretty universal. If FreeTDS is going to have a new release soon, maybe it would be worth changing the default date format? Thanks, Geoff Montee From freddy77 at gmail.com Mon Apr 13 11:39:34 2015 From: freddy77 at gmail.com (Frediano Ziglio) Date: Mon, 13 Apr 2015 16:39:34 +0100 Subject: [freetds] Out-of-the-box "date format" values for "default" and "en_US" locales In-Reply-To: References: Message-ID: Il 09/Apr/2015 18:40, "Geoff Montee" ha scritto: > > In FreeTDS, the "default" and "en_US" locales have the following values of > "date format" defined in locales.conf: > > [default] > date format = %b %e %Y %I:%M:%S:%z%p > > [en_US] > date format = %b %e %Y %I:%M:%S:%z%p > language = us_english > charset = iso_1 > > Is there a reason that FreeTDS chose to separate the seconds and > milliseconds with a colon (':'), rather than a dot ('.')? A few users of > tds_fdw recently ran into issues with this: > > https://github.com/GeoffMontee/tds_fdw/issues/13 > > Because of the ISO 8601 standard, I think most applications expect a dot > separator between seconds and milliseconds. > > http://en.wikipedia.org/wiki/ISO_8601 > > These days, it may make sense to use ISO 8601 as the default "date format", > since it is pretty universal. If FreeTDS is going to have a new release > soon, maybe it would be worth changing the default date format? > > Thanks, > > Geoff Montee > I don't remember the history but must be quite old. Yes, default can change. As long is well documented I don't see the point keeping the colon. Frediano From SATurk at MissouriState.edu Mon Apr 13 12:39:54 2015 From: SATurk at MissouriState.edu (Turk, Scott A) Date: Mon, 13 Apr 2015 11:39:54 -0500 Subject: [freetds] character set issue between sql server and oracle Message-ID: We've set up freetds as a gateway between Sql server and Oracle. When running a query on Oracle across a link to a Sql Server database, we get extra null characters between each real character in the output. This occurs on columns set up as nchar on the Sql Server side. Can anyone please provide assistance? Here is the output from the dump command on the query (executed on Oracle across the link), the real output should be "administrator". Typ=1 Len=52: 0,97,0,0,0,100,0,0,0,109,0,0,0,105,0,0,0,110,0,0,0,105,0,0,0,115,0,0,0,116,0,0,0,114,0,0,0,97,0,0,0,116,0,0,0,111,0,0,0,114,0,0 Thanks! Scott Turk Missouri State University SATurk at missouristate.edu (417) 836-6195 From geoff.montee at gmail.com Mon Apr 13 19:30:01 2015 From: geoff.montee at gmail.com (Geoff Montee) Date: Mon, 13 Apr 2015 16:30:01 -0700 Subject: [freetds] Out-of-the-box "date format" values for "default" and "en_US" locales In-Reply-To: References: Message-ID: Hi Frediano, On Mon, Apr 13, 2015 at 8:39 AM, Frediano Ziglio wrote: > Il 09/Apr/2015 18:40, "Geoff Montee" ha scritto: >> >> In FreeTDS, the "default" and "en_US" locales have the following values of >> "date format" defined in locales.conf: >> >> [default] >> date format = %b %e %Y %I:%M:%S:%z%p >> >> [en_US] >> date format = %b %e %Y %I:%M:%S:%z%p >> language = us_english >> charset = iso_1 >> >> Is there a reason that FreeTDS chose to separate the seconds and >> milliseconds with a colon (':'), rather than a dot ('.')? A few users of >> tds_fdw recently ran into issues with this: >> >> https://github.com/GeoffMontee/tds_fdw/issues/13 >> >> Because of the ISO 8601 standard, I think most applications expect a dot >> separator between seconds and milliseconds. >> >> http://en.wikipedia.org/wiki/ISO_8601 >> >> These days, it may make sense to use ISO 8601 as the default "date > format", >> since it is pretty universal. If FreeTDS is going to have a new release >> soon, maybe it would be worth changing the default date format? > > I don't remember the history but must be quite old. > > Yes, default can change. As long is well documented I don't see the point > keeping the colon. > Thanks for the reply! Changing the colon to a dot sounds good to me. Would it be worth changing the default completely to an ISO 8601-compatible format? That would probably be something like: [default] date format = %Y-%m-%dT%H:%M:%S.%z The main difference between that and ISO-8601 is that it wouldn't contain the timezone offset. strftime uses %z for the timezone offset, but FreeTDS uses %z for the milliseconds. Thanks, Geoff From info at edwhs.nl Tue Apr 14 01:57:22 2015 From: info at edwhs.nl (Easy Datawarehouse Solutions) Date: Tue, 14 Apr 2015 07:57:22 +0200 Subject: [freetds] character set issue between sql server and oracle In-Reply-To: References: Message-ID: Hi, Can't really help you with this gateway problem (need more info on how you set this up, but most likely due to characterset conversion problem). Personally I always use this for running sql server queries from oracle: https://github.com/easydatawarehousing/easy2oracle Ivo -----Oorspronkelijk bericht----- From: Turk, Scott A Sent: Monday, April 13, 2015 6:39 PM To: freetds at lists.ibiblio.org Subject: [freetds] character set issue between sql server and oracle We've set up freetds as a gateway between Sql server and Oracle. When running a query on Oracle across a link to a Sql Server database, we get extra null characters between each real character in the output. This occurs on columns set up as nchar on the Sql Server side. Can anyone please provide assistance? Here is the output from the dump command on the query (executed on Oracle across the link), the real output should be "administrator". Typ=1 Len=52: 0,97,0,0,0,100,0,0,0,109,0,0,0,105,0,0,0,110,0,0,0,105,0,0,0,115,0,0,0,116,0,0,0,114,0,0,0,97,0,0,0,116,0,0,0,111,0,0,0,114,0,0 Thanks! Scott Turk Missouri State University SATurk at missouristate.edu (417) 836-6195 _______________________________________________ FreeTDS mailing list FreeTDS at lists.ibiblio.org http://lists.ibiblio.org/mailman/listinfo/freetds From fredy at opag.ch Tue Apr 14 02:46:52 2015 From: fredy at opag.ch (Fredy Paquet) Date: Tue, 14 Apr 2015 08:46:52 +0200 (CEST) Subject: [freetds] Out-of-the-box "date format" values for "default" and "en_US" locales In-Reply-To: CAA7biFM+RZ+5SKxVTWX0V5W9CLWtnbX8Ct1zKEEMdAhEZinYOw@mail.gmail.com References: Message-ID: Hello Geoff Beware that %z ist not supported by sprintf() on Win32 -- Fredy Paquet OPAG Informatik AG Fabrikmattenweg 11 CH-4144 Arlesheim Tel. 0041 61 7169222 Fax. 0041 61 7169229 http://www.opag.ch Am 14. April 2015, 1:30, schrieb Geoff Montee: Hi Frediano, On Mon, Apr 13, 2015 at 8:39 AM, Frediano Ziglio wrote: Il 09/Apr/2015 18:40, "Geoff Montee" ha scritto: In FreeTDS, the "default" and "en_US" locales have the following values of "date format" defined in locales.conf: [default] date format = %b %e %Y %I:%M:%S:%z%p [en_US] date format = %b %e %Y %I:%M:%S:%z%p language = us_english charset = iso_1 Is there a reason that FreeTDS chose to separate the seconds and milliseconds with a colon (':'), rather than a dot ('.')? A few users of tds_fdw recently ran into issues with this: https://github.com/GeoffMontee/tds_fdw/issues/13 Because of the ISO 8601 standard, I think most applications expect a dot separator between seconds and milliseconds. http://en.wikipedia.org/wiki/ISO_8601 These days, it may make sense to use ISO 8601 as the default "date format", since it is pretty universal. If FreeTDS is going to have a new release soon, maybe it would be worth changing the default date format? I don't remember the history but must be quite old. Yes, default can change. As long is well documented I don't see the point keeping the colon. Thanks for the reply! Changing the colon to a dot sounds good to me. Would it be worth changing the default completely to an ISO 8601-compatible format? That would probably be something like: [default] date format = %Y-%m-%dT%H:%M:%S.%z The main difference between that and ISO-8601 is that it wouldn't contain the timezone offset. strftime uses %z for the timezone offset, but FreeTDS uses %z for the milliseconds. Thanks, Geoff _______________________________________________ FreeTDS mailing list FreeTDS at lists.ibiblio.org http://lists.ibiblio.org/mailman/listinfo/freetds -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 6168 bytes Desc: S/MIME Cryptographic Signature URL: From freddy77 at gmail.com Tue Apr 14 03:06:39 2015 From: freddy77 at gmail.com (Frediano Ziglio) Date: Tue, 14 Apr 2015 08:06:39 +0100 Subject: [freetds] Out-of-the-box "date format" values for "default" and "en_US" locales In-Reply-To: References: Message-ID: Il 14/Apr/2015 09:02, "Fredy Paquet" ha scritto: > > Hello Geoff > > Beware that %z ist not supported by sprintf() on Win32 > Hi, We are speaking about strftime which has a different format string. Frediano From matthew.green at datamartcomputing.com Tue Apr 14 02:48:36 2015 From: matthew.green at datamartcomputing.com (matthew.green at datamartcomputing.com) Date: Tue, 14 Apr 2015 06:48:36 +0000 Subject: [freetds] Out-of-the-box "date format" values for "default" and "en_US" locales In-Reply-To: References: Message-ID: <7b5952cd76e854c1722e1f904d7007f6@datamartcomputing.com> The vendor (Sybase) default seems to be with a colon (http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc38151.1520/html/iqrefbb/Convert.htm). select convert(char(40),getdate(),109); ---------------------------------------- Apr 14 2015 8:42:03:660AM Shouldn't we stick to that? Cheers, Matthew. April 14 2015 8:40 AM, "Geoff Montee" wrote: > Hi Frediano, > > On Mon, Apr 13, 2015 at 8:39 AM, Frediano Ziglio wrote: > >> Il 09/Apr/2015 18:40, "Geoff Montee" ha scritto: >>> In FreeTDS, the "default" and "en_US" locales have the following values of >>> "date format" defined in locales.conf: >>> >>> [default] >>> date format = %b %e %Y %I:%M:%S:%z%p >>> >>> [en_US] >>> date format = %b %e %Y %I:%M:%S:%z%p >>> language = us_english >>> charset = iso_1 >>> >>> Is there a reason that FreeTDS chose to separate the seconds and >>> milliseconds with a colon (':'), rather than a dot ('.')? A few users of >>> tds_fdw recently ran into issues with this: >>> >>> https://github.com/GeoffMontee/tds_fdw/issues/13 >>> >>> Because of the ISO 8601 standard, I think most applications expect a dot >>> separator between seconds and milliseconds. >>> >>> http://en.wikipedia.org/wiki/ISO_8601 >>> >>> These days, it may make sense to use ISO 8601 as the default "date >> >> format", >>> since it is pretty universal. If FreeTDS is going to have a new release >>> soon, maybe it would be worth changing the default date format? >> >> I don't remember the history but must be quite old. >> >> Yes, default can change. As long is well documented I don't see the point >> keeping the colon. > > Thanks for the reply! > > Changing the colon to a dot sounds good to me. > > Would it be worth changing the default completely to an ISO > 8601-compatible format? That would probably be something like: > > [default] > date format = %Y-%m-%dT%H:%M:%S.%z > > The main difference between that and ISO-8601 is that it wouldn't > contain the timezone offset. strftime uses %z for the timezone offset, > but FreeTDS uses %z for the milliseconds. > > Thanks, > > Geoff > _______________________________________________ > FreeTDS mailing list > FreeTDS at lists.ibiblio.org > http://lists.ibiblio.org/mailman/listinfo/freetds From freddy77 at gmail.com Tue Apr 14 08:44:19 2015 From: freddy77 at gmail.com (Frediano Ziglio) Date: Tue, 14 Apr 2015 13:44:19 +0100 Subject: [freetds] character set issue between sql server and oracle In-Reply-To: References: Message-ID: Il 13/Apr/2015 19:41, "Turk, Scott A" ha scritto: > > > We've set up freetds as a gateway between Sql server and Oracle. When running a query on Oracle across a link to a Sql Server database, we get extra null characters between each real character in the output. This occurs on columns set up as nchar on the Sql Server side. Can anyone please provide assistance? > > Here is the output from the dump command on the query (executed on Oracle across the link), the real output should be "administrator". > > Typ=1 Len=52: 0,97,0,0,0,100,0,0,0,109,0,0,0,105,0,0,0,110,0,0,0,105,0,0,0,115,0,0,0,116,0,0,0,114,0,0,0,97,0,0,0,116,0,0,0,111,0,0,0,114,0,0 > > Thanks! > > Scott Turk > Missouri State University > Hi, Looks quite strange. Would be useful to understand the kind of binding Oracle is doing. Looks like the output is using 4 bytes for each character but it quite strange. In the wire server send a character as two bytes. Could be that Oracle is using a driver manager with 4 bytes as wide character. However the encoding is quite strange as in nor little nor big endian. A ODBC trace would be really helpful. Frediano From geoff.montee at gmail.com Wed Apr 15 18:41:59 2015 From: geoff.montee at gmail.com (Geoff Montee) Date: Wed, 15 Apr 2015 15:41:59 -0700 Subject: [freetds] Out-of-the-box "date format" values for "default" and "en_US" locales In-Reply-To: <7b5952cd76e854c1722e1f904d7007f6@datamartcomputing.com> References: <7b5952cd76e854c1722e1f904d7007f6@datamartcomputing.com> Message-ID: Hi Matthew, On Mon, Apr 13, 2015 at 11:48 PM, wrote: > The vendor (Sybase) default seems to be with a colon (http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc38151.1520/html/iqrefbb/Convert.htm). > > select convert(char(40),getdate(),109); > > ---------------------------------------- > Apr 14 2015 8:42:03:660AM > > Shouldn't we stick to that? > In the page that you linked, I see that the format style you mention is #9 or #109, but I don't see anything to indicate that it is the "default." The default style for the convert function in Sybase ASE 16.0 appears to use style "100", which omits the milliseconds entirely. http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc36271.1600/doc/html/san1393050437990.html The documentation also says that there should be a dot, not a colon, between the seconds and microseconds by default for the "bigdatetime" type: http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc36271.1600/doc/html/san1393050393286.html http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc36271.1600/doc/html/san1393050394051.html Confusingly, it seems to use a colon by default for the "time" type: http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc36271.1600/doc/html/san1393050395880.html On another note, FreeTDS's documentation page for locales.conf says this: http://www.freetds.org/userguide/locales.htm "locales.conf will probably be dropped from FreeTDS one day. Its only real purpose now is to control the format of date strings. The Right Way? to deduce the appropriate default date format is from the application's locale settings, while allowing an override in freetds.conf. That's the direction we're headed." Has any thought been given to how date formatting should be handled after locales.conf goes away? Thanks, Geoff From shawjef3 at gmail.com Wed Apr 15 22:24:00 2015 From: shawjef3 at gmail.com (Jeffrey Shaw) Date: Wed, 15 Apr 2015 22:24:00 -0400 Subject: [freetds] Out-of-the-box "date format" values for "default" and "en_US" locales In-Reply-To: References: <7b5952cd76e854c1722e1f904d7007f6@datamartcomputing.com> Message-ID: The use case I have, which is using TDS_FDW to select from SQL Server to PostgreSQL, forces me to change the colon to a dot, so I support that change. Jeff On Wed, Apr 15, 2015 at 6:41 PM, Geoff Montee wrote: > Hi Matthew, > > On Mon, Apr 13, 2015 at 11:48 PM, > wrote: > > The vendor (Sybase) default seems to be with a colon ( > http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc38151.1520/html/iqrefbb/Convert.htm > ). > > > > select convert(char(40),getdate(),109); > > > > ---------------------------------------- > > Apr 14 2015 8:42:03:660AM > > > > Shouldn't we stick to that? > > > > In the page that you linked, I see that the format style you mention > is #9 or #109, but I don't see anything to indicate that it is the > "default." The default style for the convert function in Sybase ASE > 16.0 appears to use style "100", which omits the milliseconds > entirely. > > > http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc36271.1600/doc/html/san1393050437990.html > > The documentation also says that there should be a dot, not a colon, > between the seconds and microseconds by default for the "bigdatetime" > type: > > > http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc36271.1600/doc/html/san1393050393286.html > > > http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc36271.1600/doc/html/san1393050394051.html > > Confusingly, it seems to use a colon by default for the "time" type: > > > http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc36271.1600/doc/html/san1393050395880.html > > On another note, FreeTDS's documentation page for locales.conf says this: > > http://www.freetds.org/userguide/locales.htm > > "locales.conf will probably be dropped from FreeTDS one day. Its only > real purpose now is to control the format of date strings. The Right > Way? to deduce the appropriate default date format is from the > application's locale settings, while allowing an override in > freetds.conf. That's the direction we're headed." > > Has any thought been given to how date formatting should be handled > after locales.conf goes away? > > Thanks, > > Geoff > _______________________________________________ > FreeTDS mailing list > FreeTDS at lists.ibiblio.org > http://lists.ibiblio.org/mailman/listinfo/freetds > From matthew.green at datamartcomputing.com Thu Apr 16 02:44:01 2015 From: matthew.green at datamartcomputing.com (matthew.green at datamartcomputing.com) Date: Thu, 16 Apr 2015 06:44:01 +0000 Subject: [freetds] Out-of-the-box "date format" values for "default" and "en_US" locales In-Reply-To: References: <7b5952cd76e854c1722e1f904d7007f6@datamartcomputing.com> Message-ID: <2269cb848552c8bf34b1ed3ec432b112@datamartcomputing.com> Hi Geoff, It is confusing, as you suggest. The part I noted in the link I sent was this "dd mmm yyyy hh:nn:ss:sss (24 hour clock, Europe default + milliseconds, 4-digit year)". The word default struck me but it does seem ambiguous as it says Europe default + milliseconds so the default part could be referring to the 24 hour clock or to the format of the whole thing. Yes, you're right that from isql you don't get to see milliseconds by default, the same with the GUI. Having now given it a little more thought I suppose the lesson is that you should specify the format you want and not rely on defaults :-) Incidentally MS SQL Server 2012 (probably other versions too) display the milliseconds with a full stop by default but you get a colon if you use the select I gave in my example. So, I suppose a full stop by default shouldn't cause any controversy. As for locales.conf.. that I don't know. Cheers, Matthew. April 16 2015 12:47 AM, "Geoff Montee" wrote: > Hi Matthew, > > On Mon, Apr 13, 2015 at 11:48 PM, wrote: > >> The vendor (Sybase) default seems to be with a colon >> > (http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc38151.1520/html/iqrefbb/ >> onvert.htm). >> >> select convert(char(40),getdate(),109); >> >> ---------------------------------------- >> Apr 14 2015 8:42:03:660AM >> >> Shouldn't we stick to that? > > In the page that you linked, I see that the format style you mention > is #9 or #109, but I don't see anything to indicate that it is the > "default." The default style for the convert function in Sybase ASE > 16.0 appears to use style "100", which omits the milliseconds > entirely. > > http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc36271.1600/doc/html/san13 > 3050437990.html > > The documentation also says that there should be a dot, not a colon, > between the seconds and microseconds by default for the "bigdatetime" > type: > > http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc36271.1600/doc/html/san13 > 3050393286.html > > http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc36271.1600/doc/html/san13 > 3050394051.html > > Confusingly, it seems to use a colon by default for the "time" type: > > http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc36271.1600/doc/html/san13 > 3050395880.html > > On another note, FreeTDS's documentation page for locales.conf says this: > > http://www.freetds.org/userguide/locales.htm > > "locales.conf will probably be dropped from FreeTDS one day. Its only > real purpose now is to control the format of date strings. The Right > Way? to deduce the appropriate default date format is from the > application's locale settings, while allowing an override in > freetds.conf. That's the direction we're headed." > > Has any thought been given to how date formatting should be handled > after locales.conf goes away? > > Thanks, > > Geoff > _______________________________________________ > FreeTDS mailing list > FreeTDS at lists.ibiblio.org > http://lists.ibiblio.org/mailman/listinfo/freetds From freddy77 at gmail.com Fri Apr 17 09:20:30 2015 From: freddy77 at gmail.com (Frediano Ziglio) Date: Fri, 17 Apr 2015 15:20:30 +0200 Subject: [freetds] Out-of-the-box "date format" values for "default" and "en_US" locales In-Reply-To: <2269cb848552c8bf34b1ed3ec432b112@datamartcomputing.com> References: <7b5952cd76e854c1722e1f904d7007f6@datamartcomputing.com> <2269cb848552c8bf34b1ed3ec432b112@datamartcomputing.com> Message-ID: I think is better to not change the file. Default is either 100 or 109 based on type (small datetime or datetime). All libraries support a way to get date splitting all fields. Also all libraries (beside ODBC which as a fixed format) should support date format specification. Frediano Il 16/Apr/2015 08:44, ha scritto: > Hi Geoff, > > It is confusing, as you suggest. The part I noted in the link I sent was > this "dd mmm yyyy hh:nn:ss:sss (24 hour clock, Europe default + > milliseconds, 4-digit year)". The word default struck me but it does seem > ambiguous as it says Europe default + milliseconds so the default part > could be referring to the 24 hour clock or to the format of the whole thing. > > Yes, you're right that from isql you don't get to see milliseconds by > default, the same with the GUI. Having now given it a little more thought I > suppose the lesson is that you should specify the format you want and not > rely on defaults :-) > > Incidentally MS SQL Server 2012 (probably other versions too) display the > milliseconds with a full stop by default but you get a colon if you use the > select I gave in my example. > > So, I suppose a full stop by default shouldn't cause any controversy. As > for locales.conf.. that I don't know. > > Cheers, > > Matthew. > > > April 16 2015 12:47 AM, "Geoff Montee" wrote: > > Hi Matthew, > > > > On Mon, Apr 13, 2015 at 11:48 PM, > wrote: > > > >> The vendor (Sybase) default seems to be with a colon > >> > > ( > http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc38151.1520/html/iqrefbb/ > >> onvert.htm). > >> > >> select convert(char(40),getdate(),109); > >> > >> ---------------------------------------- > >> Apr 14 2015 8:42:03:660AM > >> > >> Shouldn't we stick to that? > > > > In the page that you linked, I see that the format style you mention > > is #9 or #109, but I don't see anything to indicate that it is the > > "default." The default style for the convert function in Sybase ASE > > 16.0 appears to use style "100", which omits the milliseconds > > entirely. > > > > > http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc36271.1600/doc/html/san13 > > 3050437990.html > > > > The documentation also says that there should be a dot, not a colon, > > between the seconds and microseconds by default for the "bigdatetime" > > type: > > > > > http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc36271.1600/doc/html/san13 > > 3050393286.html > > > > > http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc36271.1600/doc/html/san13 > > 3050394051.html > > > > Confusingly, it seems to use a colon by default for the "time" type: > > > > > http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc36271.1600/doc/html/san13 > > 3050395880.html > > > > On another note, FreeTDS's documentation page for locales.conf says this: > > > > http://www.freetds.org/userguide/locales.htm > > > > "locales.conf will probably be dropped from FreeTDS one day. Its only > > real purpose now is to control the format of date strings. The Right > > Way? to deduce the appropriate default date format is from the > > application's locale settings, while allowing an override in > > freetds.conf. That's the direction we're headed." > > > > Has any thought been given to how date formatting should be handled > > after locales.conf goes away? > > > > Thanks, > > > > Geoff > > _______________________________________________ > > FreeTDS mailing list > > FreeTDS at lists.ibiblio.org > > http://lists.ibiblio.org/mailman/listinfo/freetds > _______________________________________________ > FreeTDS mailing list > FreeTDS at lists.ibiblio.org > http://lists.ibiblio.org/mailman/listinfo/freetds > From cramm0 at gmail.com Tue Apr 21 13:42:50 2015 From: cramm0 at gmail.com (Ramiro Morales) Date: Tue, 21 Apr 2015 14:42:50 -0300 Subject: [freetds] Symlinks for nightly tarballs, Windows builds via Appveyor CI platform Message-ID: First things first: Thanks Frediano (et al) for your hard work! Here's hoping 0.95 is a great release. I've found the files published under ftp://ftp.freetds.org/pub/freetds/ and their symlinks suffer from some issues: a. In current/ subdir: Newest snapshot as of now is freetds-dev.0.92.1014.tar.gz created on Apr 9 2015 which seems to be correct as the last commit to master branch is around such date but the freetds-current.tgz tarball actually poins to freetds-dev.0.92.990 from March 24. b. (nitpick) no freetds-current.tar.bz2 symlink is published. Found this while I was trying to set up automated builds of FreeTDS on Windows using hosted CI services provided by AppVeyor (appveyor.com, free for Open source projects). See [1] for an overview, [2] for the console output of one of the four build jobs I created and [3] for the corresponding artifacts. I've settled for now on creating a fork of the of [4]Branch-0_91 Git branch (0.91 plus stable fixes backported through the 2008-2014 period) in which ./configure has been [5]run on a Linux system to get some generated needed files created, performing some [6]code tweaks so MS Visual Studio can digest it, and compiling x86/x84 Visual Studio 2008/2010 versions by [7]crafting and adding the needed appveyor CI configuration. This is part of an effort to streamline testing and generation of releases for the FreeTDS-based [8]pymssql Python driver for SQL Server/TDS of which the official Windows binaries include FreeTDs linked in statically. No attempt has been made yet to run the test suite (SQL Server versions for 2008 onwards are available on Appveyor to run the tests against). I actually don't know if the suite works on Windows or if it contains "unixisms" that would make this impossible. Also, still haven't tried to build FreeTDS pre 0.95 (from the master branch). Hopefully will be able to do this soon, before the actual release happens. Maybe these appveyor CI config files can be incorporated into the FreeTDS tree at some point, once they are more mature. Something similar can be implemented for Linux CI builds using services of other similar companies like TravisCI/CircleCI, but in these cases test suite execution would need to be pointed to a SQL Server instance hosted somewhere else just like Marc Abramowitz implemented for pymssql some time ago. This is one of the advantages of being on GuitGub: Integratiion with that kind of third party services is trivial. Regards, 1. https://ci.appveyor.com/project/ramiro/freetds 2. https://ci.appveyor.com/project/ramiro/freetds/build/job/8ynnnuc17qe7m7f6 3. https://ci.appveyor.com/project/ramiro/freetds/build/job/8ynnnuc17qe7m7f6/artifacts 4. https://github.com/ramiro/freetds/tree/appveyor-0.91 5. https://github.com/ramiro/freetds/commit/ce181c3c8aa01a7e1ab489bc141a51aa18d11af9 6. https://github.com/ramiro/freetds/commit/6365d00188acf736c4e50db151461738c1d418f6 7. https://github.com/ramiro/freetds/commit/aa1038db5f882f80d6e7f4d483942f7b508a1d61 8. http://pymsssql.org -- Ramiro Morales @ramiromorales From cramm0 at gmail.com Tue Apr 21 14:48:41 2015 From: cramm0 at gmail.com (Ramiro Morales) Date: Tue, 21 Apr 2015 15:48:41 -0300 Subject: [freetds] Symlinks for nightly tarballs, Windows builds via Appveyor CI platform In-Reply-To: References: Message-ID: On Tue, Apr 21, 2015 at 2:42 PM, Ramiro Morales wrote: > > I've found the files published under ftp://ftp.freetds.org/pub/freetds/ and their symlinks suffer from some issues: > > a. In current/ subdir: Newest snapshot as of now is freetds-dev.0.92.1014.tar.gz created on Apr 9 2015 which seems to be correct as the last commit to master branch is around such date but the freetds-current.tgz tarball actually poins to freetds-dev.0.92.990 from March 24. > > b. (nitpick) no freetds-current.tar.bz2 symlink is published. One more I forgot: c. In stable/ subdir: The freetds-patched.tgz symlink points to an old snapshot from the Branch-0_91 branch as of Jun 24 2012 (it contanins a freetds-0.91.dev.20120624/ tree). It'd great if it pointed to a tarball of the actual tip of such branch. > [...] > > Something similar can be implemented for Linux CI builds using services of other similar companies like TravisCI/CircleCI, but in these cases test suite execution would need to be pointed to a SQL Server instance hosted somewhere else just like Marc Abramowitz implemented for pymssql some time ago. I see now there has been already work on this https://travis-ci.org/FreeTDS/freetds/branches by Marc and other individuals. Regards, -- Ramiro Morales @ramiromorales From freddy77 at gmail.com Wed Apr 22 14:15:25 2015 From: freddy77 at gmail.com (Frediano Ziglio) Date: Wed, 22 Apr 2015 19:15:25 +0100 Subject: [freetds] Symlinks for nightly tarballs, Windows builds via Appveyor CI platform In-Reply-To: References: Message-ID: Il 21/Apr/2015 22:19, "Ramiro Morales" ha scritto: > > On Tue, Apr 21, 2015 at 2:42 PM, Ramiro Morales wrote: > > > > I've found the files published under ftp://ftp.freetds.org/pub/freetds/ and their symlinks suffer from some issues: > > > > a. In current/ subdir: Newest snapshot as of now is freetds-dev.0.92.1014.tar.gz created on Apr 9 2015 which seems to be correct as the last commit to master branch is around such date but the freetds-current.tgz tarball actually poins to freetds-dev.0.92.990 from March 24. > > > > b. (nitpick) no freetds-current.tar.bz2 symlink is published. > > > One more I forgot: > > c. In stable/ subdir: The freetds-patched.tgz symlink points to an old > snapshot from the Branch-0_91 branch as of Jun 24 2012 (it contanins a > freetds-0.91.dev.20120624/ tree). It'd great if it pointed to a > tarball of the actual tip of such branch. > Dove all 3 points. I think I'll rename .tgz files to .tar.gz. > > [...] > > > > Something similar can be implemented for Linux CI builds using services of other similar companies like TravisCI/CircleCI, but in these cases test suite execution would need to be pointed to a SQL Server instance hosted somewhere else just like Marc Abramowitz implemented for pymssql some time ago. > > > I see now there has been already work on this > https://travis-ci.org/FreeTDS/freetds/branches by Marc and other > individuals. > The changes should be already integrated. Frediano From eda at waniasset.com Tue Apr 28 05:14:01 2015 From: eda at waniasset.com (Ed Avis) Date: Tue, 28 Apr 2015 09:14:01 +0000 (UTC) Subject: [freetds] freebcp transaction isolation level when 'bcp out' Message-ID: I run freebcp to make scheduled hourly backups of some tables. These are not a replacement for the normal database backup, but can be handy as a way to quickly recover from minor screwups or as a way to grep the history of a table over time. The tables being dumped are usually small and append-only - so new rows are added to them from time to time but rows are not updated and rarely deleted. Sometimes I find that the freebcp process gets blocked by some other process adding rows to one of these tables. I would be quite happy to do set transaction isolation level read uncommitted That would stop freebcp being blocked (or blocking anything else). It means that you can see rows which have been added by some other process and not yet committed, but for this particular application this is not an issue. I am happy to make that tradeoff in order to make the hourly dumps not get in the way of anything else. So I would like a way to tell freebcp what transaction isolation level to use. I see in bcp.c that it simply works by tds_submit_queryf(tds, "select * from %s", dbproc->bcpinfo->tablename) in other words there is no special magic for 'bcp out' - really it is just a convenience to dump the rows in the same format that can later be 'bcp in'. Could freebcp have an option to run some extra SQL before the 'select'? freebcp database..table out outfile -c \ -q 'set transaction isolation level read uncommitted' I think I could hack this up; would the patch be accepted? -- Ed Avis From matthew.green at datamartcomputing.com Tue Apr 28 07:02:21 2015 From: matthew.green at datamartcomputing.com (matthew.green at datamartcomputing.com) Date: Tue, 28 Apr 2015 11:02:21 +0000 Subject: [freetds] freebcp transaction isolation level when 'bcp out' In-Reply-To: References: Message-ID: <8bb7a9f52f27e063dec0eca66e38c32e@datamartcomputing.com> Hi Ed, I think adding an option could be a useful for some people. A work around would be to use a login script to set the isolation level. Coming back to adding a flag for this I think the processing would be similar to the text size flag, just without a value... if that helps. Cheers, Matthew. April 28 2015 12:17 PM, "Ed Avis" wrote: > I run freebcp to make scheduled hourly backups of some tables. These are not > a replacement for the normal database backup, but can be handy as a way to > quickly recover from minor screwups or as a way to grep the history of a table > over time. > > The tables being dumped are usually small and append-only - so new rows are > added to them from time to time but rows are not updated and rarely deleted. > > Sometimes I find that the freebcp process gets blocked by some other process > adding rows to one of these tables. I would be quite happy to do > > set transaction isolation level read uncommitted > > That would stop freebcp being blocked (or blocking anything else). It means > that you can see rows which have been added by some other process and not yet > committed, but for this particular application this is not an issue. I am > happy to make that tradeoff in order to make the hourly dumps not get in the > way of anything else. > > So I would like a way to tell freebcp what transaction isolation level to use. > I see in bcp.c that it simply works by > > tds_submit_queryf(tds, "select * from %s", dbproc->bcpinfo->tablename) > > in other words there is no special magic for 'bcp out' - really it is just > a convenience to dump the rows in the same format that can later be 'bcp in'. > > Could freebcp have an option to run some extra SQL before the 'select'? > > freebcp database..table out outfile -c \ > -q 'set transaction isolation level read uncommitted' > > I think I could hack this up; would the patch be accepted? > > -- > Ed Avis > > _______________________________________________ > FreeTDS mailing list > FreeTDS at lists.ibiblio.org > http://lists.ibiblio.org/mailman/listinfo/freetds From freddy77 at gmail.com Wed Apr 29 15:32:10 2015 From: freddy77 at gmail.com (Frediano Ziglio) Date: Wed, 29 Apr 2015 20:32:10 +0100 Subject: [freetds] Certification verification In-Reply-To: References: Message-ID: Hi, I finally finished code for SSL. Now "system" is accepted as "ca file" parameter and hostname verification is done (if "ca file" is provided). See https://github.com/freddy77/freetds/tree/certificate. Perhaps I could add ODBC options but it can be added later. If everything is all right I'm ready to start packing first rc version. Frediano 2015-04-06 18:10 GMT+01:00 Frediano Ziglio : > 2015-04-06 16:54 GMT+01:00 Peter Deacon : >> On Mon, 6 Apr 2015, Frediano Ziglio wrote: >> >>> Hi, >>> this is my last stopover before release. I wrote a patch to start >>> doing certificate verification, see >>> >>> https://github.com/freddy77/freetds/commit/557caf0e0af1c385d6cfd1602f593f9683ed6fc8. >>> >>> Now the problem is when to check. If a mssql is installed without >>> certificate a dummy certificate (self signed with a >>> "Self_Signed_Fallback" common name) is generate every time the sql >>> instance is started (not during the install so you cannot cache the >>> certificate of a given server). So there is no way to check these >>> certificates, FreeTDS (and MSSQL driver too) has to accept by default >>> these certificates. >>> The patch add two options to freetds.conf, "ca file" and "crl file", >>> respectively the file containing the root authorities and the >>> certificates revocation list (list of certificates to not accept). So >>> the key of the patch is: if you specify CA list you want to check >>> certificate, if not accept any certificates sent. Now, the questions >>> are: >> >> >>> - should FreeTDS check the common name (with server name inside) of >>> the certificate? >> >> >> Important if a global CA is used. Without checking an attacker can buy a >> cert from that CA and compromise security. >> >> Might also be important for company-wide CAs. Company might hand out a cert >> for a test server in a satellite office that compromises an important >> production server without the name checking. >> > > Mmm... perhaps would be nice to have a "ca files" instead with a list > of filenames like "file1:file2" were fileX is a file or "system" for > global system CAs. > >> Ususally hostname TDS is using (e.g. sqlserver.mydomain.com) would match CN >> of servers public key. >> >> In OpenSSL after you SSL_accept connection fetching CN might look something >> like: >> >> peer = SSL_get_peer_certificate(myconnection); >> X509_NAME_get_text_by_NID(X509_get_subject_name(peer),NID_commonName,output_cn_goes_here...) >> X509_free(peer); >> >> >> Sometimes CN can contain wildcards *.mydomain.com or additional valid hosts >> present in subject alternate name attributes of servers public key.. not >> sure either is needed/useful here. >> >>> - should I add an option to disable name verification? >> > > I think this can be useful, but default should be enabled. > >> >>> - should I read system CA list so to check the global list installed >>> in the system? I don't know if this is useful, are mssql with proper >>> certificate using a public CA? >> >> >> Dunno might be useful for someone connecting to a commercially hosted >> server..? >> >> Have Fun! >> Peter > > Thanks > > Frediano From freddy77 at gmail.com Wed Apr 29 15:39:30 2015 From: freddy77 at gmail.com (Frediano Ziglio) Date: Wed, 29 Apr 2015 20:39:30 +0100 Subject: [freetds] freebcp transaction isolation level when 'bcp out' In-Reply-To: References: Message-ID: 2015-04-28 10:14 GMT+01:00 Ed Avis : > I run freebcp to make scheduled hourly backups of some tables. These are not > a replacement for the normal database backup, but can be handy as a way to > quickly recover from minor screwups or as a way to grep the history of a table > over time. > > The tables being dumped are usually small and append-only - so new rows are > added to them from time to time but rows are not updated and rarely deleted. > > Sometimes I find that the freebcp process gets blocked by some other process > adding rows to one of these tables. I would be quite happy to do > > set transaction isolation level read uncommitted > > That would stop freebcp being blocked (or blocking anything else). It means > that you can see rows which have been added by some other process and not yet > committed, but for this particular application this is not an issue. I am > happy to make that tradeoff in order to make the hourly dumps not get in the > way of anything else. > > So I would like a way to tell freebcp what transaction isolation level to use. > I see in bcp.c that it simply works by > > tds_submit_queryf(tds, "select * from %s", dbproc->bcpinfo->tablename) > > in other words there is no special magic for 'bcp out' - really it is just > a convenience to dump the rows in the same format that can later be 'bcp in'. > > Could freebcp have an option to run some extra SQL before the 'select'? > > freebcp database..table out outfile -c \ > -q 'set transaction isolation level read uncommitted' > > I think I could hack this up; would the patch be accepted? > Looks like is easy, useful and back compatible so I don't see any reason to not accept any such patch. I would also test snapshot isolation level (I don't know how does it works). Frediano From cramm0 at gmail.com Sat May 2 17:14:33 2015 From: cramm0 at gmail.com (Ramiro Morales) Date: Sat, 2 May 2015 18:14:33 -0300 Subject: [freetds] alloca() usage, building master pre-0.95 on Windows Message-ID: Hi all, When trying to build the tools binaries with Visual studio 2008 (VC9) (actually a free subset called the Microsoft Visual C++ Compiler Package for Python 2.7) after tds.lib, db-lib and ctlib.lib have been built successfully (Thanks Frediano and Larry!), this happens: C:\>nmake -nologo -fNmakefile CONFIGURATION=release PLATFORM=win32 apps cl -nologo -W3 -EHsc -TC -Gm -errorReport:prompt -D "_MBCS" -D "_LIB" -D "WIN32" -D MSDBLIB -D "_CRT_SECURE_NO_WARNINGS" -D _CRT_NONSTDC_NO_DEPRECATE -D _WIN32_WINNT=0x0400 -I "include" -I "win32" -I "include\x64" -MD -O2 -D "_NDEBUG" -Zi -Fesrc\apps\win32\release\bsqldb.exe -Fd"src\apps\win32\release\vc80.pdb" src\apps\bsqldb.c -link -LIBPATH:src\dblib\win32\release db-lib.lib Ws2_32.lib shell32.lib bsqldb.c ... db-lib.lib(token.obj) : error LNK2019: unresolved external symbol _alloca referenced in function _tds_process_nbcrow src\apps\win32\release\bsqldb.exe : fatal error LNK1120: 1 unresolved externals NMAKE : fatal error U1077: '"C:\Users\Me\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\cl.EXE"' : return code '0x2' Stop. This is because there is one usage of alloca() in src/tds/token.c. With this toolchain, alloca() is available, not as a C runtime library function but is inserted inline by the compiler instead. Problem is: To get it to work and not generate the link-time error above, the malloc.h header file needs to be included (I suspect it contains the needed pre-processor+compiler magic so the inlining happens). My question is: What would be the best path to fix this?: 1. Modify token.c to use another function instead of alloca, e.g. malloc() which is widely used elsewhere in the code base? 2. Patch token.c so it conditionally #include if Visual C is detected? 3. Another option? The only other Microsoft toolchain I have available is the Microsoft WIndows SDK v7.1 which is also free and compatible with Visual studio 2010 I think and I see the same error there. Would be interested in experiences of users of newer commercial Visual Studio editions but I suspect the situation will be similar. Regards, -- Ramiro Morales @ramiromorales From cramm0 at gmail.com Sat May 2 17:45:39 2015 From: cramm0 at gmail.com (Ramiro Morales) Date: Sat, 2 May 2015 18:45:39 -0300 Subject: [freetds] alloca() usage, building master pre-0.95 on Windows In-Reply-To: References: Message-ID: On Sat, May 2, 2015 at 6:14 PM, Ramiro Morales wrote: > My question is: What would be the best path to fix this?: > > 1. Modify token.c to use another function instead of alloca, e.g. > malloc() which is widely used elsewhere in the code base? > 2. Patch token.c so it conditionally #include if Visual C > is detected? > 3. Another option? Forgot to say I tested option 2 successfully and this the last remaining issue to get master to build on Windows. -- Ramiro Morales @ramiromorales From freddy77 at gmail.com Sat May 2 19:47:06 2015 From: freddy77 at gmail.com (Frediano Ziglio) Date: Sun, 3 May 2015 00:47:06 +0100 Subject: [freetds] alloca() usage, building master pre-0.95 on Windows In-Reply-To: References: Message-ID: 2015-05-02 22:45 GMT+01:00 Ramiro Morales : > On Sat, May 2, 2015 at 6:14 PM, Ramiro Morales wrote: > >> My question is: What would be the best path to fix this?: >> >> 1. Modify token.c to use another function instead of alloca, e.g. >> malloc() which is widely used elsewhere in the code base? >> 2. Patch token.c so it conditionally #include if Visual C >> is detected? >> 3. Another option? > > Forgot to say I tested option 2 successfully and this the last > remaining issue to get master to build on Windows. > Well.. a git pull should be enough :) As is not a standard header I add check on configure scripts and included conditionally. Frediano From cramm0 at gmail.com Sun May 3 16:38:32 2015 From: cramm0 at gmail.com (Ramiro Morales) Date: Sun, 3 May 2015 17:38:32 -0300 Subject: [freetds] Symlinks for nightly tarballs, Windows builds via Appveyor CI platform In-Reply-To: References: Message-ID: On Wed, Apr 22, 2015 at 3:15 PM, Frediano Ziglio wrote: > > Dove all 3 points. I think I'll rename .tgz files to .tar.gz. It's working great now. Thank you! -- Ramiro Morales @ramiromorales From cramm0 at gmail.com Sun May 3 21:07:18 2015 From: cramm0 at gmail.com (Ramiro Morales) Date: Sun, 3 May 2015 22:07:18 -0300 Subject: [freetds] alloca() usage, building master pre-0.95 on Windows In-Reply-To: References: Message-ID: On Sat, May 2, 2015 at 8:47 PM, Frediano Ziglio wrote: >> Forgot to say I tested option 2 successfully and this the last >> remaining issue to get master to build on Windows. >> > > Well.. a git pull should be enough :) > > As is not a standard header I add check on configure scripts and > included conditionally. Thanks Frediano. This allows master to be built on Windows from the files contained in the nightly tarballs. I've got it working [1]on Appveyor by using a termporary [2]hack which downloads these tarballs and so (mis)uses the Git commit GitHub->Appveyor hook simply as a trigger to build them instead of building the files just checked out. To get it to build succesfully directly from a Git checkout the Windows-specific, Perl-based stage of the build process needs, in addition to the work you and Larry have been doing, to also create win332/config.h. I've opened PR [3]#8 with a solution for this. Once the dust settles I plan to open another thread proposing addition of Appveyor support in a way similar to what was done for Travis sometime ago and asking for some minor needed decisions. Work on this is in progress at [4] Regards, 1. https://ci.appveyor.com/project/ramiro/freetds/build/76 2. https://github.com/ramiro/freetds/blob/0f076f4d058ae39e61559c770b954022b1d821aa/.appveyor/appveyor.yml#L47 3. https://github.com/FreeTDS/freetds/pull/8/files 4. https://github.com/FreeTDS/freetds/compare/master...ramiro:appveyor?expand=1 -- Ramiro Morales @ramiromorales From freddy77 at gmail.com Tue May 5 14:33:52 2015 From: freddy77 at gmail.com (Frediano Ziglio) Date: Tue, 5 May 2015 19:33:52 +0100 Subject: [freetds] New release candidate available Message-ID: Hi, after 4 years of development we are proud to start preparing a new release of FreeTDS leading to 0.95. You can find a link at main page www.freetds.org or from the ftp site ftp://ftp.freetds.org/pub/freetds/stable/release_candidates/. Feel free to test and give any feedback. You can find a quite detailed list of changes in NEWS file but just as a sum: - MSSQL 2008 protocol; - better support for Windows builds; - MARS support where available; - IPv6; - improved applications (freebcp, datacopy); - support for newer protocols in ctlib and dblib; - ton of enhancement and optimizations. Regards, Frediano From sfhacker at hotmail.com Thu May 7 14:50:08 2015 From: sfhacker at hotmail.com (Sergio NNX) Date: Fri, 8 May 2015 04:50:08 +1000 Subject: [freetds] [0.95rc1] Some preliminary test results In-Reply-To: References: , , <20140421101925.b9044bc6.jklowden@freetds.org>, , , , <0cc1ec4c3989bd6363aba6c76e7a8fc8@xentu.com>, , <7bcf499156f914b9e7d8c1bc491adf18@xentu.com>, Message-ID: Thanks guys for all your hard work! Some test results .... using MS SQL Server 2008 Compile-time settings (established with the "configure" script) Version: freetds v0.95rc1 freetds.conf directory: \freetds-0.95rc1\etc MS db-lib source compatibility: no Sybase binary compatibility: no Thread safety: yes iconv library: yes TDS version: 7.0 iODBC: no unixodbc: yes SSPI "trusted" logins: yes Kerberos: yes (Heimdal 1.6.99) OpenSSL: yes (OpenSSL 1.0.2a) GnuTLS: no =================== All 20 tests passed (tds/unittests) =================== =================== All 29 tests passed (ctlib/unittests) =================== ==================== 2 of 35 tests failed (dblib/unittests) ==================== Failed tests: rpc, thread [...] retrieving output parameters... param name type length data ---- ------------------- ---- ----- ------------------------------ 1 @null_input 39 3 xml 2 @first_type 39 6 bigint 3 @nullout 56 0 4 @varchar_tds7_out 39 8000 ??????????... 5 @nvarchar_tds7_out 39 4000 ??????????... 6 @nrows 56 4 3 Good: Got 6 output parameters and 1 return status of 42. Expected an empty resultset got 2. FAIL rpc (exit status: 1) ==================== 8 of 71 tests failed (odbc/unittests) ==================== Failed tests: connect, genparams, rpc, typeinfo, describecol, timeout3, freeclose, cancel From velichko.yuriy at gmail.com Thu May 7 14:58:38 2015 From: velichko.yuriy at gmail.com (Velichko Yuriy) Date: Thu, 7 May 2015 21:58:38 +0300 Subject: [freetds] Is there a plan of full implementation of dbcolinfo Message-ID: ?Hello! I want to figure out what tables takes a part in the query result. As I understood, the function dbcolinfo may help. According to the docs, to fetch the table name I have pass param CI_CURSOR ?to this function. But according to FreeTDS docs: (CI_CURSOR is defined by the vendor, but is not yet implemented). ? Is there a hope that this feature will be implemented? Or maybe somebody knows how to solve this problem in another way? ? From eda at waniasset.com Fri May 8 05:38:13 2015 From: eda at waniasset.com (Ed Avis) Date: Fri, 8 May 2015 09:38:13 +0000 (UTC) Subject: [freetds] New release candidate available References: Message-ID: I'm using the new release candidate successfully on Linux with MSSQL 2008 R2. -- Ed Avis From eda at waniasset.com Fri May 8 05:40:39 2015 From: eda at waniasset.com (Ed Avis) Date: Fri, 8 May 2015 09:40:39 +0000 (UTC) Subject: [freetds] freebcp transaction isolation level when 'bcp out' References: Message-ID: The new -O option to freebcp (in 0.95rc1) can be used: freebcp database..table out file \ -O 'set transaction isolation level read uncommitted' ... Thanks! My only qualm is the behaviour of reading from a file if 'a valid filename'. That sounds like it could too easily go wrong - filenames can contain spaces, and SQL can consist of a single word. I suggest it would be better to have two separate options. -- Ed Avis From eda at waniasset.com Fri May 8 07:53:52 2015 From: eda at waniasset.com (Ed Avis) Date: Fri, 8 May 2015 11:53:52 +0000 (UTC) Subject: [freetds] Bug with new release candidate, 'freebcp in', and date format References: Message-ID: I've found a change in behaviour with date parsing and freebcp. Create a global temporary table to copy into: > create table ##test (dt date not null, value int not null) Now make a CSV file and load it in: % echo 26-Jul-2000,1 >test.csv % freebcp '##test' in test.csv -S MYSERVER -U mydb -P mypass -c -t ',' The date in the CSV file is misparsed: > select * from ##test; dt value ---------- ----------- 1900-07-01 1 This is new with 0.95 - it works OK with revision 0a42888. I didn't see it mentioned in the ChangeLog file. Are these dates being parsed by the server or by freebcp itself? -- Ed Avis From freddy77 at gmail.com Fri May 8 14:10:51 2015 From: freddy77 at gmail.com (Frediano Ziglio) Date: Fri, 8 May 2015 19:10:51 +0100 Subject: [freetds] [0.95rc1] Some preliminary test results In-Reply-To: References: <20140421101925.b9044bc6.jklowden@freetds.org> <0cc1ec4c3989bd6363aba6c76e7a8fc8@xentu.com> <7bcf499156f914b9e7d8c1bc491adf18@xentu.com> Message-ID: 2015-05-07 19:50 GMT+01:00 Sergio NNX : > Thanks guys for all your hard work! > > Some test results .... using MS SQL Server 2008 > > Compile-time settings (established with the "configure" script) > Version: freetds v0.95rc1 > freetds.conf directory: \freetds-0.95rc1\etc > MS db-lib source compatibility: no > Sybase binary compatibility: no > Thread safety: yes > iconv library: yes > TDS version: 7.0 > iODBC: no > unixodbc: yes > SSPI "trusted" logins: yes > Kerberos: yes (Heimdal 1.6.99) > OpenSSL: yes (OpenSSL 1.0.2a) > GnuTLS: no > Looks like a Windows build! Good. > > =================== > All 20 tests passed (tds/unittests) > =================== > > =================== > All 29 tests passed (ctlib/unittests) > =================== > > ==================== > 2 of 35 tests failed (dblib/unittests) > ==================== > > Failed tests: rpc, thread > > [...] > retrieving output parameters... > param name type length data > ---- ------------------- ---- ----- ------------------------------ > 1 @null_input 39 3 xml > 2 @first_type 39 6 bigint > 3 @nullout 56 0 > 4 @varchar_tds7_out 39 8000 ??????????... > 5 @nvarchar_tds7_out 39 4000 ??????????... > 6 @nrows 56 4 3 > Good: Got 6 output parameters and 1 return status of 42. > Expected an empty resultset got 2. > FAIL rpc (exit status: 1) > This is quite weird. Which server and protocol version are you using? Can you enable dumps? > ==================== > 8 of 71 tests failed (odbc/unittests) > ==================== > > Failed tests: connect, genparams, rpc, typeinfo, describecol, timeout3, freeclose, cancel > I think you are using protocol 7.0 with a newer server. Looks like this combination make some tests fails (genparams, describecol and perhaps type info). About timeout3, freeclose and connect perhaps these require some hack that not work that well on Windows. cancel worry me a bit. Can you post outputs? Frediano From freddy77 at gmail.com Fri May 8 14:13:07 2015 From: freddy77 at gmail.com (Frediano Ziglio) Date: Fri, 8 May 2015 19:13:07 +0100 Subject: [freetds] Is there a plan of full implementation of dbcolinfo In-Reply-To: References: Message-ID: 2015-05-07 19:58 GMT+01:00 Velichko Yuriy : > Hello! > > I want to figure out what tables takes a part in the query result. As I > understood, the function dbcolinfo may help. According to the docs, to > fetch the table name I have pass param CI_CURSOR to this function. But > according to FreeTDS docs: > > (CI_CURSOR is defined by the vendor, but is not yet implemented). > > > Is there a hope that this feature will be implemented? > > Or maybe somebody knows how to solve this problem in another way? > No plan. I don't remember if this information is fetched from the server. If yes should not be difficult to add. As a new feature won't not be in my priorities (we are going to have finally a release :) ) Frediano From freddy77 at gmail.com Fri May 8 14:16:37 2015 From: freddy77 at gmail.com (Frediano Ziglio) Date: Fri, 8 May 2015 19:16:37 +0100 Subject: [freetds] Bug with new release candidate, 'freebcp in', and date format In-Reply-To: References: Message-ID: 2015-05-08 12:53 GMT+01:00 Ed Avis : > I've found a change in behaviour with date parsing and freebcp. > Create a global temporary table to copy into: > > > create table ##test (dt date not null, value int not null) > > Now make a CSV file and load it in: > > % echo 26-Jul-2000,1 >test.csv > % freebcp '##test' in test.csv -S MYSERVER -U mydb -P mypass -c -t ',' > > The date in the CSV file is misparsed: > > > select * from ##test; > dt value > ---------- ----------- > 1900-07-01 1 > > This is new with 0.95 - it works OK with revision 0a42888. I didn't see it > mentioned in the ChangeLog file. > > Are these dates being parsed by the server or by freebcp itself? > I tried to reproduce the problem with a simple script and worked really good (mssql 2008 with 7.3 protocol) then I tried with a former protocol (from 7.0 to 7.2) and server say the column is a NVARCHAR, then freebcp (correctly) try to send a string to server. The strange thing is that my server converted the "26-Jun-2000" to 1900-06-01 !!! I looked at log and server just accept the string and insert that strange value. Can you check which protocol version are you using? Frediano From sfhacker at hotmail.com Fri May 8 15:14:06 2015 From: sfhacker at hotmail.com (Sergio NNX) Date: Sat, 9 May 2015 05:14:06 +1000 Subject: [freetds] [0.95rc1] Some preliminary test results In-Reply-To: References: , <20140421101925.b9044bc6.jklowden@freetds.org>, , <0cc1ec4c3989bd6363aba6c76e7a8fc8@xentu.com>, , <7bcf499156f914b9e7d8c1bc491adf18@xentu.com>, , , Message-ID: Thanks for looking into this. > Date: Fri, 8 May 2015 19:10:51 +0100 > From: freddy77 at gmail.com > To: freetds at lists.ibiblio.org > Subject: Re: [freetds] [0.95rc1] Some preliminary test results > > 2015-05-07 19:50 GMT+01:00 Sergio NNX : > > Thanks guys for all your hard work! > > > > Some test results .... using MS SQL Server 2008 > > > > Compile-time settings (established with the "configure" script) > > Version: freetds v0.95rc1 > > freetds.conf directory: \freetds-0.95rc1\etc > > MS db-lib source compatibility: no > > Sybase binary compatibility: no > > Thread safety: yes > > iconv library: yes > > TDS version: 7.0 > > iODBC: no > > unixodbc: yes > > SSPI "trusted" logins: yes > > Kerberos: yes (Heimdal 1.6.99) > > OpenSSL: yes (OpenSSL 1.0.2a) > > GnuTLS: no > > > > Looks like a Windows build! Good. Indeed it is! > > > > > =================== > > All 20 tests passed (tds/unittests) > > =================== > > > > =================== > > All 29 tests passed (ctlib/unittests) > > =================== > > > > ==================== > > 2 of 35 tests failed (dblib/unittests) > > ==================== > > > > Failed tests: rpc, thread > > > > [...] > > retrieving output parameters... > > param name type length data > > ---- ------------------- ---- ----- ------------------------------ > > 1 @null_input 39 3 xml > > 2 @first_type 39 6 bigint > > 3 @nullout 56 0 > > 4 @varchar_tds7_out 39 8000 ??????????... > > 5 @nvarchar_tds7_out 39 4000 ??????????... > > 6 @nrows 56 4 3 > > Good: Got 6 output parameters and 1 return status of 42. > > Expected an empty resultset got 2. > > FAIL rpc (exit status: 1) > > > > This is quite weird. Which server and protocol version are you using? > Can you enable dumps? Whichever version is set by the command 'make check' I'll try to enable dumps and re-run the tests > > > ==================== > > 8 of 71 tests failed (odbc/unittests) > > ==================== > > > > Failed tests: connect, genparams, rpc, typeinfo, describecol, timeout3, freeclose, cancel > > > > I think you are using protocol 7.0 with a newer server. Looks like > this combination make some tests fails (genparams, describecol and > perhaps type info). About timeout3, freeclose and connect perhaps > these require some hack that not work that well on Windows. cancel > worry me a bit. Can you post outputs? When you type 'make check', does it set any protocol version? If I use protocol 8.0, I get exactly the same number (and name) of failed tests. ---- connect test output ---- ... ... connect string DSN connect.. connect string SERVERNAME connect.. odbcinst.ini must be configured with FreeTDS driver.. Unable to open data source (ret=-1) Unable to open data source (ret=-1) Unable to open data source (ret=-1) connect.c:129 Too few successes FAIL connect.exe (exit status: 1) --- freeclose test output --- ... ... Error finding last socket opened FAIL freeclose.exe (exit status: 1) --- typeinfo test output --- ... ... select cast(getdate() as date) CheckType 139 CheckType 141 Data expected. Input type 9 - SQL_DATE line 141 FAIL typeinfo.exe (exit status: 1) --- timeout3 test output --- Fake server binded at port 12340 try to connect to our port just to check connection timeout gdb: unknown target exception 0xc0000008 at 0x76e012f7 Program received signal ?, Unknown signal. 0x76fb15ee in ntdll!LdrQueryProcessModuleInformation () from C:\Windows\system32\ntdll.dll (gdb) bt #0 0x76fb15ee in ntdll!LdrQueryProcessModuleInformation () from C:\Windows\system32\ntdll.dll #1 0x76fb15ee in ntdll!LdrQueryProcessModuleInformation () from C:\Windows\system32\ntdll.dll #2 0x76fa015e in ntdll!LdrFindResource_U () from C:\Windows\system32\ntdll.dll #3 0x002880d4 in ?? () #4 0x768f1438 in KERNEL32!GetPrivateProfileStructA () from C:\Windows\syswow64\kernel32.dll #5 0x00400000 in ?? () #6 0x0046d62d in dlsym () #7 0x00288618 in ?? () #8 0x00000000 in ?? () NB: The word 'binded' exists? --- cancel test output --- odbctest -------- connection parameters: server: 'MSSQLTestServer' user: 'guest' password: '????' database: 'tempdb' gdb: unknown target exception 0xc0000008 at 0x76e012f7 Program received signal ?, Unknown signal. 0x76fb15ee in ntdll!LdrQueryProcessModuleInformation () from C:\Windows\system32\ntdll.dll From freddy77 at gmail.com Sat May 9 17:59:21 2015 From: freddy77 at gmail.com (Frediano Ziglio) Date: Sat, 9 May 2015 22:59:21 +0100 Subject: [freetds] [0.95rc1] Some preliminary test results In-Reply-To: References: <20140421101925.b9044bc6.jklowden@freetds.org> <0cc1ec4c3989bd6363aba6c76e7a8fc8@xentu.com> <7bcf499156f914b9e7d8c1bc491adf18@xentu.com> Message-ID: 2015-05-07 19:50 GMT+01:00 Sergio NNX : > Thanks guys for all your hard work! > > Some test results .... using MS SQL Server 2008 > > Compile-time settings (established with the "configure" script) > Version: freetds v0.95rc1 > freetds.conf directory: \freetds-0.95rc1\etc > MS db-lib source compatibility: no > Sybase binary compatibility: no > Thread safety: yes > iconv library: yes > TDS version: 7.0 > iODBC: no > unixodbc: yes > SSPI "trusted" logins: yes > Kerberos: yes (Heimdal 1.6.99) > OpenSSL: yes (OpenSSL 1.0.2a) > GnuTLS: no > > > =================== > All 20 tests passed (tds/unittests) > =================== Where are src/replacements/unittests? Are you using Cygwin or MingW. I suspect some problems raise from test that create thread. Can you post your config.h? > > =================== > All 29 tests passed (ctlib/unittests) > =================== > > ==================== > 2 of 35 tests failed (dblib/unittests) > ==================== > > Failed tests: rpc, thread > > [...] > retrieving output parameters... > param name type length data > ---- ------------------- ---- ----- ------------------------------ > 1 @null_input 39 3 xml > 2 @first_type 39 6 bigint > 3 @nullout 56 0 > 4 @varchar_tds7_out 39 8000 ??????????... > 5 @nvarchar_tds7_out 39 4000 ??????????... > 6 @nrows 56 4 3 > Good: Got 6 output parameters and 1 return status of 42. > Expected an empty resultset got 2. > FAIL rpc (exit status: 1) > > ==================== > 8 of 71 tests failed (odbc/unittests) > ==================== > > Failed tests: connect, genparams, rpc, typeinfo, describecol, timeout3, freeclose, cancel > Frediano From sfhacker at hotmail.com Sat May 9 18:24:32 2015 From: sfhacker at hotmail.com (Sergio NNX) Date: Sun, 10 May 2015 08:24:32 +1000 Subject: [freetds] [0.95rc1] Some preliminary test results In-Reply-To: References: , <20140421101925.b9044bc6.jklowden@freetds.org>, , <0cc1ec4c3989bd6363aba6c76e7a8fc8@xentu.com>, , <7bcf499156f914b9e7d8c1bc491adf18@xentu.com>, , , Message-ID: > Where are src/replacements/unittests? > Are you using Cygwin or MingW. > I suspect some problems raise from test that create thread. Can you > post your config.h? Sorry, I forgot to include them! Here they are: ... ... make[2]: Entering directory `/src/freetds-0.95rc1/src/replacements/unittests' PASS: mutex1.exe PASS: condition.exe PASS: strings.exe PASS: passarg.exe ============================================================================ Testsuite summary for FreeTDS 0.95rc1 ============================================================================ # TOTAL: 4 # PASS: 4 # SKIP: 0 # XFAIL: 0 # FAIL: 0 # XPASS: 0 # ERROR: 0 ============================================================================ We use MinGW here. config.h (sorry it's a bit long) /* include/config.h. Generated from config.h.in by configure. */ /* include/config.h.in. Generated from configure.ac by autoheader. */ /* Define if building universal (internal helper macro) */ /* #undef AC_APPLE_UNIVERSAL_BUILD */ /* Define to 1 if you need BSD_COMP defined to get FIONBIO defined. */ /* #undef BSD_COMP */ /* Define to enable work in progress code */ /* #undef ENABLE_DEVELOPING */ /* Define to enable extra checks on code */ /* #undef ENABLE_EXTRA_CHECKS */ /* Defined if --enable-krb5 used and library detected */ /* #undef ENABLE_KRB5 */ /* Define to enable MARS support */ /* #undef ENABLE_ODBC_MARS */ /* Define to enable ODBC wide string support */ #define ENABLE_ODBC_WIDE 1 /* Define to 1 if you have the `alarm' function. */ /* #undef HAVE_ALARM */ /* Define to 1 if you have the header file. */ /* #undef HAVE_ARPA_INET_H */ /* Define to 1 if you have the `asprintf' function. */ /* #undef HAVE_ASPRINTF */ /* Define to 1 if you have the `basename' function. */ #define HAVE_BASENAME 1 /* Define if you have the clock_gettime function. */ /* #undef HAVE_CLOCK_GETTIME */ /* Define to 1 if you have the header file. */ /* #undef HAVE_COM_ERR_H */ /* Define to 1 if you have the declaration of `cygwin_conv_path', and to 0 if you don't. */ #define HAVE_DECL_CYGWIN_CONV_PATH 0 /* Define to 1 if you have the declaration of `tzname', and to 0 if you don't. */ #define HAVE_DECL_TZNAME 1 /* Define to 1 if you have the header file. */ #define HAVE_DIRENT_H 1 /* Define if you have the GNU dld library. */ /* #undef HAVE_DLD */ /* Define to 1 if you have the `dlerror' function. */ #define HAVE_DLERROR 1 /* Define to 1 if you have the header file. */ #define HAVE_DLFCN_H 1 /* Define if you have the _dyld_func_lookup function. */ /* #undef HAVE_DYLD */ /* Define to 1 if you have the header file. */ #define HAVE_ERRNO_H 1 /* Define to 1 if you have the `error_message' function. */ /* #undef HAVE_ERROR_MESSAGE */ /* Define to 1 if you have the `fork' function. */ /* #undef HAVE_FORK */ /* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ /* #undef HAVE_FSEEKO */ /* Define to 1 if you have the `fstat' function. */ #define HAVE_FSTAT 1 /* Define to 1 if your system provides the 5-parameter version of gethostbyaddr_r(). */ /* #undef HAVE_FUNC_GETHOSTBYADDR_R_5 */ /* Define to 1 if your system provides the 7-parameter version of gethostbyaddr_r(). */ /* #undef HAVE_FUNC_GETHOSTBYADDR_R_7 */ /* Define to 1 if your system provides the 8-parameter version of gethostbyaddr_r(). */ /* #undef HAVE_FUNC_GETHOSTBYADDR_R_8 */ /* Define to 1 if your system provides the 3-parameter version of gethostbyname_r(). */ /* #undef HAVE_FUNC_GETHOSTBYNAME_R_3 */ /* Define to 1 if your system provides the 5-parameter version of gethostbyname_r(). */ /* #undef HAVE_FUNC_GETHOSTBYNAME_R_5 */ /* Define to 1 if your system provides the 6-parameter version of gethostbyname_r(). */ /* #undef HAVE_FUNC_GETHOSTBYNAME_R_6 */ /* Define to 1 if your system provides the 4-parameter version of getpwuid_r(). */ /* #undef HAVE_FUNC_GETPWUID_R_4 */ /* Define to 1 if your system getpwuid_r() have 4 parameters and return struct passwd*. */ /* #undef HAVE_FUNC_GETPWUID_R_4_PW */ /* Define to 1 if your system provides the 5-parameter version of getpwuid_r(). */ /* #undef HAVE_FUNC_GETPWUID_R_5 */ /* Define to 1 if your system provides the 4-parameter version of getservbyname_r(). */ /* #undef HAVE_FUNC_GETSERVBYNAME_R_4 */ /* Define to 1 if your system provides the 5-parameter version of getservbyname_r(). */ /* #undef HAVE_FUNC_GETSERVBYNAME_R_5 */ /* Define to 1 if your system provides the 6-parameter version of getservbyname_r(). */ /* #undef HAVE_FUNC_GETSERVBYNAME_R_6 */ /* Define to 1 if your localtime_r return a int. */ #define HAVE_FUNC_LOCALTIME_R_INT 1 /* Define to 1 if your localtime_r return a struct tm*. */ /* #undef HAVE_FUNC_LOCALTIME_R_TM */ /* Define if you have getaddrinfo function */ #define HAVE_GETADDRINFO 1 /* Define to 1 if you have the `gethostname' function. */ #define HAVE_GETHOSTNAME 1 /* Define to 1 if you have the `gethrtime' function. */ /* #undef HAVE_GETHRTIME */ /* Define to 1 if you have the `getipnodebyaddr' function. */ /* #undef HAVE_GETIPNODEBYADDR */ /* Define to 1 if you have the `getipnodebyname' function. */ /* #undef HAVE_GETIPNODEBYNAME */ /* Define to 1 if you have the `getopt' function. */ #define HAVE_GETOPT 1 /* Define if your getopt(3) defines and uses optreset */ /* #undef HAVE_GETOPT_OPTRESET */ /* Define to 1 if you have the `getpwuid' function. */ /* #undef HAVE_GETPWUID */ /* Define to 1 if you have the `getpwuid_r' function. */ /* #undef HAVE_GETPWUID_R */ /* Define to 1 if you have the `gettimeofday' function. */ #define HAVE_GETTIMEOFDAY 1 /* Define to 1 if you have the `getuid' function. */ /* #undef HAVE_GETUID */ /* Define to 1 if you have GNU tls. */ /* #undef HAVE_GNUTLS */ /* Define to 1 if you have the `gnutls_record_disable_padding' function. */ /* #undef HAVE_GNUTLS_RECORD_DISABLE_PADDING */ /* Define if you have the iconv() function. */ #define HAVE_ICONV 1 /* Define to 1 if you have the `inet_ntoa_r' function. */ /* #undef HAVE_INET_NTOA_R */ /* Define to 1 if you have the `inet_ntop' function. */ /* #undef HAVE_INET_NTOP */ /* Define to 1 if you have the header file. */ #define HAVE_INTTYPES_H 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_IODBCINST_H */ /* Define to 1 if you have the header file. */ /* #undef HAVE_LANGINFO_H */ /* Define if you have the libdl library or equivalent. */ #define HAVE_LIBDL 1 /* Define if libdlloader will be built on this platform */ #define HAVE_LIBDLLOADER 1 /* Define to 1 if you have the header file. */ #define HAVE_LIBGEN_H 1 /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 /* Define to 1 if you have the header file. */ #define HAVE_LOCALCHARSET_H 1 /* Define to 1 if you have the `locale_charset' function. */ /* #undef HAVE_LOCALE_CHARSET */ /* Define to 1 if you have the header file. */ #define HAVE_LOCALE_H 1 /* Define to 1 if you have the `localtime_r' function. */ /* #undef HAVE_LOCALTIME_R */ /* Define to 1 if you have the header file. */ #define HAVE_MALLOC_H 1 /* Define to 1 if your system provides the malloc_options variable. */ /* #undef HAVE_MALLOC_OPTIONS */ /* Define to 1 if you have the header file. */ #define HAVE_MEMORY_H 1 /* Define to 1 if you have the `nanosleep' function. */ /* #undef HAVE_NANOSLEEP */ /* Define to 1 if you have the header file. */ /* #undef HAVE_NETDB_H */ /* Define to 1 if you have the header file. */ /* #undef HAVE_NETINET_IN_H */ /* Define to 1 if you have the header file. */ /* #undef HAVE_NETINET_TCP_H */ /* Define to 1 if you have the `nl_langinfo' function. */ /* #undef HAVE_NL_LANGINFO */ /* Define to 1 if you have the header file. */ /* #undef HAVE_ODBCSS_H */ /* Define if you have the OpenSSL. */ #define HAVE_OPENSSL 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_PATHS_H */ /* Define to 1 if you have the `poll' function. */ /* #undef HAVE_POLL */ /* Define to 1 if you have the header file. */ /* #undef HAVE_POLL_H */ /* Define if you have POSIX threads libraries and header files. */ /* #undef HAVE_PTHREAD */ /* Define to 1 if you have the `pthread_condattr_setclock' function. */ /* #undef HAVE_PTHREAD_CONDATTR_SETCLOCK */ /* Define to 1 if you have the `pthread_cond_timedwait' function. */ /* #undef HAVE_PTHREAD_COND_TIMEDWAIT */ /* Define to 1 if you have the `putenv' function. */ #define HAVE_PUTENV 1 /* Define to 1 if you have the `readdir_r' function. */ /* #undef HAVE_READDIR_R */ /* Define to 1 if you have the GNU Readline library. */ /* #undef HAVE_READLINE */ /* Define to 1 if you have the `readpassphrase' function. */ /* #undef HAVE_READPASSPHRASE */ /* Define to 1 if you have the header file. */ /* #undef HAVE_READPASSPHRASE_H */ /* Define to 1 if you have rl_inhibit_completion. */ /* #undef HAVE_RL_INHIBIT_COMPLETION */ /* Define to 1 if you have the `rl_on_new_line' function. */ /* #undef HAVE_RL_ON_NEW_LINE */ /* Define to 1 if you have the `rl_reset_line_state' function. */ /* #undef HAVE_RL_RESET_LINE_STATE */ /* Define to 1 if you have the header file. */ /* #undef HAVE_ROKEN_H */ /* Define to 1 if you have the `setenv' function. */ /* #undef HAVE_SETENV */ /* Define to 1 if you have the `setitimer' function. */ /* #undef HAVE_SETITIMER */ /* Define to 1 if you have the `setrlimit' function. */ /* #undef HAVE_SETRLIMIT */ /* Define if you have the shl_load function. */ /* #undef HAVE_SHL_LOAD */ /* Define to 1 if you have the header file. */ #define HAVE_SIGNAL_H 1 /* Define to 1 if you have the `socketpair' function. */ /* #undef HAVE_SOCKETPAIR */ /* Define to 1 if you have the SQLGetPrivateProfileString function. */ #define HAVE_SQLGETPRIVATEPROFILESTRING 1 /* Define if sqltypes.h define SQLLEN */ #define HAVE_SQLLEN 1 /* Define to 1 if the system has the type `SQLROWOFFSET'. */ #define HAVE_SQLROWOFFSET 1 /* Define to 1 if the system has the type `SQLROWSETSIZE'. */ #define HAVE_SQLROWSETSIZE 1 /* Define to 1 if the system has the type `SQLSETPOSIROW'. */ #define HAVE_SQLSETPOSIROW 1 /* Define to 1 if you have the header file. */ #define HAVE_SQL_H 1 /* Defined if not --disable-sspi and SSPI detected */ #define HAVE_SSPI 1 /* Define to 1 if you have the header file. */ #define HAVE_STDDEF_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STDINT_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STDLIB_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STRINGS_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STRING_H 1 /* Define to 1 if you have the `strlcat' function. */ /* #undef HAVE_STRLCAT */ /* Define to 1 if you have the `strlcpy' function. */ /* #undef HAVE_STRLCPY */ /* Define to 1 if you have the `strsep' function. */ /* #undef HAVE_STRSEP */ /* Define to 1 if you have the `strtok_r' function. */ /* #undef HAVE_STRTOK_R */ /* Define to 1 if `tm_zone' is a member of `struct tm'. */ /* #undef HAVE_STRUCT_TM_TM_ZONE */ /* Define to 1 if `__tm_zone' is a member of `struct tm'. */ /* #undef HAVE_STRUCT_TM___TM_ZONE */ /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_IOCTL_H */ /* Define to 1 if you have the header file. */ #define HAVE_SYS_PARAM_H 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_RESOURCE_H */ /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_SELECT_H */ /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_SOCKET_H */ /* Define to 1 if you have the header file. */ #define HAVE_SYS_STAT_H 1 /* Define to 1 if you have the header file. */ #define HAVE_SYS_TIME_H 1 /* Define to 1 if you have the header file. */ #define HAVE_SYS_TYPES_H 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_WAIT_H */ /* Define to 1 if your `struct tm' has `tm_zone'. Deprecated, use `HAVE_STRUCT_TM_TM_ZONE' instead. */ /* #undef HAVE_TM_ZONE */ /* Define to 1 if you don't have `tm_zone' but do have the external array `tzname'. */ #define HAVE_TZNAME 1 /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 /* Define to 1 if you have the `usleep' function. */ #define HAVE_USLEEP 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_VALGRIND_MEMCHECK_H */ /* Define to 1 if you have the `vasprintf' function. */ /* #undef HAVE_VASPRINTF */ /* Define to 1 if you have the `vsnprintf' function. */ #define HAVE_VSNPRINTF 1 /* Define to 1 if you have the header file. */ #define HAVE_WCHAR_H 1 /* Define to 1 if you have the header file. */ #define HAVE_WINDOWS_H 1 /* Define to 1 if you have the header file. */ #define HAVE_WINSOCK2_H 1 /* Define to 1 if you have the `_atoi64' function. */ #define HAVE__ATOI64 1 /* Define to 1 if you have the `_fseeki64' function. */ #define HAVE__FSEEKI64 1 /* Define to 1 if you have the `_ftelli64' function. */ /* #undef HAVE__FTELLI64 */ /* Define to 1 if you have the `_lock_file' function. */ /* #undef HAVE__LOCK_FILE */ /* Define to 1 if you have the `_lseeki64' function. */ #define HAVE__LSEEKI64 1 /* Define to 1 if you have the `_telli64' function. */ #define HAVE__TELLI64 1 /* Define to 1 if you have the `_unlock_file' function. */ /* #undef HAVE__UNLOCK_FILE */ /* Define to 1 if you have the `_vscprintf' function. */ #define HAVE__VSCPRINTF 1 /* Define to 1 if you have the `_vsnprintf' function. */ #define HAVE__VSNPRINTF 1 /* Define to 1 if you have the `_xpg_accept' function. */ /* #undef HAVE__XPG_ACCEPT */ /* Define to 1 if you have the `_xpg_getpeername' function. */ /* #undef HAVE__XPG_GETPEERNAME */ /* Define to 1 if you have the `_xpg_getsockname' function. */ /* #undef HAVE__XPG_GETSOCKNAME */ /* Define to 1 if you have the `_xpg_getsockopt' function. */ /* #undef HAVE__XPG_GETSOCKOPT */ /* Define to 1 if you have the `_xpg_recvfrom' function. */ /* #undef HAVE__XPG_RECVFROM */ /* Define to 1 if you have the `__accept' function. */ /* #undef HAVE___ACCEPT */ /* Define to 1 if you have the `__getpeername' function. */ /* #undef HAVE___GETPEERNAME */ /* Define to 1 if you have the `__getsockname' function. */ /* #undef HAVE___GETSOCKNAME */ /* Define to 1 if you have the `__getsockopt' function. */ /* #undef HAVE___GETSOCKOPT */ /* Define to 1 if you have the `__recvfrom' function. */ /* #undef HAVE___RECVFROM */ /* Define as const if the declaration of iconv() needs const. */ #define ICONV_CONST /* Define to value of INADDR_NONE if not provided by your system header files. */ /* #undef INADDR_NONE */ /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" /* Define to 1 if the BSD-style netdb interface is reentrant. */ /* #undef NETDB_REENTRANT */ /* Define to 1 if memset(0) sets pointers to NULL. */ #define NULL_REP_IS_ZERO_BYTES 1 /* Name of package */ #define PACKAGE "freetds" /* Define to the address where bug reports for this package should be sent. */ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ #define PACKAGE_NAME "FreeTDS" /* Define to the full name and version of this package. */ #define PACKAGE_STRING "FreeTDS 0.95rc1" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "freetds" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ #define PACKAGE_VERSION "0.95rc1" /* Define to necessary symbol if this constant uses a non-standard name on your system. */ /* #undef PTHREAD_CREATE_JOINABLE */ /* The size of `char', as computed by sizeof. */ #define SIZEOF_CHAR 1 /* The size of `double', as computed by sizeof. */ #define SIZEOF_DOUBLE 8 /* The size of `float', as computed by sizeof. */ #define SIZEOF_FLOAT 4 /* The size of `int', as computed by sizeof. */ #define SIZEOF_INT 4 /* The size of `long', as computed by sizeof. */ #define SIZEOF_LONG 4 /* The size of `long double', as computed by sizeof. */ #define SIZEOF_LONG_DOUBLE 12 /* The size of `long long', as computed by sizeof. */ #define SIZEOF_LONG_LONG 8 /* The size of `short', as computed by sizeof. */ #define SIZEOF_SHORT 2 /* The size of `SQLWCHAR', as computed by sizeof. */ #define SIZEOF_SQLWCHAR 2 /* The size of `void *', as computed by sizeof. */ #define SIZEOF_VOID_P 4 /* The size of `wchar_t', as computed by sizeof. */ #define SIZEOF_WCHAR_T 2 /* The size of `__int64', as computed by sizeof. */ #define SIZEOF___INT64 8 /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 /* Define to use TDS 4.2 by default */ /* #undef TDS42 */ /* Define to use TDS 4.6 by default */ /* #undef TDS46 */ /* Define to use TDS 5.0 by default */ /* #undef TDS50 */ /* Define to use TDS 7.0 by default */ #define TDS70 1 /* Define to use TDS 7.1 by default */ /* #undef TDS71 */ /* Define to 1 if your compiler supports __attribute__((destructor)). */ #define TDS_ATTRIBUTE_DESTRUCTOR 1 /* define to constant to use for clock_gettime */ /* #undef TDS_GETTIMEMILLI_CONST */ /* Define if you have pthread with mutex support */ /* #undef TDS_HAVE_PTHREAD_MUTEX */ /* Define if stdio support locking */ /* #undef TDS_HAVE_STDIO_LOCKED */ /* define to prefix format string used for 64bit integers */ #define TDS_I64_PREFIX "I64" /* Define if you don't care about thread safety */ /* #undef TDS_NO_THREADSAFE */ /* Define to 1 if last argument of SQLColAttribute it's SQLLEN * */ #define TDS_SQLCOLATTRIBUTE_SQLLEN 1 /* Define to 1 if SQLParamOptions accept SQLULEN as arguments */ #define TDS_SQLPARAMOPTIONS_SQLLEN 1 /* Defined if --enable-sybase-compat used */ /* #undef TDS_SYBASE_COMPAT */ /* Define to 1 if you can safely include both and . */ #define TIME_WITH_SYS_TIME 1 /* Define to 1 if your declares `struct tm'. */ /* #undef TM_IN_SYS_TIME */ /* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # define _ALL_SOURCE 1 #endif /* Enable GNU extensions on systems that have them. */ #ifndef _GNU_SOURCE # define _GNU_SOURCE 1 #endif /* Enable threading extensions on Solaris. */ #ifndef _POSIX_PTHREAD_SEMANTICS # define _POSIX_PTHREAD_SEMANTICS 1 #endif /* Enable extensions on HP NonStop. */ #ifndef _TANDEM_SOURCE # define _TANDEM_SOURCE 1 #endif /* Enable general extensions on Solaris. */ #ifndef __EXTENSIONS__ # define __EXTENSIONS__ 1 #endif /* Version number of package */ #define VERSION "0.95rc1" /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ #if defined AC_APPLE_UNIVERSAL_BUILD # if defined __BIG_ENDIAN__ # define WORDS_BIGENDIAN 1 # endif #else # ifndef WORDS_BIGENDIAN /* # undef WORDS_BIGENDIAN */ # endif #endif /* Enable large inode numbers on Mac OS X 10.5. */ #ifndef _DARWIN_USE_64_BIT_INODE # define _DARWIN_USE_64_BIT_INODE 1 #endif /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ /* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */ /* #undef _LARGEFILE_SOURCE */ /* Define for large files, on AIX-style hosts. */ /* #undef _LARGE_FILES */ /* Define to 1 if on MINIX. */ /* #undef _MINIX */ /* Define to 2 if the system does not provide POSIX.1 features except with this defined. */ /* #undef _POSIX_1_SOURCE */ /* Define to 1 if you need to in order for `stat' and other things to work. */ /* #undef _POSIX_SOURCE */ /* Define to empty if `const' does not conform to ANSI C. */ /* #undef const */ /* Define to `__inline__' or `__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ #ifndef __cplusplus /* #undef inline */ #endif /* type to use in place of socklen_t if not defined */ /* #undef socklen_t */ From alistair.roberts at ladbrokes.com.au Sun May 10 19:29:45 2015 From: alistair.roberts at ladbrokes.com.au (Alistair Roberts) Date: Mon, 11 May 2015 09:29:45 +1000 (EST) Subject: [freetds] SQL 2014 Support Message-ID: <04ba01d08b79$33003660$9900a320$@ladbrokes.com.au> Hi, Is there any issues using FreeTDS and SQL 2014? Thanks Alistair From shawjef3 at gmail.com Mon May 11 10:32:21 2015 From: shawjef3 at gmail.com (Jeffrey Shaw) Date: Mon, 11 May 2015 10:32:21 -0400 Subject: [freetds] SQL 2014 Support In-Reply-To: <04ba01d08b79$33003660$9900a320$@ladbrokes.com.au> References: <04ba01d08b79$33003660$9900a320$@ladbrokes.com.au> Message-ID: Alistair, If you use the dblib part of FreeTDS, it selects NULL varchar values as empty strings. Otherwise it's OK in my limited experience. Jeff On Sun, May 10, 2015 at 7:29 PM, Alistair Roberts < alistair.roberts at ladbrokes.com.au> wrote: > Hi, > > > > Is there any issues using FreeTDS and SQL 2014? > > > > Thanks > > > Alistair > > > > > > > > > > > > > _______________________________________________ > FreeTDS mailing list > FreeTDS at lists.ibiblio.org > http://lists.ibiblio.org/mailman/listinfo/freetds > From eda at waniasset.com Mon May 11 08:35:57 2015 From: eda at waniasset.com (Ed Avis) Date: Mon, 11 May 2015 12:35:57 +0000 (UTC) Subject: [freetds] =?utf-8?q?Bug_with_new_release_candidate=2C_=27freebcp_?= =?utf-8?q?in=27=2C=09and_date_format?= References: Message-ID: Frediano Ziglio gmail.com> writes: >Can you check which protocol version are you using? TDSVER=8.0 -- Ed Avis From freddy77 at gmail.com Mon May 11 14:16:35 2015 From: freddy77 at gmail.com (Frediano Ziglio) Date: Mon, 11 May 2015 19:16:35 +0100 Subject: [freetds] Bug with new release candidate, 'freebcp in', and date format In-Reply-To: References: Message-ID: 2015-05-11 13:35 GMT+01:00 Ed Avis : > Frediano Ziglio gmail.com> writes: > >>Can you check which protocol version are you using? > > TDSVER=8.0 > You know that 8.0 < 7.3, right? That's math :) 8.0 is for compatibility with former version, where Microsoft itself called mssql2000 protocol 8.0. Now that changed and 7.1 is mssql2000 while 7.3 is mssql2008. Frediano From randy at thesyrings.us Mon May 11 14:21:32 2015 From: randy at thesyrings.us (Randy Syring) Date: Mon, 11 May 2015 14:21:32 -0400 Subject: [freetds] Bug with new release candidate, 'freebcp in', and date format In-Reply-To: References: Message-ID: <5550F32C.5020501@thesyrings.us> http://www.freetds.org/userguide/choosingtdsprotocol.htm It would help if that page had a note about TDS version 8.0. *Randy Syring* Husband | Father | Redeemed Sinner /"For what does it profit a man to gain the whole world and forfeit his soul?" (Mark 8:36 ESV)/ On 05/11/2015 02:16 PM, Frediano Ziglio wrote: > 2015-05-11 13:35 GMT+01:00 Ed Avis : >> Frediano Ziglio gmail.com> writes: >> >>> Can you check which protocol version are you using? >> TDSVER=8.0 >> > > You know that 8.0 < 7.3, right? That's math :) > 8.0 is for compatibility with former version, where Microsoft itself > called mssql2000 protocol 8.0. > Now that changed and 7.1 is mssql2000 while 7.3 is mssql2008. > > Frediano > _______________________________________________ > FreeTDS mailing list > FreeTDS at lists.ibiblio.org > http://lists.ibiblio.org/mailman/listinfo/freetds > From freddy77 at gmail.com Mon May 11 14:29:53 2015 From: freddy77 at gmail.com (Frediano Ziglio) Date: Mon, 11 May 2015 19:29:53 +0100 Subject: [freetds] New release candidate Message-ID: Hi, I packaged 0.95rc2 version. It includes lot of fixes for tests under Windows and some unixODBC compatibility problem. Regards, Frediano From freddy77 at gmail.com Mon May 11 14:39:17 2015 From: freddy77 at gmail.com (Frediano Ziglio) Date: Mon, 11 May 2015 19:39:17 +0100 Subject: [freetds] [0.95rc1] Some preliminary test results In-Reply-To: References: <20140421101925.b9044bc6.jklowden@freetds.org> <0cc1ec4c3989bd6363aba6c76e7a8fc8@xentu.com> <7bcf499156f914b9e7d8c1bc491adf18@xentu.com> Message-ID: 2015-05-09 23:24 GMT+01:00 Sergio NNX : >> Where are src/replacements/unittests? >> Are you using Cygwin or MingW. >> I suspect some problems raise from test that create thread. Can you >> post your config.h? > > Sorry, I forgot to include them! Here they are: > Hi Sergio, can you try the new rc version? Should be much better. Frediano From sfhacker at hotmail.com Mon May 11 18:45:52 2015 From: sfhacker at hotmail.com (Sergio NNX) Date: Tue, 12 May 2015 08:45:52 +1000 Subject: [freetds] [0.95rc2] Preliminary test results In-Reply-To: References: , <20140421101925.b9044bc6.jklowden@freetds.org>, , <0cc1ec4c3989bd6363aba6c76e7a8fc8@xentu.com>, , <7bcf499156f914b9e7d8c1bc491adf18@xentu.com>, , , , , Message-ID: > Hi Sergio, > can you try the new rc version? Should be much better. Compile-time settings (established with the "configure" script) Version: freetds v0.95rc2 freetds.conf directory: \freetds-0.95rc2\etc MS db-lib source compatibility: no Sybase binary compatibility: no Thread safety: yes iconv library: yes TDS version: 7.0 iODBC: no unixodbc: yes SSPI "trusted" logins: yes Kerberos: yes (Heimdal 1.6.99) OpenSSL: yes (OpenSSL 1.0.2a) GnuTLS: no Protocol Version = MS SQL Server version: 2008 (10.0.1600.22) =================== All 4 tests passed (replacements/unittests) =================== =================== All 20 tests passed (tds/unittests) =================== =================== All 29 tests passed (ctlib/unittests) =================== ==================== 1 of 35 tests failed (dblib/unittests) ==================== Failed tests: rpc [...] retrieving return status... 42 retrieving output parameters... param name type length data ---- ------------------- ---- ----- ------------------------------ 1 @null_input 39 3 xml 2 @first_type 39 6 bigint 3 @nullout 56 0 4 @varchar_tds7_out 39 8000 ??????????... 5 @nvarchar_tds7_out 39 4000 ??????????... 6 @nrows 56 4 3 Good: Got 6 output parameters and 1 return status of 42. Expected an empty resultset got 2. FAIL rpc.exe (exit status: 1) ==================== 3 of 72 tests failed (odbc/unittests) ==================== Failed tests: genparams rpc freeclose genparams test output [...] DROP TABLE #tmp_insert SELECT GETDATE() SELECT CONVERT(DATETIME, '2003-07-22 13:02:03') CREATE TABLE #tmp_insert (col DATETIME) SELECT * FROM #tmp_insert WHERE col = CONVERT(DATETIME, '2015-05-12 13:02:03') genparams.c:191 rc=100 SQLFetch FAIL genparams.exe (exit status: 1) rpc test output [...] done. bound data for parameter 1 is 4 bytes: 42. bound data for parameter 2 is 3 bytes: 'xml'. bound data for parameter 3 is 6 bytes: 'bigint'. bound data for parameter 4 is 4 bytes: 6381921. bound data for parameter 5 is 4 bytes: 3. executing SQLFreeStmt 1 errors found in expected row count FAIL rpc.exe (exit status: 1) freeclose test output [...] Error finding last socket opened FAIL freeclose.exe (exit status: 1) From alistair.roberts at ladbrokes.com.au Mon May 11 19:00:53 2015 From: alistair.roberts at ladbrokes.com.au (Alistair Roberts) Date: Tue, 12 May 2015 09:00:53 +1000 (EST) Subject: [freetds] SQL 2014 Support In-Reply-To: References: <04ba01d08b79$33003660$9900a320$@ladbrokes.com.au> Message-ID: <00a901d08c3e$522ce7c0$f686b740$@ladbrokes.com.au> Thanks. Is that just limited to SQL 2014 or also 2008? Looking at moving from 2008 to 2014. Thanks Al -----Original Message----- From: FreeTDS [mailto:freetds-bounces at lists.ibiblio.org] On Behalf Of Jeffrey Shaw Sent: Tuesday, 12 May 2015 12:32 AM To: FreeTDS Development Group Subject: Re: [freetds] SQL 2014 Support Alistair, If you use the dblib part of FreeTDS, it selects NULL varchar values as empty strings. Otherwise it's OK in my limited experience. Jeff On Sun, May 10, 2015 at 7:29 PM, Alistair Roberts < alistair.roberts at ladbrokes.com.au> wrote: > Hi, > > > > Is there any issues using FreeTDS and SQL 2014? > > > > Thanks > > > Alistair > > > > > > > > > > > > > _______________________________________________ > FreeTDS mailing list > FreeTDS at lists.ibiblio.org > http://lists.ibiblio.org/mailman/listinfo/freetds > _______________________________________________ FreeTDS mailing list FreeTDS at lists.ibiblio.org http://lists.ibiblio.org/mailman/listinfo/freetds From sfhacker at hotmail.com Mon May 11 19:25:51 2015 From: sfhacker at hotmail.com (Sergio NNX) Date: Tue, 12 May 2015 09:25:51 +1000 Subject: [freetds] SQL 2014 Support In-Reply-To: <00a901d08c3e$522ce7c0$f686b740$@ladbrokes.com.au> References: <04ba01d08b79$33003660$9900a320$@ladbrokes.com.au>, , <00a901d08c3e$522ce7c0$f686b740$@ladbrokes.com.au> Message-ID: > Thanks. Is that just limited to SQL 2014 or also 2008? Looking at moving > from 2008 to 2014. We also plan to upgrade. Is there a 2014 trial version available online we could download and test? Thanks. From sfhacker at hotmail.com Mon May 11 19:31:13 2015 From: sfhacker at hotmail.com (Sergio NNX) Date: Tue, 12 May 2015 09:31:13 +1000 Subject: [freetds] SSPI, NTLM & (Heimdal) Kerberos In-Reply-To: References: Message-ID: Hi guys, A dumb question: is there any particular reason why the following combinations aren't allowed or possible: * NTLM + Kerberos * SSPI + Kerberos Does SSPI already include or support M$ Kerberos authentication? There are some cases where a Windows box may talk to a Linux box and interact with a Kerberos server (i.e. KDC server). Thanks. Sergio. From shawjef3 at gmail.com Mon May 11 19:40:48 2015 From: shawjef3 at gmail.com (Jeff Shaw) Date: Mon, 11 May 2015 19:40:48 -0400 Subject: [freetds] SQL 2014 Support In-Reply-To: References: <04ba01d08b79$33003660$9900a320$@ladbrokes.com.au> <00a901d08c3e$522ce7c0$f686b740$@ladbrokes.com.au> Message-ID: <5566A311-9AB7-47F0-A4A3-EC01C364E807@gmail.com> I did my testing with 2008 R2, but the key I think is the tds version set in freetds.conf. I forget the specific versions, but set it too low, and it won't support long strings. Set it to support long strings, and null strings are selected as empty strings. Sent from my phone On May 11, 2015, at 7:25 PM, Sergio NNX wrote: >> Thanks. Is that just limited to SQL 2014 or also 2008? Looking at moving >> from 2008 to 2014. > > We also plan to upgrade. Is there a 2014 trial version available online we could download and test? > > Thanks. > > _______________________________________________ > FreeTDS mailing list > FreeTDS at lists.ibiblio.org > http://lists.ibiblio.org/mailman/listinfo/freetds From alistair.roberts at ladbrokes.com.au Mon May 11 19:56:18 2015 From: alistair.roberts at ladbrokes.com.au (Alistair Roberts) Date: Tue, 12 May 2015 09:56:18 +1000 (EST) Subject: [freetds] SQL 2014 Support In-Reply-To: References: <04ba01d08b79$33003660$9900a320$@ladbrokes.com.au>, , <00a901d08c3e$522ce7c0$f686b740$@ladbrokes.com.au> Message-ID: <00c401d08c46$12b733e0$38259ba0$@ladbrokes.com.au> Could try the express edition https://www.microsoft.com/en-au/download/details.aspx?id=42299 -----Original Message----- From: FreeTDS [mailto:freetds-bounces at lists.ibiblio.org] On Behalf Of Sergio NNX Sent: Tuesday, 12 May 2015 9:26 AM To: FreeTDS Development Group Subject: Re: [freetds] SQL 2014 Support > Thanks. Is that just limited to SQL 2014 or also 2008? Looking at > moving from 2008 to 2014. We also plan to upgrade. Is there a 2014 trial version available online we could download and test? Thanks. _______________________________________________ FreeTDS mailing list FreeTDS at lists.ibiblio.org http://lists.ibiblio.org/mailman/listinfo/freetds From sfhacker at hotmail.com Mon May 11 20:09:21 2015 From: sfhacker at hotmail.com (Sergio NNX) Date: Tue, 12 May 2015 10:09:21 +1000 Subject: [freetds] SQL 2014 Support In-Reply-To: <00c401d08c46$12b733e0$38259ba0$@ladbrokes.com.au> References: <04ba01d08b79$33003660$9900a320$@ladbrokes.com.au>, , , , <00a901d08c3e$522ce7c0$f686b740$@ladbrokes.com.au>, , <00c401d08c46$12b733e0$38259ba0$@ladbrokes.com.au> Message-ID: > https://www.microsoft.com/en-au/download/details.aspx?id=42299 > Cheers Alistair. I'm downloading it now. Sergio. From sfhacker at hotmail.com Mon May 11 20:13:10 2015 From: sfhacker at hotmail.com (Sergio NNX) Date: Tue, 12 May 2015 10:13:10 +1000 Subject: [freetds] SQL 2014 Support In-Reply-To: <5566A311-9AB7-47F0-A4A3-EC01C364E807@gmail.com> References: <04ba01d08b79$33003660$9900a320$@ladbrokes.com.au>, , <00a901d08c3e$522ce7c0$f686b740$@ladbrokes.com.au>, , <5566A311-9AB7-47F0-A4A3-EC01C364E807@gmail.com> Message-ID: > I did my testing with 2008 R2, but the key I think is the tds version set in freetds.conf. I forget the specific versions, > but set it too low, and it won't support long strings. Set it to support long strings, and null strings are selected as empty strings. I see. Do you happen to have a test or a way I can reproduce that issue on my box? I may have a workaround. Cheers. From msabramo at gmail.com Tue May 12 10:47:14 2015 From: msabramo at gmail.com (Marc Abramowitz) Date: Tue, 12 May 2015 07:47:14 -0700 Subject: [freetds] SQL 2014 Support In-Reply-To: References: <04ba01d08b79$33003660$9900a320$@ladbrokes.com.au> <00a901d08c3e$522ce7c0$f686b740$@ladbrokes.com.au> <5566A311-9AB7-47F0-A4A3-EC01C364E807@gmail.com> Message-ID: Folks who are interested in quickly setting up a SQL Server 2014 Express Edition instance for testing might be interested in this little Vagrant VM that I put together: https://github.com/msabramo/vagrant_sql_server_express You can send pull requests or file issues if you have problems, suggestions, etc. On Mon, May 11, 2015 at 5:13 PM, Sergio NNX wrote: > > I did my testing with 2008 R2, but the key I think is the tds > version set in freetds.conf. I forget the specific versions, > > but set it > too low, and it won't support long strings. Set it to support long > strings, and null strings are selected as empty strings. > > I see. Do you happen to have a test or a way I can reproduce that issue on > my box? I may have a workaround. > > Cheers. > _______________________________________________ > FreeTDS mailing list > FreeTDS at lists.ibiblio.org > http://lists.ibiblio.org/mailman/listinfo/freetds > From freddy77 at gmail.com Tue May 12 12:52:54 2015 From: freddy77 at gmail.com (Frediano Ziglio) Date: Tue, 12 May 2015 17:52:54 +0100 Subject: [freetds] [0.95rc2] Preliminary test results In-Reply-To: References: <20140421101925.b9044bc6.jklowden@freetds.org> <0cc1ec4c3989bd6363aba6c76e7a8fc8@xentu.com> <7bcf499156f914b9e7d8c1bc491adf18@xentu.com> Message-ID: 2015-05-11 23:45 GMT+01:00 Sergio NNX : >> Hi Sergio, >> can you try the new rc version? Should be much better. > > Compile-time settings (established with the "configure" script) > Version: freetds v0.95rc2 > freetds.conf directory: \freetds-0.95rc2\etc > MS db-lib source compatibility: no > Sybase binary compatibility: no > Thread safety: yes > iconv library: yes > TDS version: 7.0 > iODBC: no > unixodbc: yes > SSPI "trusted" logins: yes > Kerberos: yes (Heimdal 1.6.99) > OpenSSL: yes (OpenSSL 1.0.2a) > GnuTLS: no > > Protocol Version = > > MS SQL Server version: 2008 (10.0.1600.22) > > =================== > All 4 tests passed (replacements/unittests) > =================== > > =================== > All 20 tests passed (tds/unittests) > =================== > > =================== > All 29 tests passed (ctlib/unittests) > =================== > > ==================== > 1 of 35 tests failed (dblib/unittests) > ==================== > > Failed tests: rpc > > [...] > retrieving return status... > 42 > retrieving output parameters... > param name type length data > ---- ------------------- ---- ----- ------------------------------ > 1 @null_input 39 3 xml > 2 @first_type 39 6 bigint > 3 @nullout 56 0 > 4 @varchar_tds7_out 39 8000 ??????????... > 5 @nvarchar_tds7_out 39 4000 ??????????... > 6 @nrows 56 4 3 > Good: Got 6 output parameters and 1 return status of 42. > Expected an empty resultset got 2. > FAIL rpc.exe (exit status: 1) > I start to suspect this (and the other rpc test) could be due to some changes in the protocol for mssql 2008 r2. I'll need a dump to confirm it. > ==================== > 3 of 72 tests failed (odbc/unittests) > ==================== > > Failed tests: genparams rpc freeclose > > genparams test output > > [...] > DROP TABLE #tmp_insert > SELECT GETDATE() > SELECT CONVERT(DATETIME, '2003-07-22 13:02:03') > CREATE TABLE #tmp_insert (col DATETIME) > SELECT * FROM #tmp_insert WHERE col = CONVERT(DATETIME, '2015-05-12 13:02:03') > genparams.c:191 rc=100 SQLFetch > FAIL genparams.exe (exit status: 1) > Believe or not this test for me fails at a specific time near midday... can you run again (just this test is enough). > rpc test output > > [...] > done. > bound data for parameter 1 is 4 bytes: 42. > bound data for parameter 2 is 3 bytes: 'xml'. > bound data for parameter 3 is 6 bytes: 'bigint'. > bound data for parameter 4 is 4 bytes: 6381921. > bound data for parameter 5 is 4 bytes: 3. > executing SQLFreeStmt > 1 errors found in expected row count > FAIL rpc.exe (exit status: 1) > > freeclose test output > > [...] > Error finding last socket opened > FAIL freeclose.exe (exit status: 1) > Can you try the attached version? Frediano -------------- next part -------------- A non-text attachment was scrubbed... Name: freeclose.c Type: text/x-csrc Size: 11397 bytes Desc: not available URL: From freddy77 at gmail.com Tue May 12 12:58:10 2015 From: freddy77 at gmail.com (Frediano Ziglio) Date: Tue, 12 May 2015 17:58:10 +0100 Subject: [freetds] Bug with new release candidate, 'freebcp in', and date format In-Reply-To: <5550F32C.5020501@thesyrings.us> References: <5550F32C.5020501@thesyrings.us> Message-ID: Could something like this be fine? http://www.freetds.org/choosingtdsprotocol.htm Frediano 2015-05-11 19:21 GMT+01:00 Randy Syring : > http://www.freetds.org/userguide/choosingtdsprotocol.htm > > It would help if that page had a note about TDS version 8.0. > > *Randy Syring* > Husband | Father | Redeemed Sinner > > /"For what does it profit a man to gain the whole world > and forfeit his soul?" (Mark 8:36 ESV)/ > > > On 05/11/2015 02:16 PM, Frediano Ziglio wrote: >> >> 2015-05-11 13:35 GMT+01:00 Ed Avis : >>> >>> Frediano Ziglio gmail.com> writes: >>> >>>> Can you check which protocol version are you using? >>> >>> TDSVER=8.0 >>> >> >> You know that 8.0 < 7.3, right? That's math :) >> 8.0 is for compatibility with former version, where Microsoft itself >> called mssql2000 protocol 8.0. >> Now that changed and 7.1 is mssql2000 while 7.3 is mssql2008. >> >> Frediano >> _______________________________________________ >> FreeTDS mailing list >> FreeTDS at lists.ibiblio.org >> http://lists.ibiblio.org/mailman/listinfo/freetds >> > > _______________________________________________ > FreeTDS mailing list > FreeTDS at lists.ibiblio.org > http://lists.ibiblio.org/mailman/listinfo/freetds From randy at thesyrings.us Tue May 12 14:05:13 2015 From: randy at thesyrings.us (Randy Syring) Date: Tue, 12 May 2015 14:05:13 -0400 Subject: [freetds] Bug with new release candidate, 'freebcp in', and date format In-Reply-To: References: <5550F32C.5020501@thesyrings.us> Message-ID: <555240D9.7040101@thesyrings.us> The only concern I have is that I'm afraid being at the bottom might get missed. Might you consider either: * Moving the notice above the table of versions; or * Adding versions 8.0 and 9.0 to the table, but then under "Comment" say something like "Please see note below regarding obsolete versions." *Randy Syring* Husband | Father | Redeemed Sinner /"For what does it profit a man to gain the whole world and forfeit his soul?" (Mark 8:36 ESV)/ On 05/12/2015 12:58 PM, Frediano Ziglio wrote: > Could something like this be fine? > http://www.freetds.org/choosingtdsprotocol.htm > > Frediano > > > 2015-05-11 19:21 GMT+01:00 Randy Syring : >> http://www.freetds.org/userguide/choosingtdsprotocol.htm >> >> It would help if that page had a note about TDS version 8.0. >> >> *Randy Syring* >> Husband | Father | Redeemed Sinner >> >> /"For what does it profit a man to gain the whole world >> and forfeit his soul?" (Mark 8:36 ESV)/ >> >> >> On 05/11/2015 02:16 PM, Frediano Ziglio wrote: >>> 2015-05-11 13:35 GMT+01:00 Ed Avis : >>>> Frediano Ziglio gmail.com> writes: >>>> >>>>> Can you check which protocol version are you using? >>>> TDSVER=8.0 >>>> >>> You know that 8.0 < 7.3, right? That's math :) >>> 8.0 is for compatibility with former version, where Microsoft itself >>> called mssql2000 protocol 8.0. >>> Now that changed and 7.1 is mssql2000 while 7.3 is mssql2008. >>> >>> Frediano >>> _______________________________________________ >>> FreeTDS mailing list >>> FreeTDS at lists.ibiblio.org >>> http://lists.ibiblio.org/mailman/listinfo/freetds >>> >> _______________________________________________ >> FreeTDS mailing list >> FreeTDS at lists.ibiblio.org >> http://lists.ibiblio.org/mailman/listinfo/freetds > _______________________________________________ > FreeTDS mailing list > FreeTDS at lists.ibiblio.org > http://lists.ibiblio.org/mailman/listinfo/freetds > From shawjef3 at gmail.com Tue May 12 15:19:26 2015 From: shawjef3 at gmail.com (Jeffrey Shaw) Date: Tue, 12 May 2015 15:19:26 -0400 Subject: [freetds] SQL 2014 Support In-Reply-To: References: <04ba01d08b79$33003660$9900a320$@ladbrokes.com.au> <00a901d08c3e$522ce7c0$f686b740$@ladbrokes.com.au> <5566A311-9AB7-47F0-A4A3-EC01C364E807@gmail.com> Message-ID: To expose the bug requires using dblib. I found the bug by using tds_fdw to connect PostgreSQL to MS SQL Server, so it's not trivial to set up. I've looked around for a dblib-based client that I could use. Perl has one, but I couldn't get it to compile. Following are instructions to follow what I did to set up PostgreSQL to use FreeTDS to select from MS SQL Server. I used SQL Server 2008 R2, PostgreSQL 9.4, and CentOS 7 as the PostgreSQL host OS. Create a table in ms sql in a database. CREATE TABLE ms_table (id int IDENTITY(1,1) PRIMARY KEY, something varchar(max)) In CentOS 7: sudo bash yum groupinstall "Development Tools" yum install http://yum.postgresql.org/9.4/redhat/rhel-7-x86_64/pgdg-centos94-9.4-1.noarch.rpm yum install postgresql94-server postgresql94-contrib python-pip python-devel freetds-devel postgresql94-devel easy_install pgxnclient pgxn install tds_fdw pgxn install multicorn echo 'export PATH=/usr/pgsql-9.4/bin:$PATH' > /etc/profile.d/postgres.sh Edit your /etc/freetds.conf to look like this: [global] tds version = 7.1 #The following will prevent large text and xml fields from being truncated. text size = 4294967295 [sqlserver] host = insert host name here port = 1433 Setup and start postgresql. chown -R postgres:postgres /var/lib/pgsql su postgres initdb --encoding=UTF8 --pwprompt ~/9.4/data exit systemctl start postgresql-9.4 su postgres psql CREATE EXTENSION tds_fdw; CREATE FOREIGN SERVER servername FOREIGN DATA WRAPPER tds_fdw OPTIONS (servername 'sqlserver from freetds.conf'); CREATE FOREIGN TABLE ms_table (id int, something text) SERVER servername OPTIONS (database 'ms_database', table 'ms_table'); Now you should be able to select from ms_table in MS SQL Server and PostgreSQL. Insert some rows that have NULL for 'something', and in my experience they come through as empty strings rather than null. EG char_length(something) gives 0 rather than NULL. Jeff On Tue, May 12, 2015 at 10:47 AM, Marc Abramowitz wrote: > Folks who are interested in quickly setting up a SQL Server 2014 Express > Edition instance for testing might be interested in this little Vagrant VM > that I put together: > > https://github.com/msabramo/vagrant_sql_server_express > > You can send pull requests or file issues if you have problems, > suggestions, etc. > > On Mon, May 11, 2015 at 5:13 PM, Sergio NNX wrote: > > > > I did my testing with 2008 R2, but the key I think is the tds > > version set in freetds.conf. I forget the specific versions, > > > but set it > > too low, and it won't support long strings. Set it to support long > > strings, and null strings are selected as empty strings. > > > > I see. Do you happen to have a test or a way I can reproduce that issue > on > > my box? I may have a workaround. > > > > Cheers. > > _______________________________________________ > > FreeTDS mailing list > > FreeTDS at lists.ibiblio.org > > http://lists.ibiblio.org/mailman/listinfo/freetds > > > _______________________________________________ > FreeTDS mailing list > FreeTDS at lists.ibiblio.org > http://lists.ibiblio.org/mailman/listinfo/freetds > From sfhacker at hotmail.com Tue May 12 16:07:39 2015 From: sfhacker at hotmail.com (Sergio NNX) Date: Wed, 13 May 2015 06:07:39 +1000 Subject: [freetds] [0.95rc2] Preliminary test results In-Reply-To: References: , <20140421101925.b9044bc6.jklowden@freetds.org>, , <0cc1ec4c3989bd6363aba6c76e7a8fc8@xentu.com>, , <7bcf499156f914b9e7d8c1bc491adf18@xentu.com>, , , , , , , Message-ID: > I start to suspect this (and the other rpc test) could be due to some changes in the protocol for mssql 2008 r2. > I'll need a dump to confirm it. dblib/rpc test dump About to logon expected error 20201: "Packet size of -1 not supported -- size of 0 used instead!" About to open localhost.tempdb Check if server support long identifiers 1: SELECT 'x' AS this_is_a_really_really_long_identifier trying to create a temporary stored procedure Creating procedure #t0022 1: 2: CREATE PROCEDURE #t0022 3: @null_input varchar(30) OUTPUT 4: , @first_type varchar(30) OUTPUT 5: , @nullout int OUTPUT 6: , @varchar_tds7_out varchar(8000) OUTPUT 7: , @nvarchar_tds7_out nvarchar(4000) OUTPUT 8: , @nrows int OUTPUT 9: , @c_this_name_is_way_more_than_thirty_characters_charlie varchar(20) 10: , @nv nvarchar(20) = N'hello' 11: AS 12: BEGIN 13: if @null_input is not NULL begin 14: select 'error: should be NULL' as status, @null_input as 'null_input' 15: return -42 16: end else begin 17: print 'Good: @null_input is NULL' 18: end 19: if @c_this_name_is_way_more_than_thirty_characters_charlie is not NULL begin 20: select 'error: should be NULL' as status, @c_this_name_is_way_more_than_thirty_characters_charlie as '@c_this_name_is_way_more_than_thirty_characters_charlie' 21: return -42 22: end else begin 23: print 'Good: @c_this_name_is_way_more_than_thirty_characters_charlie is NULL' 24: end 25: select @null_input = max(convert(varchar(30), name)) from systypes 26: select @first_type = min(convert(varchar(30), name)) from systypes 27: select name from sysobjects where 0=1 28: select distinct convert(varchar(30), name) as 'type' from systypes 29: where name in ('int', 'char', 'text') 30: select @nrows = @@rowcount 31: set @varchar_tds7_out = replicate(char(247), 8000) 32: set @nvarchar_tds7_out = replicate(nchar(246), 4000) 33: select distinct @nv as '@nv', convert(varchar(30), name) as name from sysobjects where type = 'S' 34: select @null_input as 'null_input' 35: , @first_type as 'first_type' 36: , @nullout as 'nullout' 37: , @nrows as 'nrows' 38: , @c_this_name_is_way_more_than_thirty_characters_charlie as 'c' 39: , @nv as 'nv' 40: into #parameters 41: select * from #parameters 42: return 42 43: END 44: Created procedure #t0022 executing dbrpcinit executing dbrpcparam for @null_input executing dbrpcparam for @first_type executing dbrpcparam for @nullout executing dbrpcparam for @varchar_tds7_out executing dbrpcparam for @nvarchar_tds7_out executing dbrpcparam for @nrows executing dbrpcparam for @c_this_name_is_way_more_than_thirty_characters_charlie executing dbrpcparam for @nv executing dbrpcsend executing dbsqlok Good: @null_input is NULL Good: @c_this_name_is_way_more_than_thirty_characters_charlie is NULL fetching results fetched resultset 1 successfully: column 1 (name) is 1 wide, buffer initialized to 'one' name row count 0 fetched resultset 2 successfully: column 1 (type) is 1 wide, buffer initialized to 'one' type char int text row count 3 fetched resultset 3 successfully: column 1 (@nv) is 1 wide, buffer initialized to 'one' column 2 (name) is 1 wide, buffer initialized to 'two' @nv name row count 0 fetched resultset 4 successfully: column 1 (null_input) is 1 wide, buffer initialized to 'one' column 2 (first_type) is 1 wide, buffer initialized to 'two' column 3 (nullout) is 1 wide, buffer initialized to 'three' column 4 (nrows) is 1 wide, buffer initialized to 'four' column 5 (c) is 1 wide, buffer initialized to 'five' null_input first_type nullout nrows c xml bigint 3 row count 1 retrieving return status... 42 retrieving output parameters... param name type length data ---- ------------------- ---- ----- ------------------------------ 1 @null_input 39 3 xml 2 @first_type 39 6 bigint 3 @nullout 56 0 4 @varchar_tds7_out 39 8000 ??????????... 5 @nvarchar_tds7_out 39 4000 ??????????... 6 @nrows 56 4 3 Good: Got 6 output parameters and 1 return status of 42. Expected an empty resultset got 2. FAIL rpc.exe (exit status: 1) >> freeclose test output >> >> [...] >> Error finding last socket opened >> FAIL freeclose.exe (exit status: 1) >> > Can you try the attached version? It didn't work. Same error message as before. I'd like to understand that test. What's a typical result for this function: odbc_find_last_socket(void)? What's a common (or default) value for ip remote addr and remote port? Show me an example. Thanks for your time. Sergio. From freddy77 at gmail.com Tue May 12 18:10:55 2015 From: freddy77 at gmail.com (Frediano Ziglio) Date: Tue, 12 May 2015 23:10:55 +0100 Subject: [freetds] [0.95rc2] Preliminary test results In-Reply-To: References: <20140421101925.b9044bc6.jklowden@freetds.org> <0cc1ec4c3989bd6363aba6c76e7a8fc8@xentu.com> <7bcf499156f914b9e7d8c1bc491adf18@xentu.com> Message-ID: 2015-05-12 21:07 GMT+01:00 Sergio NNX : >> I start to suspect this (and the other rpc test) could be due to some changes in the protocol for mssql 2008 r2. >> I'll need a dump to confirm it. > > dblib/rpc test dump > > About to logon > expected error 20201: "Packet size of -1 not supported -- size of 0 used instead!" > About to open localhost.tempdb > Check if server support long identifiers > 1: SELECT 'x' AS this_is_a_really_really_long_identifier > trying to create a temporary stored procedure > Creating procedure #t0022 > 1: > 2: CREATE PROCEDURE #t0022 > 3: @null_input varchar(30) OUTPUT > 4: , @first_type varchar(30) OUTPUT > 5: , @nullout int OUTPUT > 6: , @varchar_tds7_out varchar(8000) OUTPUT > 7: , @nvarchar_tds7_out nvarchar(4000) OUTPUT > 8: , @nrows int OUTPUT > 9: , @c_this_name_is_way_more_than_thirty_characters_charlie varchar(20) > 10: , @nv nvarchar(20) = N'hello' > 11: AS > 12: BEGIN > 13: if @null_input is not NULL begin > 14: select 'error: should be NULL' as status, @null_input as 'null_input' > 15: return -42 > 16: end else begin > 17: print 'Good: @null_input is NULL' > 18: end > 19: if @c_this_name_is_way_more_than_thirty_characters_charlie is not NULL begin > 20: select 'error: should be NULL' as status, @c_this_name_is_way_more_than_thirty_characters_charlie as '@c_this_name_is_way_more_than_thirty_characters_charlie' > 21: return -42 > 22: end else begin > 23: print 'Good: @c_this_name_is_way_more_than_thirty_characters_charlie is NULL' > 24: end > 25: select @null_input = max(convert(varchar(30), name)) from systypes > 26: select @first_type = min(convert(varchar(30), name)) from systypes > 27: select name from sysobjects where 0=1 > 28: select distinct convert(varchar(30), name) as 'type' from systypes > 29: where name in ('int', 'char', 'text') > 30: select @nrows = @@rowcount > 31: set @varchar_tds7_out = replicate(char(247), 8000) > 32: set @nvarchar_tds7_out = replicate(nchar(246), 4000) > 33: select distinct @nv as '@nv', convert(varchar(30), name) as name from sysobjects where type = 'S' > 34: select @null_input as 'null_input' > 35: , @first_type as 'first_type' > 36: , @nullout as 'nullout' > 37: , @nrows as 'nrows' > 38: , @c_this_name_is_way_more_than_thirty_characters_charlie as 'c' > 39: , @nv as 'nv' > 40: into #parameters > 41: select * from #parameters > 42: return 42 > 43: END > 44: > Created procedure #t0022 > executing dbrpcinit > executing dbrpcparam for @null_input > executing dbrpcparam for @first_type > executing dbrpcparam for @nullout > executing dbrpcparam for @varchar_tds7_out > executing dbrpcparam for @nvarchar_tds7_out > executing dbrpcparam for @nrows > executing dbrpcparam for @c_this_name_is_way_more_than_thirty_characters_charlie > executing dbrpcparam for @nv > executing dbrpcsend > executing dbsqlok > Good: @null_input is NULL > Good: @c_this_name_is_way_more_than_thirty_characters_charlie is NULL > fetching results > fetched resultset 1 successfully: > column 1 (name) is 1 wide, buffer initialized to 'one' > name > row count 0 > fetched resultset 2 successfully: > column 1 (type) is 1 wide, buffer initialized to 'one' > type > char > int > text > row count 3 > fetched resultset 3 successfully: > column 1 (@nv) is 1 wide, buffer initialized to 'one' > column 2 (name) is 1 wide, buffer initialized to 'two' > @nv name > row count 0 > fetched resultset 4 successfully: > column 1 (null_input) is 1 wide, buffer initialized to 'one' > column 2 (first_type) is 1 wide, buffer initialized to 'two' > column 3 (nullout) is 1 wide, buffer initialized to 'three' > column 4 (nrows) is 1 wide, buffer initialized to 'four' > column 5 (c) is 1 wide, buffer initialized to 'five' > null_input first_type nullout nrows c > xml bigint 3 > row count 1 > retrieving return status... > 42 > retrieving output parameters... > param name type length data > ---- ------------------- ---- ----- ------------------------------ > 1 @null_input 39 3 xml > 2 @first_type 39 6 bigint > 3 @nullout 56 0 > 4 @varchar_tds7_out 39 8000 ??????????... > 5 @nvarchar_tds7_out 39 4000 ??????????... > 6 @nrows 56 4 3 > Good: Got 6 output parameters and 1 return status of 42. > Expected an empty resultset got 2. > FAIL rpc.exe (exit status: 1) > This is the output, to get the dump define TDSDUMP to a filename and send the file, under cmd.exe is something like set TDSDUMP=dump.txt while in bash (if you use mingw or cygwin or Linux) is export TDSDUMP=dump.txt > >>> freeclose test output >>> >>> [...] >>> Error finding last socket opened >>> FAIL freeclose.exe (exit status: 1) >>> > >> Can you try the attached version? > > It didn't work. Same error message as before. > I'd like to understand that test. What's a typical result for this function: odbc_find_last_socket(void)? > What's a common (or default) value for ip remote addr and remote port? Show me an example. > > Thanks for your time. > > Sergio. > This function is quite an hack function. It try to discover the last socket connection opened. So it try to scan a lot of possible handles (numerically 4096 starting from 4, so 4, 8, 12, 16 ... etc) and call some function to check if they are really sockets (getpeername and getsockname). I also recently changed to discard pair of socketpair (two sockets attached together). I attached a new version, should handle IPv6 addresses (unfortunately sizeof(struct sockaddr) < sizeof(struct sockaddr_in6) on Windows). Frediano -------------- next part -------------- A non-text attachment was scrubbed... Name: freeclose.c Type: text/x-csrc Size: 11435 bytes Desc: not available URL: From freddy77 at gmail.com Tue May 12 23:27:02 2015 From: freddy77 at gmail.com (Frediano Ziglio) Date: Wed, 13 May 2015 04:27:02 +0100 Subject: [freetds] [0.95rc2] Preliminary test results In-Reply-To: References: <20140421101925.b9044bc6.jklowden@freetds.org> <0cc1ec4c3989bd6363aba6c76e7a8fc8@xentu.com> <7bcf499156f914b9e7d8c1bc491adf18@xentu.com> Message-ID: 2015-05-12 23:10 GMT+01:00 Frediano Ziglio : > 2015-05-12 21:07 GMT+01:00 Sergio NNX : .... > >> >>>> freeclose test output >>>> >>>> [...] >>>> Error finding last socket opened >>>> FAIL freeclose.exe (exit status: 1) >>>> >> >>> Can you try the attached version? >> >> It didn't work. Same error message as before. >> I'd like to understand that test. What's a typical result for this function: odbc_find_last_socket(void)? >> What's a common (or default) value for ip remote addr and remote port? Show me an example. >> >> Thanks for your time. >> >> Sergio. >> > > This function is quite an hack function. It try to discover the last > socket connection opened. So it try to scan a lot of possible handles > (numerically 4096 starting from 4, so 4, 8, 12, 16 ... etc) and call > some function to check if they are really sockets (getpeername and > getsockname). I also recently changed to discard pair of socketpair > (two sockets attached together). > > I attached a new version, should handle IPv6 addresses (unfortunately > sizeof(struct sockaddr) < sizeof(struct sockaddr_in6) on Windows). > Sorry, silly mistake in attachment Frediano -------------- next part -------------- A non-text attachment was scrubbed... Name: freeclose.c Type: text/x-csrc Size: 11465 bytes Desc: not available URL: From sfhacker at hotmail.com Wed May 13 00:38:29 2015 From: sfhacker at hotmail.com (Sergio NNX) Date: Wed, 13 May 2015 14:38:29 +1000 Subject: [freetds] [0.95rc2][Windows] Deployment In-Reply-To: References: , <20140421101925.b9044bc6.jklowden@freetds.org>, , <0cc1ec4c3989bd6363aba6c76e7a8fc8@xentu.com>, , <7bcf499156f914b9e7d8c1bc491adf18@xentu.com>, , , , , , , , , , Message-ID: > Sorry, silly mistake in attachment I have deployed FreeTDS here: http://sourceforge.net/projects/freetdswindows/files/FreeTDS-0.95rc2/ I reckon it makes testing easier and more efficient. I'll try your new freeclose.c file in a jiffy. Cheers. Sergio. From freddy77 at gmail.com Wed May 13 11:13:08 2015 From: freddy77 at gmail.com (Frediano Ziglio) Date: Wed, 13 May 2015 16:13:08 +0100 Subject: [freetds] SSPI, NTLM & (Heimdal) Kerberos In-Reply-To: References: Message-ID: 2015-05-12 0:31 GMT+01:00 Sergio NNX : > Hi guys, > > A dumb question: is there any particular reason why the following combinations aren't allowed or possible: > > * NTLM + Kerberos > * SSPI + Kerberos > > Does SSPI already include or support M$ Kerberos authentication? There are some cases where a Windows box may talk to a Linux box and interact with a Kerberos server (i.e. KDC server). > > Thanks. > > Sergio. NTLM and Kerberos are two authentication protocols while SSPI is a Windows API which provides authentication and has different providers (NTLM and Kerberos for instance). The use of NTLM/Kerberos/SSPI in FreeTDS is the same, access to a SQL Server machine. As Kerberos is not supported in our library for Sybase and MSSQL is only Windows we don't handle the case where a Windows machine wants to connect to a Linux one. About FreeTDS implementation to handle SSO (single sign on) we use SSPI on Windows and NTLM (which we implement in our code) or a Kerberos library (Heimdal or MIT usually) for Unix. Potentially we could use exactly same code for Windows but if you use SSPI you can use login credentials. See code in src/tds/login.c. Frediano From freddy77 at gmail.com Thu May 14 03:27:13 2015 From: freddy77 at gmail.com (Frediano Ziglio) Date: Thu, 14 May 2015 08:27:13 +0100 Subject: [freetds] [0.95rc2][Windows] Deployment In-Reply-To: References: <20140421101925.b9044bc6.jklowden@freetds.org> <0cc1ec4c3989bd6363aba6c76e7a8fc8@xentu.com> <7bcf499156f914b9e7d8c1bc491adf18@xentu.com> Message-ID: 2015-05-13 5:38 GMT+01:00 Sergio NNX : >> Sorry, silly mistake in attachment > > I have deployed FreeTDS here: http://sourceforge.net/projects/freetdswindows/files/FreeTDS-0.95rc2/ > > I reckon it makes testing easier and more efficient. > > I'll try your new freeclose.c file in a jiffy. > > Cheers. > > Sergio. > Hi, did you test new version of the file? Frediano From sfhacker at hotmail.com Thu May 14 04:52:21 2015 From: sfhacker at hotmail.com (Sergio NNX) Date: Thu, 14 May 2015 18:52:21 +1000 Subject: [freetds] [0.95rc2][Windows] Unit Tests In-Reply-To: References: , <20140421101925.b9044bc6.jklowden@freetds.org>, , <0cc1ec4c3989bd6363aba6c76e7a8fc8@xentu.com>, , <7bcf499156f914b9e7d8c1bc491adf18@xentu.com>, , , , , , , , , , , , Message-ID: > Hi, > did you test new version of the file? > > Frediano Ciao, Sorry about the delay, Frediano. This test should check for IPv6 and I would add 'WSACleanup' function somewhere. Thanks for looking into these tests. The 'genparams' test is fine now (and today)! First run (IPv4) --------- $ freeclose.exe odbctest -------- connection parameters: server: 'MSSQLTestServer' user: 'guest' password: '????' database: 'tempdb' use tempdb Fake server bound at port 12340 odbctest -------- connection parameters: server: 'MSSQLTestServer' user: 'guest' password: '????' database: 'tempdb' connect: An address incompatible with the requested protocol was used. Second Run (IPv6) ---------- $ freeclose.exe odbctest -------- connection parameters: server: 'MSSQLTestServer' user: 'guest' password: '????' database: 'tempdb' use tempdb Fake server bound at port 12340 odbctest -------- connection parameters: server: 'MSSQLTestServer' user: 'guest' password: '????' database: 'tempdb' use tempdb CREATE TABLE #test(i int, c varchar(40)) 0 round trips 0 inserts 40 round trips 1 inserts 42 round trips 1 inserts PASS freeclose.exe (exit status: 0) From freddy77 at gmail.com Thu May 14 16:05:12 2015 From: freddy77 at gmail.com (Frediano Ziglio) Date: Thu, 14 May 2015 21:05:12 +0100 Subject: [freetds] [0.95rc2][Windows] Unit Tests In-Reply-To: References: <20140421101925.b9044bc6.jklowden@freetds.org> <0cc1ec4c3989bd6363aba6c76e7a8fc8@xentu.com> <7bcf499156f914b9e7d8c1bc491adf18@xentu.com> Message-ID: 2015-05-14 9:52 GMT+01:00 Sergio NNX : >> Hi, >> did you test new version of the file? >> >> Frediano > > Ciao, > > Sorry about the delay, Frediano. > This test should check for IPv6 and I would add 'WSACleanup' function somewhere. > Now it works either with IPv4 and IPv6. Thanks > Thanks for looking into these tests. The 'genparams' test is fine now (and today)! > Yes, one day I'll understand why it fails at a specified time. ... So now only rpc tests fail on your side. Frediano From sfhacker at hotmail.com Thu May 14 19:06:21 2015 From: sfhacker at hotmail.com (Sergio NNX) Date: Fri, 15 May 2015 09:06:21 +1000 Subject: [freetds] [0.95rc2][Windows] Unit Tests In-Reply-To: References: , <20140421101925.b9044bc6.jklowden@freetds.org>, , <0cc1ec4c3989bd6363aba6c76e7a8fc8@xentu.com>, , <7bcf499156f914b9e7d8c1bc491adf18@xentu.com>, , , , , , , , , , , , , , Message-ID: > So now only rpc tests fail on your side. Correct. Are you planning for a new release candidate soon or a final 'production' version? Cheers. From freddy77 at gmail.com Thu May 14 23:41:13 2015 From: freddy77 at gmail.com (Frediano Ziglio) Date: Fri, 15 May 2015 04:41:13 +0100 Subject: [freetds] [0.95rc2][Windows] Unit Tests In-Reply-To: References: <20140421101925.b9044bc6.jklowden@freetds.org> <0cc1ec4c3989bd6363aba6c76e7a8fc8@xentu.com> <7bcf499156f914b9e7d8c1bc491adf18@xentu.com> Message-ID: 2015-05-15 0:06 GMT+01:00 Sergio NNX : >> So now only rpc tests fail on your side. > Correct. > > Are you planning for a new release candidate soon or a final 'production' version? > > Cheers. > The main key to the release is "Feature free". No optimization, no refactoring, no style, no new feature. Mainly fixes and regressions. The RC roll out is mainly to spread more people to test it with different environments/work cases (honestly I lost an idea of a possible matrix years ago). See https://trello.com/b/bk0UZNRJ/freetds-todo-list. Frediano From sfhacker at hotmail.com Fri May 15 01:08:09 2015 From: sfhacker at hotmail.com (Sergio NNX) Date: Fri, 15 May 2015 15:08:09 +1000 Subject: [freetds] [0.95rc2][Windows] Unit Tests / Next release In-Reply-To: References: , <20140421101925.b9044bc6.jklowden@freetds.org>, , <0cc1ec4c3989bd6363aba6c76e7a8fc8@xentu.com>, , <7bcf499156f914b9e7d8c1bc491adf18@xentu.com>, , , , , , , , , , , , , , , Message-ID: > The main key to the release is "Feature free". No optimization, no > refactoring, no style, no new feature. Mainly fixes and regressions. > The RC roll out is mainly to spread more people to test it with > different environments/work cases (honestly I lost an idea of a > possible matrix years ago). > > See https://trello.com/b/bk0UZNRJ/freetds-todo-list. Cool. Just let me know if you need a hand (or two)? Most probably I can contribute with testing (e.g. Windows, several MS SQL Server versions, SSL/PKI), updating documentation, etc. I haven't mentioned before, but there is one compilation issue (at least under MSYS env) with a particular test: long_error test (I'm using another PC at the moment and I don't remember the exact name of the test). Apparently, that test uses UNICODE and it can't be compiled as it is. As soon as I get home, I'll send you the error message. Sergio. From sfhacker at hotmail.com Fri May 15 03:49:21 2015 From: sfhacker at hotmail.com (Sergio NNX) Date: Fri, 15 May 2015 17:49:21 +1000 Subject: [freetds] [0.95rc2] Unit Tests / Unicode In-Reply-To: References: , <20140421101925.b9044bc6.jklowden@freetds.org>, , <0cc1ec4c3989bd6363aba6c76e7a8fc8@xentu.com>, , <7bcf499156f914b9e7d8c1bc491adf18@xentu.com>, , , , , , , , , , Message-ID: CC long_error.o In file included from c:\mingw\bin\../lib/gcc/mingw32/4.7.2/../../../../include/ sql.h:19:0, from common.h:24, from long_error.c:3: c:\mingw\bin\../lib/gcc/mingw32/4.7.2/../../../../include/sqltypes.h:87:29: erro r: conflicting types for 'TCHAR' In file included from c:\mingw\bin\../lib/gcc/mingw32/4.7.2/../../../../include/ windef.h:239:0, from c:\mingw\bin\../lib/gcc/mingw32/4.7.2/../../../../include/ windows.h:60, from c:\mingw\bin\../lib/gcc/mingw32/4.7.2/../../../../include/ winsock2.h:40, from c:\mingw\bin\../lib/gcc/mingw32/4.7.2/../../../../include/ ws2tcpip.h:41, from common.h:3, from long_error.c:3: c:\mingw\bin\../lib/gcc/mingw32/4.7.2/../../../../include/winnt.h:136:15: note: previous declaration of 'TCHAR' was here In file included from c:\mingw\bin\../lib/gcc/mingw32/4.7.2/../../../../include/ sql.h:19:0, from common.h:24, from long_error.c:3: c:\mingw\bin\../lib/gcc/mingw32/4.7.2/../../../../include/sqltypes.h:111:29: err or: conflicting types for 'LPTSTR' In file included from c:\mingw\bin\../lib/gcc/mingw32/4.7.2/../../../../include/ windef.h:239:0, from c:\mingw\bin\../lib/gcc/mingw32/4.7.2/../../../../include/ windows.h:60, from c:\mingw\bin\../lib/gcc/mingw32/4.7.2/../../../../include/ winsock2.h:40, from c:\mingw\bin\../lib/gcc/mingw32/4.7.2/../../../../include/ ws2tcpip.h:41, from common.h:3, from long_error.c:3: c:\mingw\bin\../lib/gcc/mingw32/4.7.2/../../../../include/winnt.h:154:30: note: previous declaration of 'LPTSTR' was here make[1]: *** [long_error.o] Error 1 From freddy77 at gmail.com Fri May 15 13:53:47 2015 From: freddy77 at gmail.com (Frediano Ziglio) Date: Fri, 15 May 2015 18:53:47 +0100 Subject: [freetds] [0.95rc2] Unit Tests / Unicode In-Reply-To: References: <20140421101925.b9044bc6.jklowden@freetds.org> <0cc1ec4c3989bd6363aba6c76e7a8fc8@xentu.com> <7bcf499156f914b9e7d8c1bc491adf18@xentu.com> Message-ID: 2015-05-15 8:49 GMT+01:00 Sergio NNX : > CC long_error.o > In file included from c:\mingw\bin\../lib/gcc/mingw32/4.7.2/../../../../include/ > sql.h:19:0, > from common.h:24, > from long_error.c:3: > c:\mingw\bin\../lib/gcc/mingw32/4.7.2/../../../../include/sqltypes.h:87:29: erro > r: conflicting types for 'TCHAR' > In file included from c:\mingw\bin\../lib/gcc/mingw32/4.7.2/../../../../include/ > windef.h:239:0, > from c:\mingw\bin\../lib/gcc/mingw32/4.7.2/../../../../include/ > windows.h:60, > from c:\mingw\bin\../lib/gcc/mingw32/4.7.2/../../../../include/ > winsock2.h:40, > from c:\mingw\bin\../lib/gcc/mingw32/4.7.2/../../../../include/ > ws2tcpip.h:41, > from common.h:3, > from long_error.c:3: > c:\mingw\bin\../lib/gcc/mingw32/4.7.2/../../../../include/winnt.h:136:15: note: > previous declaration of 'TCHAR' was here > In file included from c:\mingw\bin\../lib/gcc/mingw32/4.7.2/../../../../include/ > sql.h:19:0, > from common.h:24, > from long_error.c:3: > c:\mingw\bin\../lib/gcc/mingw32/4.7.2/../../../../include/sqltypes.h:111:29: err > or: conflicting types for 'LPTSTR' > In file included from c:\mingw\bin\../lib/gcc/mingw32/4.7.2/../../../../include/ > windef.h:239:0, > from c:\mingw\bin\../lib/gcc/mingw32/4.7.2/../../../../include/ > windows.h:60, > from c:\mingw\bin\../lib/gcc/mingw32/4.7.2/../../../../include/ > winsock2.h:40, > from c:\mingw\bin\../lib/gcc/mingw32/4.7.2/../../../../include/ > ws2tcpip.h:41, > from common.h:3, > from long_error.c:3: > c:\mingw\bin\../lib/gcc/mingw32/4.7.2/../../../../include/winnt.h:154:30: note: > previous declaration of 'LPTSTR' was here > make[1]: *** [long_error.o] Error 1 > This looks like an header but in your MingW. Try including windows.h before winsock2.h. Or sqlucode.h before sql.h. On Ubuntu I have a cross MingW with gcc 4.8.2 is is working correctly. Also Visual Studio 8.0 has no problems compiling it. Frediano From freddy77 at gmail.com Sat May 16 01:12:18 2015 From: freddy77 at gmail.com (Frediano Ziglio) Date: Sat, 16 May 2015 06:12:18 +0100 Subject: [freetds] [0.95rc2] Unit Tests / Unicode In-Reply-To: References: <20140421101925.b9044bc6.jklowden@freetds.org> <0cc1ec4c3989bd6363aba6c76e7a8fc8@xentu.com> <7bcf499156f914b9e7d8c1bc491adf18@xentu.com> Message-ID: 2015-05-15 8:49 GMT+01:00 Sergio NNX : > CC long_error.o > In file included from c:\mingw\bin\../lib/gcc/mingw32/4.7.2/../../../../include/ > sql.h:19:0, > from common.h:24, > from long_error.c:3: > c:\mingw\bin\../lib/gcc/mingw32/4.7.2/../../../../include/sqltypes.h:87:29: erro > r: conflicting types for 'TCHAR' > In file included from c:\mingw\bin\../lib/gcc/mingw32/4.7.2/../../../../include/ > windef.h:239:0, > from c:\mingw\bin\../lib/gcc/mingw32/4.7.2/../../../../include/ > windows.h:60, > from c:\mingw\bin\../lib/gcc/mingw32/4.7.2/../../../../include/ > winsock2.h:40, > from c:\mingw\bin\../lib/gcc/mingw32/4.7.2/../../../../include/ > ws2tcpip.h:41, > from common.h:3, > from long_error.c:3: > c:\mingw\bin\../lib/gcc/mingw32/4.7.2/../../../../include/winnt.h:136:15: note: > previous declaration of 'TCHAR' was here > In file included from c:\mingw\bin\../lib/gcc/mingw32/4.7.2/../../../../include/ > sql.h:19:0, > from common.h:24, > from long_error.c:3: > c:\mingw\bin\../lib/gcc/mingw32/4.7.2/../../../../include/sqltypes.h:111:29: err > or: conflicting types for 'LPTSTR' > In file included from c:\mingw\bin\../lib/gcc/mingw32/4.7.2/../../../../include/ > windef.h:239:0, > from c:\mingw\bin\../lib/gcc/mingw32/4.7.2/../../../../include/ > windows.h:60, > from c:\mingw\bin\../lib/gcc/mingw32/4.7.2/../../../../include/ > winsock2.h:40, > from c:\mingw\bin\../lib/gcc/mingw32/4.7.2/../../../../include/ > ws2tcpip.h:41, > from common.h:3, > from long_error.c:3: > c:\mingw\bin\../lib/gcc/mingw32/4.7.2/../../../../include/winnt.h:154:30: note: > previous declaration of 'LPTSTR' was here > make[1]: *** [long_error.o] Error 1 > Hi Sergio, Can you try this version? Can you post DUMPs for rpc tests ? Use a temporary user you you are afraid of security leaks of send privately to me. Thanks, Frediano PS: Are you Italian ? What's your real name ? -------------- next part -------------- A non-text attachment was scrubbed... Name: long_error.c Type: text/x-csrc Size: 2598 bytes Desc: not available URL: From bendavid at briarpatch.coop Sat May 16 15:55:54 2015 From: bendavid at briarpatch.coop (Ben David) Date: Sat, 16 May 2015 19:55:54 +0000 Subject: [freetds] Version Not Updating; Connection Not Connecting Message-ID: Dear FreeTDS Mailing List, Thanks for the list! I've been reading it a lot to no avail, so I thought I would finally post. The basic story for creating this is that we have a SQL Anywhere 12 database on the network here at work we are trying to connect to from another workstation - the plan is to utilize PHP PDO with FreeTDS/ODBC as the connector. I installed FreeTDS to accomplish this in part, but I am having an incredibly difficult time getting it to work. Here is my system config: CentOS: 7 FreeTDS: 4.2 (trying to get it to use version 8.0) PHP: 5.4.16 The following configuration was adapted from a thread on this forum after multiple failed attempts otherwise, I thought it would be a better place to start than my other attempts: --- My current freetds.conf: [global] tds version = 8.0 client charset = UTF-8 dump file = /tmp/freetds.log dump file append = yes debug flags = 0xffff debug level = 10 text size = 64512 [mssql_tds] host = 101.215.76.250 port = 2638 tds version = 8.0 client charset = UTF-8 odbc.ini (found in the /php.d/ directory, not in /etc/): extension=odbc.so [mssql] Description = mssql_tds Driver = mssql_tds Server = mssql_tds Port = 2638 Trace = Yes TraceFile = /tmp/odbc.log TDS_Version = 8.0 odbcinst.ini: # Define where to find the driver for the FreeTDS ODBC connections. [ODBC] Trace = yes Tracefile = /tmp/odbc.log ForceTrace = Yes [mssql_tds] Description = MSSQL driver Driver64 = /usr/lib64/libtdsodbc.so Setup64 = /usr/lib64/libtdsS.so UsageCount = 2 CPTimeout = CPReuse = When I reboot, here is my tsql -C: Version: freetds v0.91 freetds.conf directory: /etc MS db-lib source compatibility: yes Sybase binary compatibility: yes Thread safety: yes iconv library: yes TDS version: 4.2 iODBC: no unixodbc: yes SSPI "trusted" logins: no Kerberos: yes --- I don't know how it is happening, but the TDS version is not being updated, and I cannot even attempt to debug anything because there is no freetds.log file in my /tmp/ directory (or anywhere else - actually I did find one subsequently after using TSQL command line) when I run the php code (here's that code if relevant): getMessage() . "\n"; exit; } $stmt = $dbh->prepare("select name from master..sysdatabases where name = db_name()"); $stmt->execute(); while ($row = $stmt->fetch()) { print_r($row); } unset($dbh); unset($stmt); ?> --- If I use "$ tsql -S 101.215.76.250 -U username -P password" it starts counting and does not stop. A log file is created with this command: 2:44:23.453378 9855 (log.c:196):Starting log file for FreeTDS 0.91 on 2015-05-16 12:44:23 with debug flags 0xffff. 12:44:23.454088 9855 (iconv.c:330):tds_iconv_open(0x237ccf0, UTF-8) 12:44:23.454422 9855 (iconv.c:187):local name for ISO-8859-1 is ISO-8859-1 12:44:23.454439 9855 (iconv.c:187):local name for UTF-8 is UTF-8 12:44:23.454451 9855 (iconv.c:187):local name for UCS-2LE is UCS-2LE 12:44:23.454462 9855 (iconv.c:187):local name for UCS-2BE is UCS-2BE 12:44:23.454473 9855 (iconv.c:349):setting up conversions for client charset "UTF-8" 12:44:23.454484 9855 (iconv.c:351):preparing iconv for "UTF-8" <-> "UCS-2LE" conversion 12:44:23.454515 9855 (iconv.c:391):preparing iconv for "ISO-8859-1" <-> "UCS-2LE" conversion 12:44:23.454542 9855 (iconv.c:394):tds_iconv_open: done 12:44:23.454567 9855 (net.c:205):Connecting to 101.215.76.250 port 1433 (TDS version 7.1) 12:44:23.455570 9855 (net.c:270):tds_open_socket: connect(2) returned "Operation now in progress" My interpretation of this is it never succeeds? I have no idea why it is using port 1433 and TDS version 7.1 when the port is declared as 2638 in the config and TDS is reading as 4.2 with the TSQL -C command. Also, no odbc.log file was ever created. I guess the first step would be to connect correctly with the tsql command line and then adapt the PHP to be compatible with how that connection is set up. Any help or indications of where a good place to start getting this connection working would be incredibly helpful - I've spent weeks on trying to get it going, it's been a bit like entering a dark forest with barely any signs. Kind Regards, Ben David From freddy77 at gmail.com Sat May 16 16:28:50 2015 From: freddy77 at gmail.com (Frediano Ziglio) Date: Sat, 16 May 2015 21:28:50 +0100 Subject: [freetds] Version Not Updating; Connection Not Connecting In-Reply-To: References: Message-ID: 2015-05-16 20:55 GMT+01:00 Ben David : > Dear FreeTDS Mailing List, > > Thanks for the list! I've been reading it a lot to no avail, so I thought I would finally post. The basic story for creating this is that we have a SQL Anywhere 12 database on the network here at work we are trying to connect to from another workstation - the plan is to utilize PHP PDO with FreeTDS/ODBC as the connector. > > I installed FreeTDS to accomplish this in part, but I am having an incredibly difficult time getting it to work. Here is my system config: > > CentOS: 7 > FreeTDS: 4.2 (trying to get it to use version 8.0) > PHP: 5.4.16 > > The following configuration was adapted from a thread on this forum after multiple failed attempts otherwise, I thought it would be a better place to start than my other attempts: > > --- > > My current freetds.conf: > > [global] > tds version = 8.0 > client charset = UTF-8 > dump file = /tmp/freetds.log > dump file append = yes > debug flags = 0xffff > debug level = 10 > text size = 64512 > [mssql_tds] > host = 101.215.76.250 > port = 2638 > tds version = 8.0 > client charset = UTF-8 > > odbc.ini (found in the /php.d/ directory, not in /etc/): > > extension=odbc.so > > [mssql] > Description = mssql_tds > Driver = mssql_tds > Server = mssql_tds > Port = 2638 > Trace = Yes > TraceFile = /tmp/odbc.log > TDS_Version = 8.0 > > odbcinst.ini: > > # Define where to find the driver for the FreeTDS ODBC connections. > > [ODBC] > Trace = yes > Tracefile = /tmp/odbc.log > ForceTrace = Yes > [mssql_tds] > Description = MSSQL driver > Driver64 = /usr/lib64/libtdsodbc.so > Setup64 = /usr/lib64/libtdsS.so > UsageCount = 2 > CPTimeout = > CPReuse = > > When I reboot, here is my tsql -C: > > Version: freetds v0.91 > freetds.conf directory: /etc > MS db-lib source compatibility: yes > Sybase binary compatibility: yes > Thread safety: yes > iconv library: yes > TDS version: 4.2 > iODBC: no > unixodbc: yes > SSPI "trusted" logins: no > Kerberos: yes > > --- > > I don't know how it is happening, but the TDS version is not being updated, and I cannot even attempt to debug anything because there is no freetds.log file in my /tmp/ directory (or anywhere else - actually I did find one subsequently after using TSQL command line) when I run the php code (here's that code if relevant): > > try { > $hostname = "101.215.76.250"; > $port = 2638; > $dbname = "dbname"; > $username = "username"; > $pw = "password"; > $dbh = new PDO ("dblib:host=$hostname:$port;dbname=$dbname","$username","$pw"); > } catch (PDOException $e) { > echo "Failed to get DB handle: " . $e->getMessage() . "\n"; > exit; > } > $stmt = $dbh->prepare("select name from master..sysdatabases where name = db_name()"); > $stmt->execute(); > while ($row = $stmt->fetch()) { > print_r($row); > } > unset($dbh); unset($stmt); > ?> > > --- > > If I use "$ tsql -S 101.215.76.250 -U username -P password" it starts counting and does not stop. A log file is created with this command: > > 2:44:23.453378 9855 (log.c:196):Starting log file for FreeTDS 0.91 > on 2015-05-16 12:44:23 with debug flags 0xffff. > 12:44:23.454088 9855 (iconv.c:330):tds_iconv_open(0x237ccf0, UTF-8) > 12:44:23.454422 9855 (iconv.c:187):local name for ISO-8859-1 is ISO-8859-1 > 12:44:23.454439 9855 (iconv.c:187):local name for UTF-8 is UTF-8 > 12:44:23.454451 9855 (iconv.c:187):local name for UCS-2LE is UCS-2LE > 12:44:23.454462 9855 (iconv.c:187):local name for UCS-2BE is UCS-2BE > 12:44:23.454473 9855 (iconv.c:349):setting up conversions for client charset "UTF-8" > 12:44:23.454484 9855 (iconv.c:351):preparing iconv for "UTF-8" <-> "UCS-2LE" conversion > 12:44:23.454515 9855 (iconv.c:391):preparing iconv for "ISO-8859-1" <-> "UCS-2LE" conversion > 12:44:23.454542 9855 (iconv.c:394):tds_iconv_open: done > 12:44:23.454567 9855 (net.c:205):Connecting to 101.215.76.250 port 1433 (TDS version 7.1) > 12:44:23.455570 9855 (net.c:270):tds_open_socket: connect(2) returned "Operation now in progress" > > My interpretation of this is it never succeeds? I have no idea why it is using port 1433 and TDS version 7.1 when the port is declared as 2638 in the config and TDS is reading as 4.2 with the TSQL -C command. Also, no odbc.log file was ever created. > > I guess the first step would be to connect correctly with the tsql command line and then adapt the PHP to be compatible with how that connection is set up. > > Any help or indications of where a good place to start getting this connection working would be incredibly helpful - I've spent weeks on trying to get it going, it's been a bit like entering a dark forest with barely any signs. > > Kind Regards, > Ben David > Did you read the user guide? See http://www.freetds.org/userguide/. For Sybase use version 5.0. Version 8.0 is obsolete and for Microsoft version. Also servername is mssql_tds (from freetds.conf), not 101.215.76.250 (-S tsql argument, for ip/hostname use -H and -p for port). tsql -C print the default version used in configure, so it always print (in your case) 4.2. For ODBC driver name we suggest FreeTDS, also using same name for driver and connection can be confusing. Frediano From bendavid at briarpatch.coop Sat May 16 17:31:48 2015 From: bendavid at briarpatch.coop (Ben David) Date: Sat, 16 May 2015 21:31:48 +0000 Subject: [freetds] Version Not Updating; Connection Not Connecting In-Reply-To: References: Message-ID: Thank you so much for your response - for the first time since starting this project I've connected!!! My boss wouldn't give me the work-time to read any guides from back-to-front but I've been skimming through it. A bit of my confusion came because I was reading mixed MSSQL and Sybase articles in terms of connecting because I was advised earlier to use MSSQL connection settings because they were basically the same DB (or at least similar enough - in this case, apparently not). I really appreciate the time you took to look and respond, thank you! -Ben David -----Original Message----- From: FreeTDS [mailto:freetds-bounces at lists.ibiblio.org] On Behalf Of Frediano Ziglio Sent: Saturday, May 16, 2015 1:29 PM To: FreeTDS Development Group Subject: Re: [freetds] Version Not Updating; Connection Not Connecting 2015-05-16 20:55 GMT+01:00 Ben David : > Dear FreeTDS Mailing List, > > Thanks for the list! I've been reading it a lot to no avail, so I thought I would finally post. The basic story for creating this is that we have a SQL Anywhere 12 database on the network here at work we are trying to connect to from another workstation - the plan is to utilize PHP PDO with FreeTDS/ODBC as the connector. > > I installed FreeTDS to accomplish this in part, but I am having an incredibly difficult time getting it to work. Here is my system config: > > CentOS: 7 > FreeTDS: 4.2 (trying to get it to use version 8.0) > PHP: 5.4.16 > > The following configuration was adapted from a thread on this forum after multiple failed attempts otherwise, I thought it would be a better place to start than my other attempts: > > --- > > My current freetds.conf: > > [global] > tds version = 8.0 > client charset = UTF-8 > dump file = /tmp/freetds.log > dump file append = yes > debug flags = 0xffff > debug level = 10 > text size = 64512 > [mssql_tds] > host = 101.215.76.250 > port = 2638 > tds version = 8.0 > client charset = UTF-8 > > odbc.ini (found in the /php.d/ directory, not in /etc/): > > extension=odbc.so > > [mssql] > Description = mssql_tds > Driver = mssql_tds > Server = mssql_tds > Port = 2638 > Trace = Yes > TraceFile = /tmp/odbc.log > TDS_Version = 8.0 > > odbcinst.ini: > > # Define where to find the driver for the FreeTDS ODBC connections. > > [ODBC] > Trace = yes > Tracefile = /tmp/odbc.log > ForceTrace = Yes > [mssql_tds] > Description = MSSQL driver > Driver64 = /usr/lib64/libtdsodbc.so > Setup64 = /usr/lib64/libtdsS.so > UsageCount = 2 > CPTimeout = > CPReuse = > > When I reboot, here is my tsql -C: > > Version: freetds v0.91 > freetds.conf directory: /etc > MS db-lib source compatibility: yes > Sybase binary compatibility: yes > Thread safety: yes > iconv library: yes > TDS version: 4.2 > iODBC: no > unixodbc: yes > SSPI "trusted" logins: no > Kerberos: yes > > --- > > I don't know how it is happening, but the TDS version is not being updated, and I cannot even attempt to debug anything because there is no freetds.log file in my /tmp/ directory (or anywhere else - actually I did find one subsequently after using TSQL command line) when I run the php code (here's that code if relevant): > > try { > $hostname = "101.215.76.250"; > $port = 2638; > $dbname = "dbname"; > $username = "username"; > $pw = "password"; > $dbh = new PDO ("dblib:host=$hostname:$port;dbname=$dbname","$username","$pw"); > } catch (PDOException $e) { > echo "Failed to get DB handle: " . $e->getMessage() . "\n"; > exit; > } > $stmt = $dbh->prepare("select name from master..sysdatabases where name = db_name()"); > $stmt->execute(); > while ($row = $stmt->fetch()) { > print_r($row); > } > unset($dbh); unset($stmt); > ?> > > --- > > If I use "$ tsql -S 101.215.76.250 -U username -P password" it starts counting and does not stop. A log file is created with this command: > > 2:44:23.453378 9855 (log.c:196):Starting log file for FreeTDS 0.91 > on 2015-05-16 12:44:23 with debug flags 0xffff. > 12:44:23.454088 9855 (iconv.c:330):tds_iconv_open(0x237ccf0, UTF-8) > 12:44:23.454422 9855 (iconv.c:187):local name for ISO-8859-1 is > ISO-8859-1 > 12:44:23.454439 9855 (iconv.c:187):local name for UTF-8 is UTF-8 > 12:44:23.454451 9855 (iconv.c:187):local name for UCS-2LE is UCS-2LE > 12:44:23.454462 9855 (iconv.c:187):local name for UCS-2BE is UCS-2BE > 12:44:23.454473 9855 (iconv.c:349):setting up conversions for client charset "UTF-8" > 12:44:23.454484 9855 (iconv.c:351):preparing iconv for "UTF-8" <-> > "UCS-2LE" conversion > 12:44:23.454515 9855 (iconv.c:391):preparing iconv for "ISO-8859-1" > <-> "UCS-2LE" conversion > 12:44:23.454542 9855 (iconv.c:394):tds_iconv_open: done > 12:44:23.454567 9855 (net.c:205):Connecting to 101.215.76.250 port > 1433 (TDS version 7.1) > 12:44:23.455570 9855 (net.c:270):tds_open_socket: connect(2) returned "Operation now in progress" > > My interpretation of this is it never succeeds? I have no idea why it is using port 1433 and TDS version 7.1 when the port is declared as 2638 in the config and TDS is reading as 4.2 with the TSQL -C command. Also, no odbc.log file was ever created. > > I guess the first step would be to connect correctly with the tsql command line and then adapt the PHP to be compatible with how that connection is set up. > > Any help or indications of where a good place to start getting this connection working would be incredibly helpful - I've spent weeks on trying to get it going, it's been a bit like entering a dark forest with barely any signs. > > Kind Regards, > Ben David > Did you read the user guide? See http://www.freetds.org/userguide/. For Sybase use version 5.0. Version 8.0 is obsolete and for Microsoft version. Also servername is mssql_tds (from freetds.conf), not 101.215.76.250 (-S tsql argument, for ip/hostname use -H and -p for port). tsql -C print the default version used in configure, so it always print (in your case) 4.2. For ODBC driver name we suggest FreeTDS, also using same name for driver and connection can be confusing. Frediano _______________________________________________ FreeTDS mailing list FreeTDS at lists.ibiblio.org http://lists.ibiblio.org/mailman/listinfo/freetds From sfhacker at hotmail.com Sat May 16 21:13:40 2015 From: sfhacker at hotmail.com (Sergio NNX) Date: Sun, 17 May 2015 11:13:40 +1000 Subject: [freetds] Version Not Updating; Connection Not Connecting In-Reply-To: References: , , Message-ID: > My boss wouldn't give me the work-time to read any guides from back-to-front but I've been skimming through it. A bit of my confusion came because I was reading mixed MSSQL and Sybase articles in terms of connecting because I was advised earlier to use MSSQL connection settings because they were basically the same DB (or at least similar enough - in this case, apparently not). > > I really appreciate the time you took to look and respond, thank you! Hi Ben, We have been using FreeTDS with MSSQL & Sybase for some time now without issues. We have just built the latest RC version and it's very promising (have you tried a newer version?). We don't use Linux here. However I assume the config files would be the same regardless of the OS. We are more than happy to help provided we can reproduce your settings or environment on Windows. Cheers. Sergio. From randy at thesyrings.us Sun May 17 10:13:09 2015 From: randy at thesyrings.us (Randy Syring) Date: Sun, 17 May 2015 10:13:09 -0400 Subject: [freetds] Two versions of user guide? Message-ID: <5558A1F5.7070706@thesyrings.us> Are there two versions of the user guide on the site? http://www.freetds.org/choosingtdsprotocol.htm (has updated info about obsolete versions) http://www.freetds.org/userguide/choosingtdsprotocol.htm (not the same info) *Randy Syring* Husband | Father | Redeemed Sinner /"For what does it profit a man to gain the whole world and forfeit his soul?" (Mark 8:36 ESV)/ From freddy77 at gmail.com Sun May 17 13:31:29 2015 From: freddy77 at gmail.com (Frediano Ziglio) Date: Sun, 17 May 2015 18:31:29 +0100 Subject: [freetds] Two versions of user guide? In-Reply-To: <5558A1F5.7070706@thesyrings.us> References: <5558A1F5.7070706@thesyrings.us> Message-ID: 2015-05-17 15:13 GMT+01:00 Randy Syring : > Are there two versions of the user guide on the site? > > http://www.freetds.org/choosingtdsprotocol.htm (has updated info about > obsolete versions) > http://www.freetds.org/userguide/choosingtdsprotocol.htm (not the same info) > > *Randy Syring* > Husband | Father | Redeemed Sinner > > /"For what does it profit a man to gain the whole world > and forfeit his soul?" (Mark 8:36 ESV)/ > First page was a preview of a change for next rc. Now is a 404 :) Frediano From randy at thesyrings.us Sun May 17 15:59:57 2015 From: randy at thesyrings.us (Randy Syring) Date: Sun, 17 May 2015 15:59:57 -0400 Subject: [freetds] Two versions of user guide? In-Reply-To: References: <5558A1F5.7070706@thesyrings.us> Message-ID: <5558F33D.7040401@thesyrings.us> Ok. I still think it would be better to list the older versions in the table and just note that they are aliases. I think it will be more visible and intuative that way. *Randy Syring* Husband | Father | Redeemed Sinner /"For what does it profit a man to gain the whole world and forfeit his soul?" (Mark 8:36 ESV)/ On 05/17/2015 01:31 PM, Frediano Ziglio wrote: > 2015-05-17 15:13 GMT+01:00 Randy Syring : >> Are there two versions of the user guide on the site? >> >> http://www.freetds.org/choosingtdsprotocol.htm (has updated info about >> obsolete versions) >> http://www.freetds.org/userguide/choosingtdsprotocol.htm (not the same info) >> >> *Randy Syring* >> Husband | Father | Redeemed Sinner >> >> /"For what does it profit a man to gain the whole world >> and forfeit his soul?" (Mark 8:36 ESV)/ >> > > First page was a preview of a change for next rc. Now is a 404 :) > > Frediano > _______________________________________________ > FreeTDS mailing list > FreeTDS at lists.ibiblio.org > http://lists.ibiblio.org/mailman/listinfo/freetds > From geoff.montee at gmail.com Wed May 20 17:38:49 2015 From: geoff.montee at gmail.com (Geoff Montee) Date: Wed, 20 May 2015 14:38:49 -0700 Subject: [freetds] Connecting to a specific database with DB-Library Message-ID: Hi, Some tds_fdw users are having issues connecting to Microsoft Azure. At the moment, if a tds_fdw user wants to connect to a particular server and database, then tds_fdw connects to the server using dbopen(), and then switches to the database using dbuse(). The problem is that apparently Microsoft Azure doesn't support the syntax "USE databasename;", which is what dbuse() does behind the scenes. Is there a way to supply a connecting database name to dbopen() or another similar DB-Library function? In the Doxygen reference manual, I don't see any function or macro to add a database name to LOGINREC (i.e. something with a name like setldatabase()). I was thinking that users could just change the default database for a particular user on the server side to avoid the problem, but apparently Azure doesn't support that either. Thanks, Geoff Montee From freddy77 at gmail.com Wed May 20 18:32:28 2015 From: freddy77 at gmail.com (Frediano Ziglio) Date: Wed, 20 May 2015 23:32:28 +0100 Subject: [freetds] Connecting to a specific database with DB-Library In-Reply-To: References: Message-ID: 2015-05-20 22:38 GMT+01:00 Geoff Montee : > Hi, > > Some tds_fdw users are having issues connecting to Microsoft Azure. > > At the moment, if a tds_fdw user wants to connect to a particular > server and database, then tds_fdw connects to the server using > dbopen(), and then switches to the database using dbuse(). > > The problem is that apparently Microsoft Azure doesn't support the > syntax "USE databasename;", which is what dbuse() does behind the > scenes. > > Is there a way to supply a connecting database name to dbopen() or > another similar DB-Library function? In the Doxygen reference manual, > I don't see any function or macro to add a database name to LOGINREC > (i.e. something with a name like setldatabase()). > > I was thinking that users could just change the default database for a > particular user on the server side to avoid the problem, but > apparently Azure doesn't support that either. > > Thanks, > > Geoff Montee Hi, i think DBSETLDBNAME is what you want. Frediano From geoff.montee at gmail.com Wed May 20 18:57:43 2015 From: geoff.montee at gmail.com (Geoff Montee) Date: Wed, 20 May 2015 15:57:43 -0700 Subject: [freetds] Connecting to a specific database with DB-Library In-Reply-To: References: Message-ID: Hi Frediano, On Wed, May 20, 2015 at 3:32 PM, Frediano Ziglio wrote: > > i think DBSETLDBNAME is what you want. > Oh, thanks! I don't see that in the reference manual: http://www.freetds.org/reference/a00341.html Is the Doxygen manual outdated? Thanks, Geoff From freddy77 at gmail.com Thu May 21 00:55:46 2015 From: freddy77 at gmail.com (Frediano Ziglio) Date: Thu, 21 May 2015 05:55:46 +0100 Subject: [freetds] Third release candidate for 0.95 Message-ID: Hi, I packaged 0.95rc3 version. It includes: - more fixes for tests under Windows; - some small build problem with not default options; - fix for login with extended characters; - ODBC SQLFreeStmt fix if connection is busy from other statements. Last fix was quite intrusive but was not an easy problem to fix. Thanks Joel for the report. Regards, Frediano From freddy77 at gmail.com Thu May 21 04:24:13 2015 From: freddy77 at gmail.com (Frediano Ziglio) Date: Thu, 21 May 2015 09:24:13 +0100 Subject: [freetds] Connecting to a specific database with DB-Library In-Reply-To: References: Message-ID: 2015-05-20 23:57 GMT+01:00 Geoff Montee : > Hi Frediano, > > On Wed, May 20, 2015 at 3:32 PM, Frediano Ziglio wrote: >> >> i think DBSETLDBNAME is what you want. >> > > Oh, thanks! I don't see that in the reference manual: > > http://www.freetds.org/reference/a00341.html > > Is the Doxygen manual outdated? > > Thanks, > > Geoff Not at all, just not 100% complete. Feel free to send a patch Frediano From freddy77 at gmail.com Thu May 21 04:26:16 2015 From: freddy77 at gmail.com (Frediano Ziglio) Date: Thu, 21 May 2015 09:26:16 +0100 Subject: [freetds] Two versions of user guide? In-Reply-To: <5558F33D.7040401@thesyrings.us> References: <5558A1F5.7070706@thesyrings.us> <5558F33D.7040401@thesyrings.us> Message-ID: Hi Randy, just updated website user guide with latest rc. Could you see the page (http://www.freetds.org/userguide/choosingtdsprotocol.htm) and edit in some way. If you are not a sgml guru just same the page and edit, I'll look at changes. Frediano 2015-05-17 20:59 GMT+01:00 Randy Syring : > Ok. I still think it would be better to list the older versions in the > table and just note that they are aliases. I think it will be more visible > and intuative that way. > > *Randy Syring* > Husband | Father | Redeemed Sinner > > /"For what does it profit a man to gain the whole world > and forfeit his soul?" (Mark 8:36 ESV)/ > > On 05/17/2015 01:31 PM, Frediano Ziglio wrote: >> >> 2015-05-17 15:13 GMT+01:00 Randy Syring : >>> >>> Are there two versions of the user guide on the site? >>> >>> http://www.freetds.org/choosingtdsprotocol.htm (has updated info about >>> obsolete versions) >>> http://www.freetds.org/userguide/choosingtdsprotocol.htm (not the same >>> info) >>> >>> *Randy Syring* >>> Husband | Father | Redeemed Sinner >>> >>> /"For what does it profit a man to gain the whole world >>> and forfeit his soul?" (Mark 8:36 ESV)/ >>> >> >> First page was a preview of a change for next rc. Now is a 404 :) >> >> Frediano >> _______________________________________________ >> FreeTDS mailing list >> FreeTDS at lists.ibiblio.org >> http://lists.ibiblio.org/mailman/listinfo/freetds >> > > _______________________________________________ > FreeTDS mailing list > FreeTDS at lists.ibiblio.org > http://lists.ibiblio.org/mailman/listinfo/freetds From randy at thesyrings.us Thu May 21 09:44:21 2015 From: randy at thesyrings.us (Randy Syring) Date: Thu, 21 May 2015 09:44:21 -0400 Subject: [freetds] Two versions of user guide? In-Reply-To: References: <5558A1F5.7070706@thesyrings.us> <5558F33D.7040401@thesyrings.us> Message-ID: <555DE135.5050509@thesyrings.us> Final version: https://www.dropbox.com/s/110ze3bdaqohmhf/Choosing%20a%20TDS%20protocol%20version.htm?dl=0 My changes: https://gist.github.com/rsyring/e107d0443f6a0ca69a97/revisions Hope that helps. *Randy Syring* Husband | Father | Redeemed Sinner /"For what does it profit a man to gain the whole world and forfeit his soul?" (Mark 8:36 ESV)/ On 05/21/2015 04:26 AM, Frediano Ziglio wrote: > Hi Randy, > just updated website user guide with latest rc. Could you see the > page (http://www.freetds.org/userguide/choosingtdsprotocol.htm) and > edit in some way. If you are not a sgml guru just same the page and > edit, I'll look at changes. > > Frediano > > > 2015-05-17 20:59 GMT+01:00 Randy Syring: >> Ok. I still think it would be better to list the older versions in the >> table and just note that they are aliases. I think it will be more visible >> and intuative that way. >> >> *Randy Syring* >> Husband | Father | Redeemed Sinner >> >> /"For what does it profit a man to gain the whole world >> and forfeit his soul?" (Mark 8:36 ESV)/ >> >> On 05/17/2015 01:31 PM, Frediano Ziglio wrote: >>> 2015-05-17 15:13 GMT+01:00 Randy Syring: >>>> Are there two versions of the user guide on the site? >>>> >>>> http://www.freetds.org/choosingtdsprotocol.htm (has updated info about >>>> obsolete versions) >>>> http://www.freetds.org/userguide/choosingtdsprotocol.htm (not the same >>>> info) >>>> >>>> *Randy Syring* >>>> Husband | Father | Redeemed Sinner >>>> >>>> /"For what does it profit a man to gain the whole world >>>> and forfeit his soul?" (Mark 8:36 ESV)/ >>>> >>> First page was a preview of a change for next rc. Now is a 404 :) >>> >>> Frediano >>> _______________________________________________ >>> FreeTDS mailing list >>> FreeTDS at lists.ibiblio.org >>> http://lists.ibiblio.org/mailman/listinfo/freetds >>> >> _______________________________________________ >> FreeTDS mailing list >> FreeTDS at lists.ibiblio.org >> http://lists.ibiblio.org/mailman/listinfo/freetds > _______________________________________________ > FreeTDS mailing list > FreeTDS at lists.ibiblio.org > http://lists.ibiblio.org/mailman/listinfo/freetds > From freddy77 at gmail.com Fri May 22 19:53:58 2015 From: freddy77 at gmail.com (Frediano Ziglio) Date: Sat, 23 May 2015 00:53:58 +0100 Subject: [freetds] Two versions of user guide? In-Reply-To: <555DE135.5050509@thesyrings.us> References: <5558A1F5.7070706@thesyrings.us> <5558F33D.7040401@thesyrings.us> <555DE135.5050509@thesyrings.us> Message-ID: Thank you. Don't you think 9.0 on the table is too misleading? The story about the version was a bit more complicated. For 7.0 was exactly the product version (MSSQL 7 is product 7.0 with protocol 7.0). For MSSQL 2000 (product 8.0) there were some documentation (probably MSDN) that also refer to a 8.0 protocol version. Could be a misunderstanding, a typo or the author didn't know much about but it did not came directly from us, or at least was confirmed in a semi official way. Years after when they released the specifications we saw 7.1 and so on. Frediano 2015-05-21 14:44 GMT+01:00 Randy Syring : > Final version: > https://www.dropbox.com/s/110ze3bdaqohmhf/Choosing%20a%20TDS%20protocol%20version.htm?dl=0 > > My changes: https://gist.github.com/rsyring/e107d0443f6a0ca69a97/revisions > > Hope that helps. > > *Randy Syring* > Husband | Father | Redeemed Sinner > > /"For what does it profit a man to gain the whole world > and forfeit his soul?" (Mark 8:36 ESV)/ > > On 05/21/2015 04:26 AM, Frediano Ziglio wrote: >> >> Hi Randy, >> just updated website user guide with latest rc. Could you see the >> page (http://www.freetds.org/userguide/choosingtdsprotocol.htm) and >> edit in some way. If you are not a sgml guru just same the page and >> edit, I'll look at changes. >> >> Frediano >> >> >> 2015-05-17 20:59 GMT+01:00 Randy Syring: >>> >>> Ok. I still think it would be better to list the older versions in the >>> table and just note that they are aliases. I think it will be more >>> visible >>> and intuative that way. >>> >>> *Randy Syring* >>> Husband | Father | Redeemed Sinner >>> >>> /"For what does it profit a man to gain the whole world >>> and forfeit his soul?" (Mark 8:36 ESV)/ >>> >>> On 05/17/2015 01:31 PM, Frediano Ziglio wrote: >>>> >>>> 2015-05-17 15:13 GMT+01:00 Randy Syring: >>>>> >>>>> Are there two versions of the user guide on the site? >>>>> >>>>> http://www.freetds.org/choosingtdsprotocol.htm (has updated info about >>>>> obsolete versions) >>>>> http://www.freetds.org/userguide/choosingtdsprotocol.htm (not the same >>>>> info) >>>>> >>>>> *Randy Syring* >>>>> Husband | Father | Redeemed Sinner >>>>> >>>>> /"For what does it profit a man to gain the whole world >>>>> and forfeit his soul?" (Mark 8:36 ESV)/ >>>>> >>>> First page was a preview of a change for next rc. Now is a 404 :) >>>> >>>> Frediano >>>> _______________________________________________ >>>> FreeTDS mailing list >>>> FreeTDS at lists.ibiblio.org >>>> http://lists.ibiblio.org/mailman/listinfo/freetds >>>> >>> _______________________________________________ >>> FreeTDS mailing list >>> FreeTDS at lists.ibiblio.org >>> http://lists.ibiblio.org/mailman/listinfo/freetds >> >> _______________________________________________ >> FreeTDS mailing list >> FreeTDS at lists.ibiblio.org >> http://lists.ibiblio.org/mailman/listinfo/freetds >> > > _______________________________________________ > FreeTDS mailing list > FreeTDS at lists.ibiblio.org > http://lists.ibiblio.org/mailman/listinfo/freetds From randy at thesyrings.us Sat May 23 12:47:07 2015 From: randy at thesyrings.us (Randy Syring) Date: Sat, 23 May 2015 12:47:07 -0400 Subject: [freetds] Two versions of user guide? In-Reply-To: References: <5558A1F5.7070706@thesyrings.us> <5558F33D.7040401@thesyrings.us> <555DE135.5050509@thesyrings.us> Message-ID: <5560AF0B.7000703@thesyrings.us> I only put 9.0 on the table because it was mentioned in the original page you wrote. It was the first time I'd heard of a 9.0 protocol. I'm ok removing it from the table. For the history, I wasn't really sure on exactly what happened. :) I've updated the Dropbox doc and gist to address your concerns. Let me know your thoughts. Thanks. *Randy Syring* Husband | Father | Redeemed Sinner /"For what does it profit a man to gain the whole world and forfeit his soul?" (Mark 8:36 ESV)/ On 05/22/2015 07:53 PM, Frediano Ziglio wrote: > Thank you. > > Don't you think 9.0 on the table is too misleading? > > The story about the version was a bit more complicated. For 7.0 was > exactly the product version (MSSQL 7 is product 7.0 with protocol > 7.0). For MSSQL 2000 (product 8.0) there were some documentation > (probably MSDN) that also refer to a 8.0 protocol version. Could be a > misunderstanding, a typo or the author didn't know much about but it > did not came directly from us, or at least was confirmed in a semi > official way. Years after when they released the specifications we saw > 7.1 and so on. > > Frediano > > > 2015-05-21 14:44 GMT+01:00 Randy Syring : >> Final version: >> https://www.dropbox.com/s/110ze3bdaqohmhf/Choosing%20a%20TDS%20protocol%20version.htm?dl=0 >> >> My changes: https://gist.github.com/rsyring/e107d0443f6a0ca69a97/revisions >> >> Hope that helps. >> >> *Randy Syring* >> Husband | Father | Redeemed Sinner >> >> /"For what does it profit a man to gain the whole world >> and forfeit his soul?" (Mark 8:36 ESV)/ >> >> On 05/21/2015 04:26 AM, Frediano Ziglio wrote: >>> Hi Randy, >>> just updated website user guide with latest rc. Could you see the >>> page (http://www.freetds.org/userguide/choosingtdsprotocol.htm) and >>> edit in some way. If you are not a sgml guru just same the page and >>> edit, I'll look at changes. >>> >>> Frediano >>> >>> >>> 2015-05-17 20:59 GMT+01:00 Randy Syring: >>>> Ok. I still think it would be better to list the older versions in the >>>> table and just note that they are aliases. I think it will be more >>>> visible >>>> and intuative that way. >>>> >>>> *Randy Syring* >>>> Husband | Father | Redeemed Sinner >>>> >>>> /"For what does it profit a man to gain the whole world >>>> and forfeit his soul?" (Mark 8:36 ESV)/ >>>> >>>> On 05/17/2015 01:31 PM, Frediano Ziglio wrote: >>>>> 2015-05-17 15:13 GMT+01:00 Randy Syring: >>>>>> Are there two versions of the user guide on the site? >>>>>> >>>>>> http://www.freetds.org/choosingtdsprotocol.htm (has updated info about >>>>>> obsolete versions) >>>>>> http://www.freetds.org/userguide/choosingtdsprotocol.htm (not the same >>>>>> info) >>>>>> >>>>>> *Randy Syring* >>>>>> Husband | Father | Redeemed Sinner >>>>>> >>>>>> /"For what does it profit a man to gain the whole world >>>>>> and forfeit his soul?" (Mark 8:36 ESV)/ >>>>>> >>>>> First page was a preview of a change for next rc. Now is a 404 :) >>>>> >>>>> Frediano >>>>> _______________________________________________ >>>>> FreeTDS mailing list >>>>> FreeTDS at lists.ibiblio.org >>>>> http://lists.ibiblio.org/mailman/listinfo/freetds >>>>> >>>> _______________________________________________ >>>> FreeTDS mailing list >>>> FreeTDS at lists.ibiblio.org >>>> http://lists.ibiblio.org/mailman/listinfo/freetds >>> _______________________________________________ >>> FreeTDS mailing list >>> FreeTDS at lists.ibiblio.org >>> http://lists.ibiblio.org/mailman/listinfo/freetds >>> >> _______________________________________________ >> FreeTDS mailing list >> FreeTDS at lists.ibiblio.org >> http://lists.ibiblio.org/mailman/listinfo/freetds > _______________________________________________ > FreeTDS mailing list > FreeTDS at lists.ibiblio.org > http://lists.ibiblio.org/mailman/listinfo/freetds > From freddy77 at gmail.com Sat May 23 14:50:47 2015 From: freddy77 at gmail.com (Frediano Ziglio) Date: Sat, 23 May 2015 19:50:47 +0100 Subject: [freetds] Two versions of user guide? In-Reply-To: <5560AF0B.7000703@thesyrings.us> References: <5558A1F5.7070706@thesyrings.us> <5558F33D.7040401@thesyrings.us> <555DE135.5050509@thesyrings.us> <5560AF0B.7000703@thesyrings.us> Message-ID: Hi, changes are fine for me, I committed! You will see changes on next development snapshot or in next RC version (that I hope is the last) Frediano 2015-05-23 17:47 GMT+01:00 Randy Syring : > I only put 9.0 on the table because it was mentioned in the original page > you wrote. It was the first time I'd heard of a 9.0 protocol. I'm ok > removing it from the table. > > For the history, I wasn't really sure on exactly what happened. :) > > I've updated the Dropbox doc and gist to address your concerns. Let me know > your thoughts. > > Thanks. > > *Randy Syring* > Husband | Father | Redeemed Sinner > > /"For what does it profit a man to gain the whole world > and forfeit his soul?" (Mark 8:36 ESV)/ > > On 05/22/2015 07:53 PM, Frediano Ziglio wrote: >> >> Thank you. >> >> Don't you think 9.0 on the table is too misleading? >> >> The story about the version was a bit more complicated. For 7.0 was >> exactly the product version (MSSQL 7 is product 7.0 with protocol >> 7.0). For MSSQL 2000 (product 8.0) there were some documentation >> (probably MSDN) that also refer to a 8.0 protocol version. Could be a >> misunderstanding, a typo or the author didn't know much about but it >> did not came directly from us, or at least was confirmed in a semi >> official way. Years after when they released the specifications we saw >> 7.1 and so on. >> >> Frediano >> >> >> 2015-05-21 14:44 GMT+01:00 Randy Syring : >>> >>> Final version: >>> >>> https://www.dropbox.com/s/110ze3bdaqohmhf/Choosing%20a%20TDS%20protocol%20version.htm?dl=0 >>> >>> My changes: >>> https://gist.github.com/rsyring/e107d0443f6a0ca69a97/revisions >>> >>> Hope that helps. >>> >>> *Randy Syring* >>> Husband | Father | Redeemed Sinner >>> >>> /"For what does it profit a man to gain the whole world >>> and forfeit his soul?" (Mark 8:36 ESV)/ >>> >>> On 05/21/2015 04:26 AM, Frediano Ziglio wrote: >>>> >>>> Hi Randy, >>>> just updated website user guide with latest rc. Could you see the >>>> page (http://www.freetds.org/userguide/choosingtdsprotocol.htm) and >>>> edit in some way. If you are not a sgml guru just same the page and >>>> edit, I'll look at changes. >>>> >>>> Frediano >>>> >>>> >>>> 2015-05-17 20:59 GMT+01:00 Randy Syring: >>>>> >>>>> Ok. I still think it would be better to list the older versions in the >>>>> table and just note that they are aliases. I think it will be more >>>>> visible >>>>> and intuative that way. >>>>> >>>>> *Randy Syring* >>>>> Husband | Father | Redeemed Sinner >>>>> >>>>> /"For what does it profit a man to gain the whole world >>>>> and forfeit his soul?" (Mark 8:36 ESV)/ >>>>> >>>>> On 05/17/2015 01:31 PM, Frediano Ziglio wrote: >>>>>> >>>>>> 2015-05-17 15:13 GMT+01:00 Randy Syring: >>>>>>> >>>>>>> Are there two versions of the user guide on the site? >>>>>>> >>>>>>> http://www.freetds.org/choosingtdsprotocol.htm (has updated info >>>>>>> about >>>>>>> obsolete versions) >>>>>>> http://www.freetds.org/userguide/choosingtdsprotocol.htm (not the >>>>>>> same >>>>>>> info) >>>>>>> >>>>>>> *Randy Syring* >>>>>>> Husband | Father | Redeemed Sinner >>>>>>> >>>>>>> /"For what does it profit a man to gain the whole world >>>>>>> and forfeit his soul?" (Mark 8:36 ESV)/ >>>>>>> >>>>>> First page was a preview of a change for next rc. Now is a 404 :) >>>>>> >>>>>> Frediano >>>>>> _______________________________________________ >>>>>> FreeTDS mailing list >>>>>> FreeTDS at lists.ibiblio.org >>>>>> http://lists.ibiblio.org/mailman/listinfo/freetds >>>>>> >>>>> _______________________________________________ >>>>> FreeTDS mailing list >>>>> FreeTDS at lists.ibiblio.org >>>>> http://lists.ibiblio.org/mailman/listinfo/freetds >>>> >>>> _______________________________________________ >>>> FreeTDS mailing list >>>> FreeTDS at lists.ibiblio.org >>>> http://lists.ibiblio.org/mailman/listinfo/freetds >>>> >>> _______________________________________________ >>> FreeTDS mailing list >>> FreeTDS at lists.ibiblio.org >>> http://lists.ibiblio.org/mailman/listinfo/freetds >> >> _______________________________________________ >> FreeTDS mailing list >> FreeTDS at lists.ibiblio.org >> http://lists.ibiblio.org/mailman/listinfo/freetds >> > > _______________________________________________ > FreeTDS mailing list > FreeTDS at lists.ibiblio.org > http://lists.ibiblio.org/mailman/listinfo/freetds From rrankins at gothamconsulting.com Wed May 27 07:09:26 2015 From: rrankins at gothamconsulting.com (Ray Rankins) Date: Wed, 27 May 2015 07:09:26 -0400 Subject: [freetds] Encrypted passwords Message-ID: <0f1701d0986d$98e6bca0$cab435e0$@gothamconsulting.com> Okay, I?ve searched through the list archives and googled all over the place and I think I already know the answer but wanted to ask here. Is there any version of FreeTDS that supports connecting to a Sybase server that requires passwords to be encrypted when sent over the network? I?ve tried adding ?encrypt = require? to the freetds.conf file, but that didn?t help. Whenever I try to connect to a Sybase server the requires encrypted password, it fails to login with error message 1640, ?Adaptive Server requires encryption of the login password on the network.? Looking at the source code for version 0.91 stable release, it looks like this functionality is not implemented? Thanks, -Ray From john at rrci.com Wed May 27 08:31:05 2015 From: john at rrci.com (John D. Robertson) Date: Wed, 27 May 2015 08:31:05 -0400 Subject: [freetds] How to retrieve network socket? Message-ID: <20150527083105.8aec2edacde4ee5aa024f445@rrci.com> I can't seem to find how one goes about retrieving the network socket from DBPROCESS. For asynchronous queries, I'd like to submit the socket (among many other sockets) to select() to find out when there is data waiting to be read. -- ============================================================= John D. Robertson, Computer / Engineering Consultant Robertson & Robertson Consultants, Inc. 3637 West Georgia Rd. Pelzer, SC 29669 Phone: (864) 243-2436 Email: john at rrci.com WWW: http://www.rrci.com From john at rrci.com Wed May 27 13:34:54 2015 From: john at rrci.com (John D. Robertson) Date: Wed, 27 May 2015 13:34:54 -0400 Subject: [freetds] How to retrieve network socket? In-Reply-To: <20150527083105.8aec2edacde4ee5aa024f445@rrci.com> References: <20150527083105.8aec2edacde4ee5aa024f445@rrci.com> Message-ID: <20150527133454.797a9677634e56293de0b275@rrci.com> On Wed, 27 May 2015 08:31:05 -0400 "John D. Robertson" wrote: > I can't seem to find how one goes about retrieving the network socket from DBPROCESS. For asynchronous queries, I'd like to submit the socket (among many other sockets) to select() to find out when there is data waiting to be read. > It looks like this works for a quick hack, but there should be an API call: DBPROCESS *dbp; /* Get connected to server ... */ /* The first member of 'struct tds_dblib_dbprocess' is * is a 'struct tds_socket*', and the first member of * 'struct tds_socket' is the socket, an 'int' on all *nix systems. */ int sock= **((int**)dbp); /* There you go. */ -- ============================================================= John D. Robertson, Computer / Engineering Consultant Robertson & Robertson Consultants, Inc. 3637 West Georgia Rd. Pelzer, SC 29669 Phone: (864) 243-2436 Email: john at rrci.com WWW: http://www.rrci.com From cramm0 at gmail.com Wed May 27 16:58:04 2015 From: cramm0 at gmail.com (Ramiro Morales) Date: Wed, 27 May 2015 17:58:04 -0300 Subject: [freetds] How to retrieve network socket? In-Reply-To: <20150527133454.797a9677634e56293de0b275@rrci.com> References: <20150527083105.8aec2edacde4ee5aa024f445@rrci.com> <20150527133454.797a9677634e56293de0b275@rrci.com> Message-ID: On Wed, May 27, 2015 at 2:34 PM, John D. Robertson wrote: > On Wed, 27 May 2015 08:31:05 -0400 > "John D. Robertson" wrote: > >> I can't seem to find how one goes about retrieving the network socket from DBPROCESS. For asynchronous queries, I'd like to submit the socket (among many other sockets) to select() to find out when there is data waiting to be read. >> > > > It looks like this works for a quick hack, but there should be an API call: > > DBPROCESS *dbp; > > /* Get connected to server ... */ > > /* The first member of 'struct tds_dblib_dbprocess' is > * is a 'struct tds_socket*', and the first member of > * 'struct tds_socket' is the socket, an 'int' on all *nix systems. > */ > > int sock= **((int**)dbp); > > /* There you go. */ DBIORDESC/DBIOWDESC/dbiordesc/dbiowdesc should be of help. http://www.freetds.org/reference/a00341.html#ga74ac942f9b7baa49e1d7d18628321297 -- Ramiro Morales @ramiromorales From freddy77 at gmail.com Wed May 27 17:25:49 2015 From: freddy77 at gmail.com (Frediano Ziglio) Date: Wed, 27 May 2015 22:25:49 +0100 Subject: [freetds] Encrypted passwords In-Reply-To: <0f1701d0986d$98e6bca0$cab435e0$@gothamconsulting.com> References: <0f1701d0986d$98e6bca0$cab435e0$@gothamconsulting.com> Message-ID: 2015-05-27 12:09 GMT+01:00 Ray Rankins : > Okay, I?ve searched through the list archives and googled all over the place and I think I already know the answer but wanted to ask here. > > > > Is there any version of FreeTDS that supports connecting to a Sybase server that requires passwords to be encrypted when sent over the network? > > > > I?ve tried adding ?encrypt = require? to the freetds.conf file, but that didn?t help. > > Whenever I try to connect to a Sybase server the requires encrypted password, it fails to login with error message 1640, ?Adaptive Server requires encryption of the login password on the network.? > > > > Looking at the source code for version 0.91 stable release, it looks like this functionality is not implemented? > > > > Thanks, > > -Ray > Not supported (and not planned either). Actually I don't even know how this is implemented at protocol level. Can you provide some network capture (using some test password of course) ? Frediano From john at rrci.com Wed May 27 21:14:53 2015 From: john at rrci.com (John D. Robertson) Date: Wed, 27 May 2015 21:14:53 -0400 Subject: [freetds] How to retrieve network socket? In-Reply-To: References: <20150527083105.8aec2edacde4ee5aa024f445@rrci.com> <20150527133454.797a9677634e56293de0b275@rrci.com> Message-ID: <20150527211453.c7d1fb41dec9988e6836ad8b@rrci.com> On Wed, 27 May 2015 17:58:04 -0300 Ramiro Morales wrote: > dbiowdesc Thanks. I used dbiordesc(), but they must return the same value. I've been studying FreeTDS and dblib for a couple of days, and I don't know how I overlooked these functions. JDR -- ============================================================= John D. Robertson, Computer / Engineering Consultant Robertson & Robertson Consultants, Inc. 3637 West Georgia Rd. Pelzer, SC 29669 Phone: (864) 243-2436 Email: john at rrci.com WWW: http://www.rrci.com From craigberry at mac.com Wed May 27 18:27:07 2015 From: craigberry at mac.com (Craig A. Berry) Date: Wed, 27 May 2015 22:27:07 +0000 (GMT) Subject: [freetds] rc3 looks good on OpenVMS Message-ID: <750487a0-dd58-4962-8a17-1c5380e8d145@me.com> Everything builds cleanly and I'm getting all tests passing when I test against Microsoft SQL 2008 R2. With SQL 2012 this test below fails, but I think it's just because "compute" has been removed in SQL 2012: SQL text will be read from ../../../src/dblib/unittests/t0023.sql Starting dsa0:[craig.freetds-0^.95rc3.src.dblib.unittests]t0023.exe About to logon About to open creating table 1: create table #dblib0023 (col1 int not null, col2 char(1) not null, col3 datetime not null) insert 1: insert into #dblib0023 values (1, 'A', 'Jan 1 2002 10:00:00AM') 1: insert into #dblib0023 values (2, 'A', 'Jan 2 2002 10:00:00AM') 1: insert into #dblib0023 values (3, 'A', 'Jan 3 2002 10:00:00AM') 1: insert into #dblib0023 values (8, 'B', 'Jan 4 2002 10:00:00AM') 1: insert into #dblib0023 values (9, 'B', 'Jan 5 2002 10:00:00AM') select 1: select col1, col2, col3 from #dblib0023 order by col2 compute sum(col1) by col2 compute max(col3) Msg 156, Level 15, State 1 Server 'ABC0012312?' , Line 1 Incorrect syntax near the keyword 'compute'. exit: no unanticipated messages allowed in unit tests From freddy77 at gmail.com Thu May 28 18:16:53 2015 From: freddy77 at gmail.com (Frediano Ziglio) Date: Thu, 28 May 2015 23:16:53 +0100 Subject: [freetds] rc3 looks good on OpenVMS In-Reply-To: <750487a0-dd58-4962-8a17-1c5380e8d145@me.com> References: <750487a0-dd58-4962-8a17-1c5380e8d145@me.com> Message-ID: Il 28/Mag/2015 09:58, "Craig A. Berry" ha scritto: > > Everything builds cleanly and I'm getting all tests passing when I test against Microsoft SQL 2008 R2. With SQL 2012 this test below fails, but I think it's just because "compute" has been removed in SQL 2012: > I was just going to ask you if you could test VMs. Good! Yes, that test check how compute queries reply so cannot work but is not a Freetds issue > SQL text will be read from ../../../src/dblib/unittests/t0023.sql > Starting dsa0:[craig.freetds-0^.95rc3.src.dblib.unittests]t0023.exe > About to logon > About to open > creating table > 1: create table #dblib0023 (col1 int not null, col2 char(1) not null, col3 datetime not null) > insert > 1: insert into #dblib0023 values (1, 'A', 'Jan 1 2002 10:00:00AM') > 1: insert into #dblib0023 values (2, 'A', 'Jan 2 2002 10:00:00AM') > 1: insert into #dblib0023 values (3, 'A', 'Jan 3 2002 10:00:00AM') > 1: insert into #dblib0023 values (8, 'B', 'Jan 4 2002 10:00:00AM') > 1: insert into #dblib0023 values (9, 'B', 'Jan 5 2002 10:00:00AM') > select > 1: select col1, col2, col3 from #dblib0023 order by col2 compute sum(col1) by col2 compute max(col3) > Msg 156, Level 15, State 1 > Server 'ABC0012312?' > , Line 1 > > Incorrect syntax near the keyword 'compute'. > exit: no unanticipated messages allowed in unit tests > Frediano From ondrej.holecek at qoretechnologies.com Tue Jun 2 04:49:35 2015 From: ondrej.holecek at qoretechnologies.com (Ondrej Holecek) Date: Tue, 2 Jun 2015 10:49:35 +0200 Subject: [freetds] affected rows after insert Message-ID: Hi, I have a problem obtaining number of affected rows while inserting. The problem occurs when I pass the values by ct_param() call. So, this command order works well: ct_cmd_alloc() ct_command(CS_LANG_CMD, "INSERT INTO test (number) VALUES(5)") ct_send() ct_result() // the result type is CS_CMD_DONE so I can call... ct_res_info(CS_ROW_COUNT) // as expected 1 row affected but when I call it like this, It skips CS_CMD_DONE, so I can't read the affected rows number. ct_cmd_alloc() ct_command(CS_LANG_CMD, "INSERT INTO test (number) VALUES(@par1)") ct_param("@par1", 1) ct_send() ct_result() // the result type is CS_END_RESULT // can't do anything here :-( The row is inserted in both cases correctly just in the second case I can't read the number of affected rows. I did some ctlib debugging and I created the patch which would fix this behavior. However, I just changed the code blindly (based on the debugging) not knowing what is the real purpose of the case. in ct_result() function I changed the case _CS_RES_INIT: case _CS_RES_INIT: /* commalindlnd had no result set */ if (tds->rows_affected > 0) { *result_type = CS_CMD_DONE; cmd->results_state = _CS_RES_INIT; return CS_SUCCEED; } break; now it seems with the patch it works correctly. But I have no idea if it is really the correct way. Any ideas? Thanks, Ondrej From larry.dawson at gmail.com Tue Jun 2 16:49:38 2015 From: larry.dawson at gmail.com (Laurence Dawson) Date: Tue, 2 Jun 2015 15:49:38 -0500 Subject: [freetds] Kerberos connection from Ubuntu 15.04 not working (also tried 14.10) Message-ID: I have tried both tsql -S sqlhostname and tsql -S sqlhosthame -U '' -P '' as suggested in a previous similar message on this list. My login is failing with the error below in both cases. I have established a tgt using kinit, but have not 'joined the domain' with this machine. It doesn't seem like that should be necessary, as I'm just trying to connect with my user principal: fakeuser at lpdt430lub:~$ KRB5_TRACE=krb5.log TDSDUMP=tds.log /opt/freetds/bin/tsql -S prod1 -U '' -P '' locale is "en_US.UTF-8" locale charset is "UTF-8" using default charset "UTF-8" Error 20002 (severity 9): Adaptive Server connection failed There was a problem connecting to the server fakeuser at lpdt430lub:~$ klist Ticket cache: FILE:/tmp/krb5cc_1000 Default principal: My.Username at INT.MYCOMPANY.COM Valid starting Expires Service principal 06/02/2015 14:53:56 06/03/2015 00:53:56 krbtgt/ INT.MYCOMPANY.COM at INT.MYCOMPANY.COM renew until 06/03/2015 14:53:52 [Note that I have edited the text above, and the log files to replace my username and company name with fakes - at least for simple text searches] TDS Version info: Compile-time settings (established with the "configure" script) Version: freetds v0.95rc3 freetds.conf directory: /opt/freetds-0.95rc3/etc MS db-lib source compatibility: yes Sybase binary compatibility: no Thread safety: yes iconv library: yes TDS version: 7.2 iODBC: no unixodbc: no SSPI "trusted" logins: no Kerberos: yes OpenSSL: yes GnuTLS: no -------------- next part -------------- A non-text attachment was scrubbed... Name: krb5.log Type: application/octet-stream Size: 1980 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: tds.log Type: application/octet-stream Size: 19179 bytes Desc: not available URL: From rrankins at gothamconsulting.com Tue Jun 2 17:07:34 2015 From: rrankins at gothamconsulting.com (Ray Rankins) Date: Tue, 2 Jun 2015 17:07:34 -0400 Subject: [freetds] Encrypted passwords In-Reply-To: References: <0f1701d0986d$98e6bca0$cab435e0$@gothamconsulting.com> Message-ID: <0a7a01d09d78$26cefc80$746cf580$@gothamconsulting.com> That's what I was afraid of. Unfortunately, the client site I'm at, there's no way I'd be able to do a network capture. Also, if it's not a feature in the latest stable release of FreeTDS, I wouldn't be able to implement it anyway. Guess we'll have to find a way to use the Sybase libraries instead when we need to connect to a Sybase server within the shell and perl scripts. -Ray > -----Original Message----- > From: FreeTDS [mailto:freetds-bounces at lists.ibiblio.org] On Behalf Of > Frediano Ziglio > Sent: Wednesday, May 27, 2015 5:26 PM > To: FreeTDS Development Group > Subject: Re: [freetds] Encrypted passwords > > 2015-05-27 12:09 GMT+01:00 Ray Rankins > : > > Okay, I?ve searched through the list archives and googled all over the place > and I think I already know the answer but wanted to ask here. > > > > > > > > Is there any version of FreeTDS that supports connecting to a Sybase server > that requires passwords to be encrypted when sent over the network? > > > > > > > > I?ve tried adding ?encrypt = require? to the freetds.conf file, but that didn?t > help. > > > > Whenever I try to connect to a Sybase server the requires encrypted > password, it fails to login with error message 1640, ?Adaptive Server requires > encryption of the login password on the network.? > > > > > > > > Looking at the source code for version 0.91 stable release, it looks like this > functionality is not implemented? > > > > > > > > Thanks, > > > > -Ray > > > > > Not supported (and not planned either). Actually I don't even know how > this is implemented at protocol level. Can you provide some network > capture (using some test password of course) ? > > Frediano > _______________________________________________ > FreeTDS mailing list > FreeTDS at lists.ibiblio.org > http://lists.ibiblio.org/mailman/listinfo/freetds From indefinitedrums at gmail.com Tue Jun 2 17:15:58 2015 From: indefinitedrums at gmail.com (Beau Hodges) Date: Tue, 2 Jun 2015 16:15:58 -0500 Subject: [freetds] Encrypted passwords In-Reply-To: <0a7a01d09d78$26cefc80$746cf580$@gothamconsulting.com> References: <0f1701d0986d$98e6bca0$cab435e0$@gothamconsulting.com> <0a7a01d09d78$26cefc80$746cf580$@gothamconsulting.com> Message-ID: <2337441061782534801@unknownmsgid> Ray, In the past I had to use the sybase libs to support a feature not found in freetds(until Frediano put it in :D) If you download the ase dev edition 16, you can use the OpenClient libraries for use with sqsh(for shell scripting). Not sure about perl, but it also works for sybase_ct in php. It may allow you to use encrypted passwords. You're welcome to email me direct if you'd like more info. Sent from my iPhone > On Jun 2, 2015, at 4:07 PM, Ray Rankins wrote: > > That's what I was afraid of. > Unfortunately, the client site I'm at, there's no way I'd be able to do a network capture. > Also, if it's not a feature in the latest stable release of FreeTDS, I wouldn't be able to implement it anyway. > Guess we'll have to find a way to use the Sybase libraries instead when we need to connect to a Sybase server within the shell and perl scripts. > > -Ray > >> -----Original Message----- >> From: FreeTDS [mailto:freetds-bounces at lists.ibiblio.org] On Behalf Of >> Frediano Ziglio >> Sent: Wednesday, May 27, 2015 5:26 PM >> To: FreeTDS Development Group >> Subject: Re: [freetds] Encrypted passwords >> >> 2015-05-27 12:09 GMT+01:00 Ray Rankins >> : >>> Okay, I?ve searched through the list archives and googled all over the place >> and I think I already know the answer but wanted to ask here. >>> >>> >>> >>> Is there any version of FreeTDS that supports connecting to a Sybase server >> that requires passwords to be encrypted when sent over the network? >>> >>> >>> >>> I?ve tried adding ?encrypt = require? to the freetds.conf file, but that didn?t >> help. >>> >>> Whenever I try to connect to a Sybase server the requires encrypted >> password, it fails to login with error message 1640, ?Adaptive Server requires >> encryption of the login password on the network.? >>> >>> >>> >>> Looking at the source code for version 0.91 stable release, it looks like this >> functionality is not implemented? >>> >>> >>> >>> Thanks, >>> >>> -Ray >> >> >> Not supported (and not planned either). Actually I don't even know how >> this is implemented at protocol level. Can you provide some network >> capture (using some test password of course) ? >> >> Frediano >> _______________________________________________ >> FreeTDS mailing list >> FreeTDS at lists.ibiblio.org >> http://lists.ibiblio.org/mailman/listinfo/freetds > > _______________________________________________ > FreeTDS mailing list > FreeTDS at lists.ibiblio.org > http://lists.ibiblio.org/mailman/listinfo/freetds From luisdv at icon.co.za Wed Jun 3 12:06:33 2015 From: luisdv at icon.co.za (luisdv at icon.co.za) Date: Wed, 3 Jun 2015 18:06:33 +0200 Subject: [freetds] Third release candidate for 0.95 In-Reply-To: References: Message-ID: <007201d09e17$43087ad0$c9197070$@icon.co.za> Has anybody compiled the freetds 0.95 RC 3 code as a PHP NTS extension (php_dblib.dll)? If so, can you share it? I'd like to test the RC 3 with PHP. Thanks. -----Original Message----- From: FreeTDS [mailto:freetds-bounces at lists.ibiblio.org] On Behalf Of Frediano Ziglio Sent: 21 May 2015 06:56 To: FreeTDS Development Group Subject: [freetds] Third release candidate for 0.95 Hi, I packaged 0.95rc3 version. It includes: - more fixes for tests under Windows; - some small build problem with not default options; - fix for login with extended characters; - ODBC SQLFreeStmt fix if connection is busy from other statements. Last fix was quite intrusive but was not an easy problem to fix. Thanks Joel for the report. Regards, Frediano _______________________________________________ FreeTDS mailing list FreeTDS at lists.ibiblio.org http://lists.ibiblio.org/mailman/listinfo/freetds From freddy77 at gmail.com Wed Jun 3 18:40:07 2015 From: freddy77 at gmail.com (Frediano Ziglio) Date: Wed, 3 Jun 2015 23:40:07 +0100 Subject: [freetds] Encrypted passwords In-Reply-To: <0a7a01d09d78$26cefc80$746cf580$@gothamconsulting.com> References: <0f1701d0986d$98e6bca0$cab435e0$@gothamconsulting.com> <0a7a01d09d78$26cefc80$746cf580$@gothamconsulting.com> Message-ID: Hi, could you run with strace or similar tool? For strace you would have to add "-s 2000" to increase dump of memory. You could use isql with -X option for this purpose. What database version are you using? Frediano 2015-06-02 22:07 GMT+01:00 Ray Rankins : > That's what I was afraid of. > Unfortunately, the client site I'm at, there's no way I'd be able to do a network capture. > Also, if it's not a feature in the latest stable release of FreeTDS, I wouldn't be able to implement it anyway. > Guess we'll have to find a way to use the Sybase libraries instead when we need to connect to a Sybase server within the shell and perl scripts. > > -Ray > >> -----Original Message----- >> From: FreeTDS [mailto:freetds-bounces at lists.ibiblio.org] On Behalf Of >> Frediano Ziglio >> Sent: Wednesday, May 27, 2015 5:26 PM >> To: FreeTDS Development Group >> Subject: Re: [freetds] Encrypted passwords >> >> 2015-05-27 12:09 GMT+01:00 Ray Rankins >> : >> > Okay, I?ve searched through the list archives and googled all over the place >> and I think I already know the answer but wanted to ask here. >> > >> > >> > >> > Is there any version of FreeTDS that supports connecting to a Sybase server >> that requires passwords to be encrypted when sent over the network? >> > >> > >> > >> > I?ve tried adding ?encrypt = require? to the freetds.conf file, but that didn?t >> help. >> > >> > Whenever I try to connect to a Sybase server the requires encrypted >> password, it fails to login with error message 1640, ?Adaptive Server requires >> encryption of the login password on the network.? >> > >> > >> > >> > Looking at the source code for version 0.91 stable release, it looks like this >> functionality is not implemented? >> > >> > >> > >> > Thanks, >> > >> > -Ray >> > >> >> >> Not supported (and not planned either). Actually I don't even know how >> this is implemented at protocol level. Can you provide some network >> capture (using some test password of course) ? >> >> Frediano >> _______________________________________________ >> FreeTDS mailing list >> FreeTDS at lists.ibiblio.org >> http://lists.ibiblio.org/mailman/listinfo/freetds > > _______________________________________________ > FreeTDS mailing list > FreeTDS at lists.ibiblio.org > http://lists.ibiblio.org/mailman/listinfo/freetds From freddy77 at gmail.com Mon Jun 8 14:24:21 2015 From: freddy77 at gmail.com (Frediano Ziglio) Date: Mon, 8 Jun 2015 19:24:21 +0100 Subject: [freetds] FreeTDS version 0.95 just released. Message-ID: Finally, after years of improvements and fixes we got a new version Summary of Changes in release 0.95 -------------------------------------------- User visible (not in a particular order): - Support for build with CMake under Windows. - Support MSSQL 2008: - new date/time types; - NBCROWs; - able to retrieve CLR UDT types in binary format. - Moved from CVS to git. - Support MARS under ODBC. - IPv6 support. - Support unsigned Sybase types. - Sybase use some characters conversion like MSSQL. - Bulk-copy improvements: - more types; - support for empty fields; - no needs for seekable file; - avoid possible buffer overflows; - less memory consumption; - handle different BIT fields in Sybase; - -T option for datacopy. - datacopy: - prompting for password (use "-" password on command line); - empty user/password (to use Kerberos). - Support for query notifications in ODBC. - Support for protocols 7.2 and 7.3 under dblib and ctlib. - dblib: - dbpivot extension; - dbprcollen extension to get printable column size; - add DBCOL2 structure for dbtablecolinfo; - support DBTEXTSIZE option for dbsetopt; - support SRCNUMERICBIND and SRCDECIMALBIND binding; - DATETIME2BIND extension binding to support new mssql 2008 type; - ODBC: - add SQL_INFO_FREETDS_TDS_VERSION option to SQLGetInfo to retrieve FreeTDS version; - add --enable-odbc-wide-tests configure option to use wide functions in unit tests. - Better thread support. - Allow to specify server SPN for GSSAPI. - Sybase graceful disconnects. - Better support for VARCHAR(MAX)/VARBINARY(MAX). - Better error reporting from login failure. - More strict test for configuration errors, fails if configuration is wrong. - "use utf-16" option to enable use of UTF-16 for server encoding (MSSQL). - Remove support for Dev-C++. - Remove support for bad iconv, use libiconv instead (Tru64 and HP-UX should be affected), connect will fail. - New NTLM options: - "use lanman"; - "use ntlmv2". - New Kerberos options: - "realm" ("REALM" in ODBC); - "spn" ("ServerSPN" in ODBC). - New certificate options: - "ca file"; - "crl file"; - "check certificate hostname". - Many bug fixes, majors: - SSPI with Kerberos on some setup; - SQLCancel threading; - ctlib numeric; - ODBC statistic function quotings. People taking part in this effort --------------------------------- - Alexandros Giouzenis - Ben Slade - datacopy password prompt - Christos Zoulas - improve defncopy and fisql - server maintainer - some build fixes - Constantin Vasilyev - Craig A. Berry - BCP improvements - VMS support - Daniel Fazekas - some fixes for dblib - Ed Avis - Frediano Ziglio - ... lot of stuff ... - ... really! ... - Fredy Paquet - Ian Lister - James K. Lowden - documentation update - Makefiles improvements - dbpivot - improve error reporting - ... lot of stuff ... - Jason Yanowitz - Jun Kang Chin - UTF-16 encoding from server ("use utf-16") - Justin T Pryzby - Ken Collins - Kerberos SSPI fix - Ladislav Karrach - help fixing a problem with transaction with newer protocol - Visual Studio support updates - add DATETIME2BIND support in dblib and other new types improvements - Marc Abramowitz - improved logging and error reporting - Travis continue integration - documentation updates - Martin Wilck - fix for ctlib cursors - Matt Lilley - fix MARS problem - Matthew Green - improved datacopy - Mikhail Denisenko - NBCROW support - Mikhail Teterin - Peter Deacon - IPv6 support - Pietro Cerutti - Ramiro Morales - pymssql support - fix some bugs with dblib RPC - many build fixes - Richard Hughes - query notification in ODBC - Samuel Ferencik - help fixing NTLM problem with small buffers - improved ctlib - Sebastien Flaesch - Shiva Ramabadran - Steve Langasek - fix some compatibility and bugs - Tony Esposito - DYNPROC fix for Sybase - Willi Langenberger Frediano From cramm0 at gmail.com Mon Jun 8 15:27:30 2015 From: cramm0 at gmail.com (Ramiro Morales) Date: Mon, 8 Jun 2015 16:27:30 -0300 Subject: [freetds] FreeTDS version 0.95 just released. In-Reply-To: References: Message-ID: On Mon, Jun 8, 2015 at 3:24 PM, Frediano Ziglio wrote: > Finally, after years of improvements and fixes we got a new version These are great news! Thank you Frediano and all contributors to FreeTDS which make every release better and better. Wam regards, -- Ramiro Morales @ramiromorales From lacak at zoznam.sk Tue Jun 9 01:36:44 2015 From: lacak at zoznam.sk (LacaK) Date: Tue, 09 Jun 2015 07:36:44 +0200 Subject: [freetds] FreeTDS version 0.95 just released. In-Reply-To: References: Message-ID: <55767B6C.4010504@zoznam.sk> Thanks! -Laco. > Finally, after years of improvements and fixes we got a new version > > > > > Frediano > _______________________________________________ > FreeTDS mailing list > FreeTDS at lists.ibiblio.org > http://lists.ibiblio.org/mailman/listinfo/freetds > From matthew.green at datamartcomputing.com Tue Jun 9 02:55:52 2015 From: matthew.green at datamartcomputing.com (matthew.green at datamartcomputing.com) Date: Tue, 09 Jun 2015 06:55:52 +0000 Subject: [freetds] FreeTDS version 0.95 just released. In-Reply-To: <55767B6C.4010504@zoznam.sk> References: <55767B6C.4010504@zoznam.sk> Message-ID: <17e355956f6fe0df50025c21a873bd5f@datamartcomputing.com> Congratulations, I look forward to using the new release! Matthew. June 9 2015 7:45 AM, "LacaK" wrote: > Thanks! > -Laco. > >> Finally, after years of improvements and fixes we got a new version >> >> Frediano >> _______________________________________________ >> FreeTDS mailing list >> FreeTDS at lists.ibiblio.org >> http://lists.ibiblio.org/mailman/listinfo/freetds > > _______________________________________________ > FreeTDS mailing list > FreeTDS at lists.ibiblio.org > http://lists.ibiblio.org/mailman/listinfo/freetds From fredy at opag.ch Tue Jun 9 04:10:48 2015 From: fredy at opag.ch (Fredy Paquet) Date: Tue, 09 Jun 2015 10:10:48 +0200 Subject: [freetds] FreeTDS version 0.95 just released. In-Reply-To: References: Message-ID: <1433837448.4216.3.camel@montesa> Hello Frediano This is great news! Many thanks for your continous effort in FreeTDS. -- Fredy Paquet Mitglied der Gesch?ftsleitung OPAG Informatik AG Fabrikmattenweg 11 CH-4144 Arlesheim http://www.opag.ch Tel. ++41 61 716 92 22 Fax. ++41 61 716 92 29 On Mon, 2015-06-08 at 19:24 +0100, Frediano Ziglio wrote: > Finally, after years of improvements and fixes we got a new version > > Summary of Changes in release 0.95 > -------------------------------------------- > User visible (not in a particular order): > - Support for build with CMake under Windows. > - Support MSSQL 2008: > - new date/time types; > - NBCROWs; > - able to retrieve CLR UDT types in binary format. > - Moved from CVS to git. > - Support MARS under ODBC. > - IPv6 support. > - Support unsigned Sybase types. > - Sybase use some characters conversion like MSSQL. > - Bulk-copy improvements: > - more types; > - support for empty fields; > - no needs for seekable file; > - avoid possible buffer overflows; > - less memory consumption; > - handle different BIT fields in Sybase; > - -T option for datacopy. > - datacopy: > - prompting for password (use "-" password on command line); > - empty user/password (to use Kerberos). > - Support for query notifications in ODBC. > - Support for protocols 7.2 and 7.3 under dblib and ctlib. > - dblib: > - dbpivot extension; > - dbprcollen extension to get printable column size; > - add DBCOL2 structure for dbtablecolinfo; > - support DBTEXTSIZE option for dbsetopt; > - support SRCNUMERICBIND and SRCDECIMALBIND binding; > - DATETIME2BIND extension binding to support new mssql 2008 type; > - ODBC: > - add SQL_INFO_FREETDS_TDS_VERSION option to SQLGetInfo to retrieve FreeTDS > version; > - add --enable-odbc-wide-tests configure option to use wide functions in > unit tests. > - Better thread support. > - Allow to specify server SPN for GSSAPI. > - Sybase graceful disconnects. > - Better support for VARCHAR(MAX)/VARBINARY(MAX). > - Better error reporting from login failure. > - More strict test for configuration errors, fails if configuration is wrong. > - "use utf-16" option to enable use of UTF-16 for server encoding (MSSQL). > - Remove support for Dev-C++. > - Remove support for bad iconv, use libiconv instead (Tru64 and HP-UX should > be affected), connect will fail. > - New NTLM options: > - "use lanman"; > - "use ntlmv2". > - New Kerberos options: > - "realm" ("REALM" in ODBC); > - "spn" ("ServerSPN" in ODBC). > - New certificate options: > - "ca file"; > - "crl file"; > - "check certificate hostname". > - Many bug fixes, majors: > - SSPI with Kerberos on some setup; > - SQLCancel threading; > - ctlib numeric; > - ODBC statistic function quotings. > > People taking part in this effort > --------------------------------- > - Alexandros Giouzenis > - Ben Slade > - datacopy password prompt > - Christos Zoulas > - improve defncopy and fisql > - server maintainer > - some build fixes > - Constantin Vasilyev > - Craig A. Berry > - BCP improvements > - VMS support > - Daniel Fazekas > - some fixes for dblib > - Ed Avis > - Frediano Ziglio > - ... lot of stuff ... > - ... really! ... > - Fredy Paquet > - Ian Lister > - James K. Lowden > - documentation update > - Makefiles improvements > - dbpivot > - improve error reporting > - ... lot of stuff ... > - Jason Yanowitz > - Jun Kang Chin > - UTF-16 encoding from server ("use utf-16") > - Justin T Pryzby > - Ken Collins > - Kerberos SSPI fix > - Ladislav Karrach > - help fixing a problem with transaction with newer protocol > - Visual Studio support updates > - add DATETIME2BIND support in dblib and other new types improvements > - Marc Abramowitz > - improved logging and error reporting > - Travis continue integration > - documentation updates > - Martin Wilck > - fix for ctlib cursors > - Matt Lilley > - fix MARS problem > - Matthew Green > - improved datacopy > - Mikhail Denisenko > - NBCROW support > - Mikhail Teterin > - Peter Deacon > - IPv6 support > - Pietro Cerutti > - Ramiro Morales > - pymssql support > - fix some bugs with dblib RPC > - many build fixes > - Richard Hughes > - query notification in ODBC > - Samuel Ferencik > - help fixing NTLM problem with small buffers > - improved ctlib > - Sebastien Flaesch > - Shiva Ramabadran > - Steve Langasek > - fix some compatibility and bugs > - Tony Esposito > - DYNPROC fix for Sybase > - Willi Langenberger > > > Frediano > _______________________________________________ > FreeTDS mailing list > FreeTDS at lists.ibiblio.org > http://lists.ibiblio.org/mailman/listinfo/freetds -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3866 bytes Desc: not available URL: From Lastovica at sciinc.com Tue Jun 9 07:50:47 2015 From: Lastovica at sciinc.com (Norm Lastovica) Date: Tue, 9 Jun 2015 07:50:47 -0400 Subject: [freetds] FreeTDS version 0.95 just released. In-Reply-To: References: Message-ID: Thank you so much for this update... Has anyone completed a build on OpenVMS? I put my toe in the water yesterday and am getting my fair share of compiler warnings. Before I spend any additional time I wanted to validate that it is known to work. Thanks! Norm -----Original Message----- From: FreeTDS [mailto:freetds-bounces at lists.ibiblio.org] On Behalf Of Frediano Ziglio Sent: Monday, June 08, 2015 12:24 To: FreeTDS Development Group Subject: [freetds] FreeTDS version 0.95 just released. Finally, after years of improvements and fixes we got a new version Summary of Changes in release 0.95 -------------------------------------------- User visible (not in a particular order): - Support for build with CMake under Windows. - Support MSSQL 2008: - new date/time types; - NBCROWs; - able to retrieve CLR UDT types in binary format. - Moved from CVS to git. - Support MARS under ODBC. - IPv6 support. - Support unsigned Sybase types. - Sybase use some characters conversion like MSSQL. - Bulk-copy improvements: - more types; - support for empty fields; - no needs for seekable file; - avoid possible buffer overflows; - less memory consumption; - handle different BIT fields in Sybase; - -T option for datacopy. - datacopy: - prompting for password (use "-" password on command line); - empty user/password (to use Kerberos). - Support for query notifications in ODBC. - Support for protocols 7.2 and 7.3 under dblib and ctlib. - dblib: - dbpivot extension; - dbprcollen extension to get printable column size; - add DBCOL2 structure for dbtablecolinfo; - support DBTEXTSIZE option for dbsetopt; - support SRCNUMERICBIND and SRCDECIMALBIND binding; - DATETIME2BIND extension binding to support new mssql 2008 type; - ODBC: - add SQL_INFO_FREETDS_TDS_VERSION option to SQLGetInfo to retrieve FreeTDS version; - add --enable-odbc-wide-tests configure option to use wide functions in unit tests. - Better thread support. - Allow to specify server SPN for GSSAPI. - Sybase graceful disconnects. - Better support for VARCHAR(MAX)/VARBINARY(MAX). - Better error reporting from login failure. - More strict test for configuration errors, fails if configuration is wrong. - "use utf-16" option to enable use of UTF-16 for server encoding (MSSQL). - Remove support for Dev-C++. - Remove support for bad iconv, use libiconv instead (Tru64 and HP-UX should be affected), connect will fail. - New NTLM options: - "use lanman"; - "use ntlmv2". - New Kerberos options: - "realm" ("REALM" in ODBC); - "spn" ("ServerSPN" in ODBC). - New certificate options: - "ca file"; - "crl file"; - "check certificate hostname". - Many bug fixes, majors: - SSPI with Kerberos on some setup; - SQLCancel threading; - ctlib numeric; - ODBC statistic function quotings. People taking part in this effort --------------------------------- - Alexandros Giouzenis - Ben Slade - datacopy password prompt - Christos Zoulas - improve defncopy and fisql - server maintainer - some build fixes - Constantin Vasilyev - Craig A. Berry - BCP improvements - VMS support - Daniel Fazekas - some fixes for dblib - Ed Avis - Frediano Ziglio - ... lot of stuff ... - ... really! ... - Fredy Paquet - Ian Lister - James K. Lowden - documentation update - Makefiles improvements - dbpivot - improve error reporting - ... lot of stuff ... - Jason Yanowitz - Jun Kang Chin - UTF-16 encoding from server ("use utf-16") - Justin T Pryzby - Ken Collins - Kerberos SSPI fix - Ladislav Karrach - help fixing a problem with transaction with newer protocol - Visual Studio support updates - add DATETIME2BIND support in dblib and other new types improvements - Marc Abramowitz - improved logging and error reporting - Travis continue integration - documentation updates - Martin Wilck - fix for ctlib cursors - Matt Lilley - fix MARS problem - Matthew Green - improved datacopy - Mikhail Denisenko - NBCROW support - Mikhail Teterin - Peter Deacon - IPv6 support - Pietro Cerutti - Ramiro Morales - pymssql support - fix some bugs with dblib RPC - many build fixes - Richard Hughes - query notification in ODBC - Samuel Ferencik - help fixing NTLM problem with small buffers - improved ctlib - Sebastien Flaesch - Shiva Ramabadran - Steve Langasek - fix some compatibility and bugs - Tony Esposito - DYNPROC fix for Sybase - Willi Langenberger From craigberry at mac.com Tue Jun 9 08:22:48 2015 From: craigberry at mac.com (Craig A. Berry) Date: Tue, 09 Jun 2015 07:22:48 -0500 Subject: [freetds] FreeTDS version 0.95 just released. In-Reply-To: References: Message-ID: <5804A7CF-172B-4062-8F66-9E132962FF30@mac.com> > On Jun 9, 2015, at 6:50 AM, Norm Lastovica wrote: > > Thank you so much for this update... > > Has anyone completed a build on OpenVMS? I put my toe in the water yesterday and am getting my fair share of compiler warnings. Before I spend any additional time I wanted to validate that it is known to work. There were quite a few informationals about extraneous semicolons but I don?t recall anything too serious. Yes, it would be nice to get those resolved in a way that doesn?t break something elsewhere, but it hasn?t been a priority. In any case it seems to build and pass the test suite just fine. To run the test suite you?ll want to be on an ODS-5 disk, use extended parse and set DECC$EFS_CHARSET in the environment. Yes, I should document that somewhere. I also haven?t built the ODBC driver in awhile, so the state of that is unknown. There are other areas of incompleteness. For example, we should be able to make use of the new kerberos or OpenSSL support, but I just haven?t gotten around to updating the VMS-specific configuration. Give a shout if you run into trouble. ________________________________________ Craig A. Berry mailto:craigberry at mac.com "... getting out of a sonnet is much more difficult than getting in." Brad Leithauser From ondrej.holecek at qoretechnologies.com Tue Jun 9 09:48:48 2015 From: ondrej.holecek at qoretechnologies.com (Ondrej Holecek) Date: Tue, 9 Jun 2015 15:48:48 +0200 Subject: [freetds] affected rows after insert In-Reply-To: References: Message-ID: Hi, I made a test with the same code but sybase lib and it works like expected. It seems there is a bug in FreeTDS. Could you please check my patch? thx, Ondrej On Tue, Jun 2, 2015 at 10:49 AM, Ondrej Holecek wrote: > Hi, > > I have a problem obtaining number of affected rows while inserting. > The problem occurs when I pass the values by ct_param() call. > So, this command order works well: > > ct_cmd_alloc() > ct_command(CS_LANG_CMD, "INSERT INTO test (number) VALUES(5)") > ct_send() > ct_result() // the result type is CS_CMD_DONE so I can call... > ct_res_info(CS_ROW_COUNT) // as expected 1 row affected > > > but when I call it like this, It skips CS_CMD_DONE, so I can't read > the affected rows number. > > ct_cmd_alloc() > ct_command(CS_LANG_CMD, "INSERT INTO test (number) VALUES(@par1)") > ct_param("@par1", 1) > ct_send() > ct_result() // the result type is CS_END_RESULT > // can't do anything here :-( > > > The row is inserted in both cases correctly just in the second case I > can't read the number of affected rows. > > I did some ctlib debugging and I created the patch which would fix > this behavior. However, I just changed the code blindly (based on the > debugging) not knowing what is the real purpose of the case. > > > in ct_result() function I changed the case _CS_RES_INIT: > > case _CS_RES_INIT: /* commalindlnd had no result set */ > if (tds->rows_affected > 0) { > *result_type = CS_CMD_DONE; > cmd->results_state = _CS_RES_INIT; > return CS_SUCCEED; > } > break; > > now it seems with the patch it works correctly. But I have no idea if > it is really the correct way. > > Any ideas? > > Thanks, > > Ondrej From jorge at jorgechamorro.com Tue Jun 9 17:39:40 2015 From: jorge at jorgechamorro.com (Jorge) Date: Tue, 9 Jun 2015 23:39:40 +0200 Subject: [freetds] FreeTDS version 0.95 just released. In-Reply-To: References: Message-ID: On 08/06/2015, at 21:27, Ramiro Morales wrote: > On Mon, Jun 8, 2015 at 3:24 PM, Frediano Ziglio wrote: >> Finally, after years of improvements and fixes we got a new version > > These are great news! Thank you Frediano and all contributors to > FreeTDS which make every release better and better. +1 A BIG thank you to you all. Saludos, -- ( Jorge )(); From TRoyko at sscorp.com Tue Jun 9 17:43:13 2015 From: TRoyko at sscorp.com (Thomas Royko) Date: Tue, 9 Jun 2015 21:43:13 +0000 Subject: [freetds] New to FreeTDS - Having issues with binaries built on Windows for PHP 5.6 Message-ID: I don't know if my earlier message got sent properly, so I'm sending it again. ------------------------------------------------------------------------------------------------ I work for a company that has a large established PHP codebase, we intend to migrate it to PHP version 5.6 and run it under IIS. So far I've followed the directions laid out in: http://www.freetds.org/userguide/osissues.htm https://moodle.org/mod/forum/discuss.php?d=232844#p1012743 I am using VC11. I've built FreeTDS and built the corresponding php_dblib.dll, but when I try to connect with PHP, I get unable to connect errors in my php. I'm using the same config file I have been using with earlier prebuilt versions of FreeTDS (which worked under PHP 5.4). On a side note I didn't run configure before building freetds because as far as I know there's no way to do it without something like mysys. And if you have mysys it sets up everything to point to the gcc, making nmake fail on build. PS. I know this email is scant on information. But any help would be greatly appreciated. -Thomas R. From randy at thesyrings.us Wed Jun 10 10:19:39 2015 From: randy at thesyrings.us (Randy Syring) Date: Wed, 10 Jun 2015 10:19:39 -0400 Subject: [freetds] New to FreeTDS - Having issues with binaries built on Windows for PHP 5.6 In-Reply-To: References: Message-ID: <5578477B.3040801@thesyrings.us> The exact error message you are receiving might be helpful. You can also try using the debugging environment variables described here: http://www.freetds.org/userguide/logging.htm to get more information from FreeTDS. *Randy Syring* Husband | Father | Redeemed Sinner /"For what does it profit a man to gain the whole world and forfeit his soul?" (Mark 8:36 ESV)/ On 06/09/2015 05:43 PM, Thomas Royko wrote: > I don't know if my earlier message got sent properly, so I'm sending it again. > > ------------------------------------------------------------------------------------------------ > > I work for a company that has a large established PHP codebase, we intend to migrate it to PHP version 5.6 and run it under IIS. > > So far I've followed the directions laid out in: > > http://www.freetds.org/userguide/osissues.htm > https://moodle.org/mod/forum/discuss.php?d=232844#p1012743 > > I am using VC11. > > I've built FreeTDS and built the corresponding php_dblib.dll, but when I try to connect with PHP, I get unable to connect errors in my php. > I'm using the same config file I have been using with earlier prebuilt versions of FreeTDS (which worked under PHP 5.4). > > On a side note I didn't run configure before building freetds because as far as I know there's no way to do it without something like mysys. And if you have mysys it sets up everything to point to the gcc, making nmake fail on build. > > PS. I know this email is scant on information. But any help would be greatly appreciated. > > -Thomas R. > _______________________________________________ > FreeTDS mailing list > FreeTDS at lists.ibiblio.org > http://lists.ibiblio.org/mailman/listinfo/freetds > From shawjef3 at gmail.com Wed Jun 10 10:27:13 2015 From: shawjef3 at gmail.com (Jeffrey Shaw) Date: Wed, 10 Jun 2015 10:27:13 -0400 Subject: [freetds] empty strings select as null bug Message-ID: When I reported this dblib bug to this list before I got it backwards. I said NULL strings were being selected as empty strings, but it's the other way around. When I use TDS Version >= 7.0, empty strings are selected as NULL. When I use TDS Version = 4.2, empty strings are empty. I have a table in SQL Server 2008 R2 that is (int, varchar(max)). I insert one row with an empty string. Selecting it from management studio gives this: select id, case when string is null then 1 else 0 end AS [is null] from dbo.strings id is null 1 0 I can use PostgreSQL's tds_fdw to use dblib to select from SQL Server. The query is select id, string is null from distribution.dbo_strings; TDS Version = 4.2 id | ?column? ----+---------- 1 | f TDS Version = 7.0 id | ?column? ----+---------- 1 | t From geoff.montee at gmail.com Wed Jun 10 18:37:59 2015 From: geoff.montee at gmail.com (Geoff Montee) Date: Wed, 10 Jun 2015 15:37:59 -0700 Subject: [freetds] empty strings select as null bug In-Reply-To: References: Message-ID: On Wed, Jun 10, 2015 at 7:27 AM, Jeffrey Shaw wrote: > > I can use PostgreSQL's tds_fdw to use dblib to select from SQL Server. The > query is > > select id, string is null from distribution.dbo_strings; > > TDS Version = 4.2 > id | ?column? > ----+---------- > 1 | f > > TDS Version = 7.0 > id | ?column? > ----+---------- > 1 | t As the developer of tds_fdw, I should probably point out to the FreeTDS developers where my null test code is in case this is a bug on my end. tds_fdw assumes a column is NULL if dbdatlen() returns 0: https://github.com/GeoffMontee/tds_fdw/blob/fd4696695149b0be143e11b70df14b42acdd899d/src/tds_fdw.c#L1816 http://www.freetds.org/reference/a00341.html#gae666d141533126babb0235af21bdca0f I implemented it this way because I assumed dbdatlen() should be equal to 1 for a null terminator character if a string is empty. Let me know if this is a bad null test. Could this behavior be related to iconv or character set conversions in TDS 7.0 and higher? Thanks, Geoff From james.k.lowden at icloud.com Wed Jun 10 22:07:13 2015 From: james.k.lowden at icloud.com (James K. Lowden) Date: Wed, 10 Jun 2015 22:07:13 -0400 Subject: [freetds] empty strings select as null bug In-Reply-To: References: Message-ID: <20150610220713.46f0cf86.james.k.lowden@icloud.com> On Wed, 10 Jun 2015 15:37:59 -0700 Geoff Montee wrote: > tds_fdw assumes a column is NULL if dbdatlen() returns 0: > > https://github.com/GeoffMontee/tds_fdw/blob/fd4696695149b0be143e11b70df14b42acdd899d/src/tds_fdw.c#L1816 > > http://www.freetds.org/reference/a00341.html#gae666d141533126babb0235af21bdca0f > > I implemented it this way because I assumed dbdatlen() should be equal > to 1 for a null terminator character if a string is empty. Let me know > if this is a bad null test. Using dbdatlen, you cannot distinguish between a zero-length string and NULL. In some versions of TDS, there is no difference between the two: at the protocol level, a NULL CHAR column was indicated by having a length of zero. Later versions indicated NULL explicitly. That opened the possibilty of a non-NULL CHAR field having no data, a very strange situtation indeed. IIRC NULL can be more accurately detected with dbnullbind. HTH. --jkl From geoff.montee at gmail.com Wed Jun 10 23:46:26 2015 From: geoff.montee at gmail.com (Geoff Montee) Date: Wed, 10 Jun 2015 20:46:26 -0700 Subject: [freetds] empty strings select as null bug In-Reply-To: <20150610220713.46f0cf86.james.k.lowden@icloud.com> References: <20150610220713.46f0cf86.james.k.lowden@icloud.com> Message-ID: On Wed, Jun 10, 2015 at 7:07 PM, James K. Lowden wrote: > > Using dbdatlen, you cannot distinguish between a zero-length string and > NULL. In some versions of TDS, there is no difference between the > two: at the protocol level, a NULL CHAR column was indicated by having > a length of zero. Later versions indicated NULL explicitly. That > opened the possibilty of a non-NULL CHAR field having no data, a very > strange situtation indeed. > > IIRC NULL can be more accurately detected with dbnullbind. > If this true, then it sounds like Jeff's bug is in my code. I think I can work with dbnullbind. Thanks, James! Geoff From lacak at zoznam.sk Thu Jun 11 01:39:04 2015 From: lacak at zoznam.sk (LacaK) Date: Thu, 11 Jun 2015 07:39:04 +0200 Subject: [freetds] empty strings select as null bug In-Reply-To: References: Message-ID: <55791EF8.6040803@zoznam.sk> > > tds_fdw assumes a column is NULL if dbdatlen() returns 0: I am using for testing NULL dbdata(), which should return nil for NULL data. (In my case I know, that column exists) From Sybase documentation: "A NULL BYTE pointer is returned if there is no such column or if the data has a null value. To make sure that the data is really a null value, you should always check for a return of 0 from *dbdatlen*." From Microsoft documentation: "A NULL BYTE pointer is returned if there is no such column or if the data has a null value. To make sure that the data is really a null value, check for a return of 0 from *dbdatlen*." So you can use: dbdata()==nil && dbdatlen()==0 -Laco. From geoff.montee at gmail.com Thu Jun 11 03:17:30 2015 From: geoff.montee at gmail.com (Geoff Montee) Date: Thu, 11 Jun 2015 00:17:30 -0700 Subject: [freetds] empty strings select as null bug In-Reply-To: <55791EF8.6040803@zoznam.sk> References: <55791EF8.6040803@zoznam.sk> Message-ID: On Wed, Jun 10, 2015 at 10:39 PM, LacaK wrote: > > I am using for testing NULL dbdata(), which should return nil for NULL data. > (In my case I know, that column exists) > > From Sybase documentation: > "A NULL BYTE pointer is returned if there is no such column or if the data > has a null value. To make sure that the data is really a null value, you > should always check for a return of 0 from *dbdatlen*." > > From Microsoft documentation: > "A NULL BYTE pointer is returned if there is no such column or if the data > has a null value. To make sure that the data is really a null value, check > for a return of 0 from *dbdatlen*." > > So you can use: dbdata()==nil && dbdatlen()==0 > I decided to go with your test: https://github.com/GeoffMontee/tds_fdw/blob/b5f678cded099f9231473c520cf1dbe8363a470a/src/tds_fdw.c#L1855 I think Jeff's bug is fixed. It's really good to know that dbdatlen() can return 0 in the case of an empty string. Thanks for your help, everyone! Geoff From shawjef3 at gmail.com Thu Jun 11 08:32:06 2015 From: shawjef3 at gmail.com (Jeffrey Shaw) Date: Thu, 11 Jun 2015 08:32:06 -0400 Subject: [freetds] empty strings select as null bug In-Reply-To: References: <55791EF8.6040803@zoznam.sk> Message-ID: That was some great teamwork. Thanks for the fix, everyone! On Thu, Jun 11, 2015 at 3:17 AM, Geoff Montee wrote: > On Wed, Jun 10, 2015 at 10:39 PM, LacaK wrote: > > > > I am using for testing NULL dbdata(), which should return nil for NULL > data. > > (In my case I know, that column exists) > > > > From Sybase documentation: > > "A NULL BYTE pointer is returned if there is no such column or if the > data > > has a null value. To make sure that the data is really a null value, you > > should always check for a return of 0 from *dbdatlen*." > > > > From Microsoft documentation: > > "A NULL BYTE pointer is returned if there is no such column or if the > data > > has a null value. To make sure that the data is really a null value, > check > > for a return of 0 from *dbdatlen*." > > > > So you can use: dbdata()==nil && dbdatlen()==0 > > > > I decided to go with your test: > > > https://github.com/GeoffMontee/tds_fdw/blob/b5f678cded099f9231473c520cf1dbe8363a470a/src/tds_fdw.c#L1855 > > I think Jeff's bug is fixed. > > It's really good to know that dbdatlen() can return 0 in the case of > an empty string. > > Thanks for your help, everyone! > > Geoff > _______________________________________________ > FreeTDS mailing list > FreeTDS at lists.ibiblio.org > http://lists.ibiblio.org/mailman/listinfo/freetds > From shawjef3 at gmail.com Thu Jun 11 10:11:02 2015 From: shawjef3 at gmail.com (Jeffrey Shaw) Date: Thu, 11 Jun 2015 10:11:02 -0400 Subject: [freetds] empty strings select as null bug In-Reply-To: References: <55791EF8.6040803@zoznam.sk> Message-ID: Hi Geoff, Confirmed! My test for the bug now passes. Jeff On Thu, Jun 11, 2015 at 3:17 AM, Geoff Montee wrote: > On Wed, Jun 10, 2015 at 10:39 PM, LacaK wrote: > > > > I am using for testing NULL dbdata(), which should return nil for NULL > data. > > (In my case I know, that column exists) > > > > From Sybase documentation: > > "A NULL BYTE pointer is returned if there is no such column or if the > data > > has a null value. To make sure that the data is really a null value, you > > should always check for a return of 0 from *dbdatlen*." > > > > From Microsoft documentation: > > "A NULL BYTE pointer is returned if there is no such column or if the > data > > has a null value. To make sure that the data is really a null value, > check > > for a return of 0 from *dbdatlen*." > > > > So you can use: dbdata()==nil && dbdatlen()==0 > > > > I decided to go with your test: > > > https://github.com/GeoffMontee/tds_fdw/blob/b5f678cded099f9231473c520cf1dbe8363a470a/src/tds_fdw.c#L1855 > > I think Jeff's bug is fixed. > > It's really good to know that dbdatlen() can return 0 in the case of > an empty string. > > Thanks for your help, everyone! > > Geoff > _______________________________________________ > FreeTDS mailing list > FreeTDS at lists.ibiblio.org > http://lists.ibiblio.org/mailman/listinfo/freetds > From cramm0 at gmail.com Thu Jun 11 10:16:45 2015 From: cramm0 at gmail.com (Ramiro Morales) Date: Thu, 11 Jun 2015 11:16:45 -0300 Subject: [freetds] dblib test t002 hanging when run against SQL Server 2008r2 SP2 ? Message-ID: Hi all, I'm seeing the above metioned unittest test case fail when run on AppVeyor (Windows) after being built with Visual Studio 2008 or 2010: https://ci.appveyor.com/project/ramiro/freetds/build/173/job/wqtmx2dcm6mcjnj4#L5884 I've tried rebasing/grafting the three commits needed to get AppVeyor build working on/to different points of the master branch going back up to a month ago to find the 'culprit' commit to no avail. All of them fail in the same point: Execution stalls indefinitely when reading row 47. It's also happening for FreeTDS 0.95. This is strange because I remeber seeing the test suite complete successfully at some point recently. Is anyone else seeing something similar? I'm asking this here and now because I won't be able to test this on local systems for a few days. Regards, -- Ramiro Morales @ramiromorales From freddy77 at gmail.com Thu Jun 11 17:03:00 2015 From: freddy77 at gmail.com (Frediano Ziglio) Date: Thu, 11 Jun 2015 22:03:00 +0100 Subject: [freetds] dblib test t002 hanging when run against SQL Server 2008r2 SP2 ? In-Reply-To: References: Message-ID: 2015-06-11 15:16 GMT+01:00 Ramiro Morales : > Hi all, > > I'm seeing the above metioned unittest test case fail when run on > AppVeyor (Windows) after being built with Visual Studio 2008 or 2010: > > https://ci.appveyor.com/project/ramiro/freetds/build/173/job/wqtmx2dcm6mcjnj4#L5884 > > I've tried rebasing/grafting the three commits needed to get AppVeyor > build working on/to different points of the master branch going back > up to a month ago to find the 'culprit' commit to no avail. All of > them fail in the same point: Execution stalls indefinitely when > reading row 47. > > It's also happening for FreeTDS 0.95. > > This is strange because I remeber seeing the test suite complete > successfully at some point recently. > > Is anyone else seeing something similar? I'm asking this here and now > because I won't be able to test this on local systems for a few days. > > Regards, > No ideas, I would add a putenv("TDSDUMP=stdout"); line to test and see the output from AppVeyor Frediano From freddy77 at gmail.com Thu Jun 11 17:28:45 2015 From: freddy77 at gmail.com (Frediano Ziglio) Date: Thu, 11 Jun 2015 22:28:45 +0100 Subject: [freetds] affected rows after insert In-Reply-To: References: Message-ID: 2015-06-09 14:48 GMT+01:00 Ondrej Holecek : > Hi, > > I made a test with the same code but sybase lib and it works like > expected. It seems there is a bug in FreeTDS. Could you please check > my patch? > > thx, > > Ondrej > Actually works and ctlib tests seems to pass. However DONEINPROC is returned in a lot of cases, for instance if database execute some trigger on the table so your patch can catch some strange results too. Which database version are you using? Frediano > On Tue, Jun 2, 2015 at 10:49 AM, Ondrej Holecek > wrote: >> Hi, >> >> I have a problem obtaining number of affected rows while inserting. >> The problem occurs when I pass the values by ct_param() call. >> So, this command order works well: >> >> ct_cmd_alloc() >> ct_command(CS_LANG_CMD, "INSERT INTO test (number) VALUES(5)") >> ct_send() >> ct_result() // the result type is CS_CMD_DONE so I can call... >> ct_res_info(CS_ROW_COUNT) // as expected 1 row affected >> >> >> but when I call it like this, It skips CS_CMD_DONE, so I can't read >> the affected rows number. >> >> ct_cmd_alloc() >> ct_command(CS_LANG_CMD, "INSERT INTO test (number) VALUES(@par1)") >> ct_param("@par1", 1) >> ct_send() >> ct_result() // the result type is CS_END_RESULT >> // can't do anything here :-( >> >> >> The row is inserted in both cases correctly just in the second case I >> can't read the number of affected rows. >> >> I did some ctlib debugging and I created the patch which would fix >> this behavior. However, I just changed the code blindly (based on the >> debugging) not knowing what is the real purpose of the case. >> >> >> in ct_result() function I changed the case _CS_RES_INIT: >> >> case _CS_RES_INIT: /* commalindlnd had no result set */ >> if (tds->rows_affected > 0) { >> *result_type = CS_CMD_DONE; >> cmd->results_state = _CS_RES_INIT; >> return CS_SUCCEED; >> } >> break; >> >> now it seems with the patch it works correctly. But I have no idea if >> it is really the correct way. >> >> Any ideas? >> >> Thanks, >> >> Ondrej From cramm0 at gmail.com Fri Jun 12 08:06:59 2015 From: cramm0 at gmail.com (Ramiro Morales) Date: Fri, 12 Jun 2015 09:06:59 -0300 Subject: [freetds] dblib test t002 hanging when run against SQL Server 2008r2 SP2 ? In-Reply-To: References: Message-ID: On Thu, Jun 11, 2015 at 6:03 PM, Frediano Ziglio wrote: > > No ideas, I would add a > > putenv("TDSDUMP=stdout"); > > line to test and see the output from AppVeyor This is great advice Frediano. Thanks!. Did that but is seems it doesn't show additional info about the freeze in the precise moment it happens: Commit: https://github.com/ramiro/freetds/commit/9b3a305562a772879f74bcbb893746f7ac48b7ea Log: https://ci.appveyor.com/project/ramiro/freetds/build/174/job/mrcry453g61o351d#L5885 Will try to set up a Windows dev env at work today to see if it's reproducible but I'm not sure which exact SQL Server 2008 (sub)version they have there. Regards, -- Ramiro Morales @ramiromorales From TRoyko at sscorp.com Fri Jun 12 09:19:40 2015 From: TRoyko at sscorp.com (Thomas Royko) Date: Fri, 12 Jun 2015 13:19:40 +0000 Subject: [freetds] New to FreeTDS - Having issues with binaries built on Windows for PHP 5.6 Message-ID: Well, interestingly enough rolling back to freetds 0.92.79 seems to work. As for the error I was getting, this is what was coming up on php's end: PHP Fatal error: Must register a driver log function. in Unknown on line 0 Anyways I'm just happy I have a workaround right now. -Thomas Royko From: Thomas Royko Sent: Tuesday, June 9, 2015 5:43 PM To: 'freetds at lists.ibiblio.org' Subject: New to FreeTDS - Having issues with binaries built on Windows for PHP 5.6 I don't know if my earlier message got sent properly, so I'm sending it again. ------------------------------------------------------------------------------------------------ I work for a company that has a large established PHP codebase, we intend to migrate it to PHP version 5.6 and run it under IIS. So far I've followed the directions laid out in: http://www.freetds.org/userguide/osissues.htm https://moodle.org/mod/forum/discuss.php?d=232844#p1012743 I am using VC11. I've built FreeTDS and built the corresponding php_dblib.dll, but when I try to connect with PHP, I get unable to connect errors in my php. I'm using the same config file I have been using with earlier prebuilt versions of FreeTDS (which worked under PHP 5.4). On a side note I didn't run configure before building freetds because as far as I know there's no way to do it without something like mysys. And if you have mysys it sets up everything to point to the gcc, making nmake fail on build. PS. I know this email is scant on information. But any help would be greatly appreciated. -Thomas R. From freddy77 at gmail.com Fri Jun 12 09:36:26 2015 From: freddy77 at gmail.com (Frediano Ziglio) Date: Fri, 12 Jun 2015 14:36:26 +0100 Subject: [freetds] dblib test t002 hanging when run against SQL Server 2008r2 SP2 ? In-Reply-To: References: Message-ID: I think there is no point in doing it. The server reply is really common. Language query (simplest one), no parameters, no prepared, no RPC. Protocol is quite simple, no strange headers, no MARS. Reply is simple too. ROWFMT, ROWs, DONE, ROWFMT, ROWs, DONE(final). The dblib buffer is not at the end. The TDS packet was entirely read (so even if server disconnect there are no problems). Could be some AppVeyor timeout? Try to disable collations "test" (this was not actually supposed to be a test) which is quite slow and executed before this test. Frediano 2015-06-12 13:06 GMT+01:00 Ramiro Morales : > On Thu, Jun 11, 2015 at 6:03 PM, Frediano Ziglio wrote: >> >> No ideas, I would add a >> >> putenv("TDSDUMP=stdout"); >> >> line to test and see the output from AppVeyor > > This is great advice Frediano. Thanks!. > > Did that but is seems it doesn't show additional info about the freeze > in the precise moment it happens: > > Commit: https://github.com/ramiro/freetds/commit/9b3a305562a772879f74bcbb893746f7ac48b7ea > Log: https://ci.appveyor.com/project/ramiro/freetds/build/174/job/mrcry453g61o351d#L5885 > > Will try to set up a Windows dev env at work today to see if it's > reproducible but I'm not sure which exact SQL Server 2008 (sub)version > they have there. > > Regards, > > -- > Ramiro Morales > @ramiromorales > _______________________________________________ > FreeTDS mailing list > FreeTDS at lists.ibiblio.org > http://lists.ibiblio.org/mailman/listinfo/freetds From freddy77 at gmail.com Fri Jun 12 09:54:19 2015 From: freddy77 at gmail.com (Frediano Ziglio) Date: Fri, 12 Jun 2015 14:54:19 +0100 Subject: [freetds] dblib test t002 hanging when run against SQL Server 2008r2 SP2 ? In-Reply-To: References: Message-ID: 2015-06-12 13:06 GMT+01:00 Ramiro Morales : > On Thu, Jun 11, 2015 at 6:03 PM, Frediano Ziglio wrote: >> >> No ideas, I would add a >> >> putenv("TDSDUMP=stdout"); >> >> line to test and see the output from AppVeyor > > This is great advice Frediano. Thanks!. > > Did that but is seems it doesn't show additional info about the freeze > in the precise moment it happens: > > Commit: https://github.com/ramiro/freetds/commit/9b3a305562a772879f74bcbb893746f7ac48b7ea > Log: https://ci.appveyor.com/project/ramiro/freetds/build/174/job/mrcry453g61o351d#L5885 > > Will try to set up a Windows dev env at work today to see if it's > reproducible but I'm not sure which exact SQL Server 2008 (sub)version > they have there. > > Regards, > Looks like you reached the limit, see https://ci.appveyor.com/project/ramiro/freetds/build/174/job/mrcry453g61o351d/messages However the test log show only 16 minutes... (well.. this would possible means that test really hung). Frediano From cramm0 at gmail.com Fri Jun 12 10:40:22 2015 From: cramm0 at gmail.com (Ramiro Morales) Date: Fri, 12 Jun 2015 11:40:22 -0300 Subject: [freetds] dblib test t002 hanging when run against SQL Server 2008r2 SP2 ? In-Reply-To: References: Message-ID: On Fri, Jun 12, 2015 at 10:54 AM, Frediano Ziglio wrote: > > Looks like you reached the limit, see > https://ci.appveyor.com/project/ramiro/freetds/build/174/job/mrcry453g61o351d/messages > > However the test log show only 16 minutes... (well.. this would > possible means that test really hung). > Exactly, the builds for free AppVeyor open source accounts have a max TTL of 40min: https://ci.appveyor.com/project/ramiro/freetds/build/174 after which I suspect the simply kill the corresponding VM. But the process reaches the lockup point way earlier and the rest of the time up to min 40 is spent in that frozen state. I've just restarted the build so I can measure it more precisely but 16 mins sounds reasonable. update: Indeed, the execution reaches the problematic test on minute 14 or 15. Wil try removing anyways and try to reproduce this here. Thanks! Regards, -- Ramiro Morales @ramiromorales From freddy77 at gmail.com Fri Jun 12 11:02:57 2015 From: freddy77 at gmail.com (Frediano Ziglio) Date: Fri, 12 Jun 2015 16:02:57 +0100 Subject: [freetds] dblib test t002 hanging when run against SQL Server 2008r2 SP2 ? In-Reply-To: References: Message-ID: 2015-06-12 15:40 GMT+01:00 Ramiro Morales : > On Fri, Jun 12, 2015 at 10:54 AM, Frediano Ziglio wrote: > >> >> Looks like you reached the limit, see >> https://ci.appveyor.com/project/ramiro/freetds/build/174/job/mrcry453g61o351d/messages >> >> However the test log show only 16 minutes... (well.. this would >> possible means that test really hung). >> > > Exactly, the builds for free AppVeyor open source accounts have a max > TTL of 40min: > > https://ci.appveyor.com/project/ramiro/freetds/build/174 > > after which I suspect the simply kill the corresponding VM. But the > process reaches the lockup point way earlier and the rest of the time > up to min 40 is spent in that frozen state. > > I've just restarted the build so I can measure it more precisely but > 16 mins sounds reasonable. > > update: Indeed, the execution reaches the problematic test on minute 14 or 15. > > Wil try removing anyways and try to reproduce this here. Thanks! > > > Regards, > Oh... after row 46 the test does some on row buffering. However should print something :( Output buffering is disabled by setbuf(stdout, NULL); setbuf(stderr, NULL); in common.c. After printing row 46 should enter in dbnextrow and print it entered there... I would start adding some printf in t0002.c test. Mostly around line "verify(46, "... Frediano From freddy77 at gmail.com Fri Jun 12 13:28:32 2015 From: freddy77 at gmail.com (Frediano Ziglio) Date: Fri, 12 Jun 2015 18:28:32 +0100 Subject: [freetds] dblib test t002 hanging when run against SQL Server 2008r2 SP2 ? In-Reply-To: References: Message-ID: 2015-06-12 15:40 GMT+01:00 Ramiro Morales : > On Fri, Jun 12, 2015 at 10:54 AM, Frediano Ziglio wrote: > >> >> Looks like you reached the limit, see >> https://ci.appveyor.com/project/ramiro/freetds/build/174/job/mrcry453g61o351d/messages >> >> However the test log show only 16 minutes... (well.. this would >> possible means that test really hung). >> > > Exactly, the builds for free AppVeyor open source accounts have a max > TTL of 40min: > > https://ci.appveyor.com/project/ramiro/freetds/build/174 > > after which I suspect the simply kill the corresponding VM. But the > process reaches the lockup point way earlier and the rest of the time > up to min 40 is spent in that frozen state. > > I've just restarted the build so I can measure it more precisely but > 16 mins sounds reasonable. > > update: Indeed, the execution reaches the problematic test on minute 14 or 15. > > Wil try removing anyways and try to reproduce this here. Thanks! > > > Regards, > Found ! Was an assert macro with a side effect Frediano From craigberry at mac.com Fri Jun 12 13:48:24 2015 From: craigberry at mac.com (Craig A. Berry) Date: Fri, 12 Jun 2015 12:48:24 -0500 Subject: [freetds] [PATCH] Two VMS configuration nits Message-ID: <3FE5709E-216D-4E50-922F-DF373CDFD1AA@mac.com> There are two attached patches. One avoids a redefinition of a symbol in the VMS-specific Makefile equivalent which bothers one VMS make utility (MMS) but not another (MMK). The other enables the replacement socketpair for older VMS systems that don?t have their own. These are against master but should be quite safe for the 0.95 branch as well. Thanks to Norm Lastovica for problem reports and testing. ________________________________________ Craig A. Berry mailto:craigberry at mac.com "... getting out of a sonnet is much more difficult than getting in." Brad Leithauser -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-Don-t-redefine-CDEFINE-in-vms-descrip_mms.template.patch Type: application/octet-stream Size: 1398 bytes Desc: not available URL: -------------- next part -------------- -------------- next part -------------- A non-text attachment was scrubbed... Name: 0002-Use-replacement-socketpair-on-pre-8.2-VMS-systems.patch Type: application/octet-stream Size: 4042 bytes Desc: not available URL: From cramm0 at gmail.com Fri Jun 12 14:45:12 2015 From: cramm0 at gmail.com (Ramiro Morales) Date: Fri, 12 Jun 2015 15:45:12 -0300 Subject: [freetds] dblib test t002 hanging when run against SQL Server 2008r2 SP2 ? In-Reply-To: References: Message-ID: On Fri, Jun 12, 2015 at 2:28 PM, Frediano Ziglio wrote: > 2015-06-12 15:40 GMT+01:00 Ramiro Morales : >> On Fri, Jun 12, 2015 at 10:54 AM, Frediano Ziglio wrote: >> >>> >>> Looks like you reached the limit, see >>> https://ci.appveyor.com/project/ramiro/freetds/build/174/job/mrcry453g61o351d/messages >>> >>> However the test log show only 16 minutes... (well.. this would >>> possible means that test really hung). >>> >> >> Exactly, the builds for free AppVeyor open source accounts have a max >> TTL of 40min: >> >> https://ci.appveyor.com/project/ramiro/freetds/build/174 >> >> after which I suspect the simply kill the corresponding VM. But the >> process reaches the lockup point way earlier and the rest of the time >> up to min 40 is spent in that frozen state. >> >> I've just restarted the build so I can measure it more precisely but >> 16 mins sounds reasonable. >> >> update: Indeed, the execution reaches the problematic test on minute 14 or 15. >> >> Wil try removing anyways and try to reproduce this here. Thanks! >> >> >> Regards, >> > > Found ! > > Was an assert macro with a side effect This is great news! I had only managed to reproduce the issue locally and was working on adding debugging prints. Build is successful now: https://ci.appveyor.com/project/ramiro/freetds/build/176/job/nteb3k4oow1vaihf The Windows CI is proving useful iself after all ;-) I'll reactivate linking in OpenSSL, try to complete a few items more in my TODO list and submit the PR in the next days (unfotunately I only can work on this on my free time). Thank you very much Frediano. Regards, -- Ramiro Morales @ramiromorales From freddy77 at gmail.com Sun Jun 14 12:53:02 2015 From: freddy77 at gmail.com (Frediano Ziglio) Date: Sun, 14 Jun 2015 17:53:02 +0100 Subject: [freetds] [PATCH] Two VMS configuration nits In-Reply-To: <3FE5709E-216D-4E50-922F-DF373CDFD1AA@mac.com> References: <3FE5709E-216D-4E50-922F-DF373CDFD1AA@mac.com> Message-ID: Il 12/Giu/2015 19:48, "Craig A. Berry" ha scritto: > > There are two attached patches. One avoids a redefinition of a symbol in the VMS-specific Makefile equivalent which bothers one VMS make utility (MMS) but not another (MMK). The other enables the replacement socketpair for older VMS systems that don?t have their own. These are against master but should be quite safe for the 0.95 branch as well. > > Thanks to Norm Lastovica for problem reports and testing. > Looks good. Did you try to force socket pair replacement to be used. In Linux it worked but to remove a warning I had to add unistd.h include. Do you want me to add to 0.95 too? Should you/me add a comment in changeset comment about Norm? Frediano From craigberry at mac.com Sun Jun 14 15:23:20 2015 From: craigberry at mac.com (Craig A. Berry) Date: Sun, 14 Jun 2015 14:23:20 -0500 Subject: [freetds] [PATCH] Two VMS configuration nits In-Reply-To: References: <3FE5709E-216D-4E50-922F-DF373CDFD1AA@mac.com> Message-ID: > On Jun 14, 2015, at 11:53 AM, Frediano Ziglio wrote: > > Il 12/Giu/2015 19:48, "Craig A. Berry" ha scritto: >> >> There are two attached patches. One avoids a redefinition of a symbol in > the VMS-specific Makefile equivalent which bothers one VMS make utility > (MMS) but not another (MMK). The other enables the replacement socketpair > for older VMS systems that don?t have their own. These are against master > but should be quite safe for the 0.95 branch as well. >> >> Thanks to Norm Lastovica for problem reports and testing. >> > > Looks good. Did you try to force socket pair replacement to be used. In > Linux it worked but to remove a warning I had to add unistd.h include. Do > you want me to add to 0.95 too? Should you/me add a comment in changeset > comment about Norm? > I believe there was a warning about close() not being declared, so yes, unistd.h should take care of that. But it did work despite the warning. And yes, they should be applied to 0.95 as well as master. Good call on crediting Norm. I?ve attached a revised version of patch #0002 with that added to the commit message. ________________________________________ Craig A. Berry mailto:craigberry at mac.com "... getting out of a sonnet is much more difficult than getting in." Brad Leithauser -------------- next part -------------- A non-text attachment was scrubbed... Name: 0002-Use-replacement-socketpair-on-pre-8.2-VMS-systems.patch Type: application/octet-stream Size: 4099 bytes Desc: not available URL: From alistair.roberts at ladbrokes.com.au Mon Jun 15 18:42:56 2015 From: alistair.roberts at ladbrokes.com.au (Alistair Roberts) Date: Tue, 16 Jun 2015 08:42:56 +1000 (EST) Subject: [freetds] FreeTDS and SQL 2014 In-Memory tables Message-ID: <013201d0a7bc$9f77c060$de674120$@ladbrokes.com.au> Hi, Has anyone tried FreeTDS and SQL 2014's in memory table option? Like to know if it's possible to get it to work or not. Thanks Al Alistair Roberts SENIOR SQL SERVER DBA Email: alistair.roberts at ladbrokes.com.au Support: 1300 523 276 Betting: 1800 523 276 1300 LADBROKES | 461-473 Lutwyche Road, Lutwyche, 4030 | www.ladbrokes.com.au The information contained in this email message may be confidential. It is intended only for the recipient named above. If you are not the intended recipient, any use, disclosure or copying of this email is unauthorised and prohibited. If you have received this email in error, please notify the sender so that arrangements can be made for its retrieval or destruction. -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 2964 bytes Desc: not available URL: From freddy77 at gmail.com Tue Jun 16 03:54:35 2015 From: freddy77 at gmail.com (Frediano Ziglio) Date: Tue, 16 Jun 2015 08:54:35 +0100 Subject: [freetds] FreeTDS and SQL 2014 In-Memory tables In-Reply-To: <013201d0a7bc$9f77c060$de674120$@ladbrokes.com.au> References: <013201d0a7bc$9f77c060$de674120$@ladbrokes.com.au> Message-ID: Il 16/Giu/2015 00:43, "Alistair Roberts" ha scritto: > > Hi, > > > > Has anyone tried FreeTDS and SQL 2014's in memory table option? > > > > Like to know if it's possible to get it to work or not. > > > > Thanks > > > Al > Still not supported. Obviously it's possible to get it to work. The point is how quick you want and the involvement you want. As said is not implemented so it has to be implemented. Frediano From rrankins at gothamconsulting.com Tue Jun 16 07:37:51 2015 From: rrankins at gothamconsulting.com (Ray Rankins) Date: Tue, 16 Jun 2015 07:37:51 -0400 Subject: [freetds] FreeTDS and SQL 2014 In-Memory tables In-Reply-To: References: <013201d0a7bc$9f77c060$de674120$@ladbrokes.com.au> Message-ID: <09a601d0a828$e1cbc350$a56349f0$@gothamconsulting.com> I'm curious as to why it wouldn't work to query an in-memory table. I don't have an environment available at the moment to test it out, but you run queries against an in-memory table just like a regular table using standard SQL statements (SELECT, INSERT, UPDATE, DELETE). What goes on behind the scenes to manage an in-memory table structure should be transparent to the client application. -Ray > -----Original Message----- > From: FreeTDS [mailto:freetds-bounces at lists.ibiblio.org] On Behalf Of > Frediano Ziglio > Sent: Tuesday, June 16, 2015 3:55 AM > To: FreeTDS Development Group > Subject: Re: [freetds] FreeTDS and SQL 2014 In-Memory tables > > Il 16/Giu/2015 00:43, "Alistair Roberts" > ha scritto: > > > > Hi, > > > > Has anyone tried FreeTDS and SQL 2014's in memory table option? > > > > Like to know if it's possible to get it to work or not. > > > > Thanks > > > > > > Al > > > > Still not supported. Obviously it's possible to get it to work. The point > is how quick you want and the involvement you want. As said is not > implemented so it has to be implemented. > > Frediano > _______________________________________________ > FreeTDS mailing list > FreeTDS at lists.ibiblio.org > http://lists.ibiblio.org/mailman/listinfo/freetds From matthew.green at datamartcomputing.com Tue Jun 16 07:48:39 2015 From: matthew.green at datamartcomputing.com (matthew.green at datamartcomputing.com) Date: Tue, 16 Jun 2015 11:48:39 +0000 Subject: [freetds] FreeTDS and SQL 2014 In-Memory tables In-Reply-To: <09a601d0a828$e1cbc350$a56349f0$@gothamconsulting.com> References: <09a601d0a828$e1cbc350$a56349f0$@gothamconsulting.com> <013201d0a7bc$9f77c060$de674120$@ladbrokes.com.au> Message-ID: I would tend to agree. I haven't tried it yet with MS SQL Server but it works fine with Sybase in memory tables as FreeTDS doesn't know and doesn't need to know the difference. As far as I can see it's the same story with proxy tables, for example. Cheers, Matthew. June 16 2015 1:38 PM, "Ray Rankins" wrote: > I'm curious as to why it wouldn't work to query an in-memory table. > I don't have an environment available at the moment to test it out, but you run queries against an > in-memory table just like a regular table using standard SQL statements (SELECT, INSERT, UPDATE, > DELETE). > What goes on behind the scenes to manage an in-memory table structure should be transparent to the > client application. > > -Ray > >> -----Original Message----- >> From: FreeTDS [mailto:freetds-bounces at lists.ibiblio.org] On Behalf Of >> Frediano Ziglio >> Sent: Tuesday, June 16, 2015 3:55 AM >> To: FreeTDS Development Group >> Subject: Re: [freetds] FreeTDS and SQL 2014 In-Memory tables >> >> Il 16/Giu/2015 00:43, "Alistair Roberts" >> ha scritto: >>> >>> Hi, >>> >>> Has anyone tried FreeTDS and SQL 2014's in memory table option? >>> >>> Like to know if it's possible to get it to work or not. >>> >>> Thanks >>> >>> >>> Al >>> >> >> Still not supported. Obviously it's possible to get it to work. The point >> is how quick you want and the involvement you want. As said is not >> implemented so it has to be implemented. >> >> Frediano >> _______________________________________________ >> FreeTDS mailing list >> FreeTDS at lists.ibiblio.org >> http://lists.ibiblio.org/mailman/listinfo/freetds > > _______________________________________________ > FreeTDS mailing list > FreeTDS at lists.ibiblio.org > http://lists.ibiblio.org/mailman/listinfo/freetds From freddy77 at gmail.com Tue Jun 16 07:57:41 2015 From: freddy77 at gmail.com (Frediano Ziglio) Date: Tue, 16 Jun 2015 12:57:41 +0100 Subject: [freetds] FreeTDS and SQL 2014 In-Memory tables In-Reply-To: <09a601d0a828$e1cbc350$a56349f0$@gothamconsulting.com> References: <013201d0a7bc$9f77c060$de674120$@ladbrokes.com.au> <09a601d0a828$e1cbc350$a56349f0$@gothamconsulting.com> Message-ID: Well, as long you don't need to send table to server or get a table as a parameter/column should work Frediano Il 16/Giu/2015 13:38, "Ray Rankins" ha scritto: > > I'm curious as to why it wouldn't work to query an in-memory table. > I don't have an environment available at the moment to test it out, but you run queries against an in-memory table just like a regular table using standard SQL statements (SELECT, INSERT, UPDATE, DELETE). > What goes on behind the scenes to manage an in-memory table structure should be transparent to the client application. > > -Ray > > > -----Original Message----- > > From: FreeTDS [mailto:freetds-bounces at lists.ibiblio.org] On Behalf Of > > Frediano Ziglio > > Sent: Tuesday, June 16, 2015 3:55 AM > > To: FreeTDS Development Group > > Subject: Re: [freetds] FreeTDS and SQL 2014 In-Memory tables > > > > Il 16/Giu/2015 00:43, "Alistair Roberts" < alistair.roberts at ladbrokes.com.au> > > ha scritto: > > > > > > Hi, > > > > > > Has anyone tried FreeTDS and SQL 2014's in memory table option? > > > > > > Like to know if it's possible to get it to work or not. > > > > > > Thanks > > > > > > > > > Al > > > > > > > Still not supported. Obviously it's possible to get it to work. The point > > is how quick you want and the involvement you want. As said is not > > implemented so it has to be implemented. > > > > Frediano > > _______________________________________________ > > FreeTDS mailing list > > FreeTDS at lists.ibiblio.org > > http://lists.ibiblio.org/mailman/listinfo/freetds > > _______________________________________________ > FreeTDS mailing list > FreeTDS at lists.ibiblio.org > http://lists.ibiblio.org/mailman/listinfo/freetds From freddy77 at gmail.com Wed Jun 17 09:22:30 2015 From: freddy77 at gmail.com (Frediano Ziglio) Date: Wed, 17 Jun 2015 14:22:30 +0100 Subject: [freetds] [PATCH] Two VMS configuration nits In-Reply-To: References: <3FE5709E-216D-4E50-922F-DF373CDFD1AA@mac.com> Message-ID: Applied Frediano 2015-06-14 20:23 GMT+01:00 Craig A. Berry : > >> On Jun 14, 2015, at 11:53 AM, Frediano Ziglio wrote: >> >> Il 12/Giu/2015 19:48, "Craig A. Berry" ha scritto: >>> >>> There are two attached patches. One avoids a redefinition of a symbol in >> the VMS-specific Makefile equivalent which bothers one VMS make utility >> (MMS) but not another (MMK). The other enables the replacement socketpair >> for older VMS systems that don?t have their own. These are against master >> but should be quite safe for the 0.95 branch as well. >>> >>> Thanks to Norm Lastovica for problem reports and testing. >>> >> >> Looks good. Did you try to force socket pair replacement to be used. In >> Linux it worked but to remove a warning I had to add unistd.h include. Do >> you want me to add to 0.95 too? Should you/me add a comment in changeset >> comment about Norm? >> > > I believe there was a warning about close() not being declared, so yes, unistd.h should take care of that. But it did work despite the warning. And yes, they should be applied to 0.95 as well as master. Good call on crediting Norm. I?ve attached a revised version of patch #0002 with that added to the commit message. > > ________________________________________ > Craig A. Berry > mailto:craigberry at mac.com > > "... getting out of a sonnet is much more > difficult than getting in." > Brad Leithauser > > _______________________________________________ > FreeTDS mailing list > FreeTDS at lists.ibiblio.org > http://lists.ibiblio.org/mailman/listinfo/freetds > From Raymond.Rankins at its.ny.gov Thu Jun 18 09:42:11 2015 From: Raymond.Rankins at its.ny.gov (Rankins, Raymond (ITS)) Date: Thu, 18 Jun 2015 13:42:11 +0000 Subject: [freetds] FreeTDS version 0.95 just released. In-Reply-To: References: Message-ID: Quick question on one of the Bulk-copy improvements. Does the "support for empty fields" take care of the "Attempt to bulk-copy a Null Value into Server column does not accept null values" error raised when you attempt to send an empty field to a NOT NULL column that has a default defined on it? The correct SQL Server behavior is to apply the default value, but the 0.92 version of freebcp is raising the error instead and ignoring the default. If I change the column to nullable, it applies the default as expected -Ray -----Original Message----- From: FreeTDS [mailto:freetds-bounces at lists.ibiblio.org] On Behalf Of Frediano Ziglio Sent: Monday, June 08, 2015 2:24 PM To: FreeTDS Development Group Subject: [freetds] FreeTDS version 0.95 just released. Finally, after years of improvements and fixes we got a new version Summary of Changes in release 0.95 -------------------------------------------- User visible (not in a particular order): - Support for build with CMake under Windows. - Support MSSQL 2008: - new date/time types; - NBCROWs; - able to retrieve CLR UDT types in binary format. - Moved from CVS to git. - Support MARS under ODBC. - IPv6 support. - Support unsigned Sybase types. - Sybase use some characters conversion like MSSQL. - Bulk-copy improvements: - more types; - support for empty fields; - no needs for seekable file; - avoid possible buffer overflows; - less memory consumption; - handle different BIT fields in Sybase; - -T option for datacopy. - datacopy: - prompting for password (use "-" password on command line); - empty user/password (to use Kerberos). - Support for query notifications in ODBC. - Support for protocols 7.2 and 7.3 under dblib and ctlib. - dblib: - dbpivot extension; - dbprcollen extension to get printable column size; - add DBCOL2 structure for dbtablecolinfo; - support DBTEXTSIZE option for dbsetopt; - support SRCNUMERICBIND and SRCDECIMALBIND binding; - DATETIME2BIND extension binding to support new mssql 2008 type; - ODBC: - add SQL_INFO_FREETDS_TDS_VERSION option to SQLGetInfo to retrieve FreeTDS version; - add --enable-odbc-wide-tests configure option to use wide functions in unit tests. - Better thread support. - Allow to specify server SPN for GSSAPI. - Sybase graceful disconnects. - Better support for VARCHAR(MAX)/VARBINARY(MAX). - Better error reporting from login failure. - More strict test for configuration errors, fails if configuration is wrong. - "use utf-16" option to enable use of UTF-16 for server encoding (MSSQL). - Remove support for Dev-C++. - Remove support for bad iconv, use libiconv instead (Tru64 and HP-UX should be affected), connect will fail. - New NTLM options: - "use lanman"; - "use ntlmv2". - New Kerberos options: - "realm" ("REALM" in ODBC); - "spn" ("ServerSPN" in ODBC). - New certificate options: - "ca file"; - "crl file"; - "check certificate hostname". - Many bug fixes, majors: - SSPI with Kerberos on some setup; - SQLCancel threading; - ctlib numeric; - ODBC statistic function quotings. People taking part in this effort --------------------------------- - Alexandros Giouzenis - Ben Slade - datacopy password prompt - Christos Zoulas - improve defncopy and fisql - server maintainer - some build fixes - Constantin Vasilyev - Craig A. Berry - BCP improvements - VMS support - Daniel Fazekas - some fixes for dblib - Ed Avis - Frediano Ziglio - ... lot of stuff ... - ... really! ... - Fredy Paquet - Ian Lister - James K. Lowden - documentation update - Makefiles improvements - dbpivot - improve error reporting - ... lot of stuff ... - Jason Yanowitz - Jun Kang Chin - UTF-16 encoding from server ("use utf-16") - Justin T Pryzby - Ken Collins - Kerberos SSPI fix - Ladislav Karrach - help fixing a problem with transaction with newer protocol - Visual Studio support updates - add DATETIME2BIND support in dblib and other new types improvements - Marc Abramowitz - improved logging and error reporting - Travis continue integration - documentation updates - Martin Wilck - fix for ctlib cursors - Matt Lilley - fix MARS problem - Matthew Green - improved datacopy - Mikhail Denisenko - NBCROW support - Mikhail Teterin - Peter Deacon - IPv6 support - Pietro Cerutti - Ramiro Morales - pymssql support - fix some bugs with dblib RPC - many build fixes - Richard Hughes - query notification in ODBC - Samuel Ferencik - help fixing NTLM problem with small buffers - improved ctlib - Sebastien Flaesch - Shiva Ramabadran - Steve Langasek - fix some compatibility and bugs - Tony Esposito - DYNPROC fix for Sybase - Willi Langenberger Frediano _______________________________________________ FreeTDS mailing list FreeTDS at lists.ibiblio.org http://lists.ibiblio.org/mailman/listinfo/freetds From sf at 4js.com Fri Jun 19 05:01:05 2015 From: sf at 4js.com (Sebastien FLAESCH) Date: Fri, 19 Jun 2015 11:01:05 +0200 Subject: [freetds] Testing 0.95 Message-ID: <5583DA51.7080708@4js.com> Hi all, Just installed 0.95.5 got from: ftp://ftp.freetds.org/pub/freetds/stable/ (I guess this is the latest stable version?) Attached some compilation warnings... Is there an configure option to turn on gcc's address sanitizer? We are using this option in our product. So far, my QA tests ran ok against SQL Server 2005, will test on other servers. Seems that new datetime data types are now supported which is good news! Cheers Seb -------------- next part -------------- Making clean in include make[1]: Entering directory '/opt3/dbs/tds/tmp/freetds-0.95.5/include' Making clean in freetds make[2]: Entering directory '/opt3/dbs/tds/tmp/freetds-0.95.5/include/freetds' rm -rf .libs _libs rm -f *.lo make[2]: Leaving directory '/opt3/dbs/tds/tmp/freetds-0.95.5/include/freetds' make[2]: Entering directory '/opt3/dbs/tds/tmp/freetds-0.95.5/include' rm -rf .libs _libs rm -f *.lo make[2]: Leaving directory '/opt3/dbs/tds/tmp/freetds-0.95.5/include' make[1]: Leaving directory '/opt3/dbs/tds/tmp/freetds-0.95.5/include' Making clean in src make[1]: Entering directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src' Making clean in replacements make[2]: Entering directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src/replacements' Making clean in . make[3]: Entering directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src/replacements' rm -rf .libs _libs test -z "libreplacements.la" || rm -f libreplacements.la rm -f ./so_locations rm -f *.o rm -f *.lo make[3]: Leaving directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src/replacements' Making clean in unittests make[3]: Entering directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src/replacements/unittests' rm -f mutex1 condition strings passarg rm -rf .libs _libs rm -f *.o test -z "mutex1.log condition.log strings.log passarg.log" || rm -f mutex1.log condition.log strings.log passarg.log test -z "mutex1.trs condition.trs strings.trs passarg.trs" || rm -f mutex1.trs condition.trs strings.trs passarg.trs test -z "test-suite.log" || rm -f test-suite.log rm -f *.lo make[3]: Leaving directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src/replacements/unittests' make[2]: Leaving directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src/replacements' Making clean in tds make[2]: Entering directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src/tds' Making clean in . make[3]: Entering directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src/tds' rm -rf .libs _libs test -z "libtds.la" || rm -f libtds.la rm -f ./so_locations rm -f *.o rm -f *.lo make[3]: Leaving directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src/tds' Making clean in unittests make[3]: Entering directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src/tds/unittests' rm -f t0001 t0002 t0003 t0004 t0005 t0006 t0007 t0008 dynamic1 convert dataread utf8_1 utf8_2 utf8_3 numeric iconv_fread toodynamic challenge readconf charconv nulls test -z "tdsdump.out" || rm -f tdsdump.out rm -rf .libs _libs rm -f *.o test -z "t0001.log t0002.log t0003.log t0004.log t0005.log t0006.log t0007.log t0008.log dynamic1.log convert.log dataread.log utf8_1.log utf8_2.log utf8_3.log numeric.log iconv_fread.log toodynamic.log challenge.log readconf.log charconv.log nulls.log" || rm -f t0001.log t0002.log t0003.log t0004.log t0005.log t0006.log t0007.log t0008.log dynamic1.log convert.log dataread.log utf8_1.log utf8_2.log utf8_3.log numeric.log iconv_fread.log toodynamic.log challenge.log readconf.log charconv.log nulls.log test -z "t0001.trs t0002.trs t0003.trs t0004.trs t0005.trs t0006.trs t0007.trs t0008.trs dynamic1.trs convert.trs dataread.trs utf8_1.trs utf8_2.trs utf8_3.trs numeric.trs iconv_fread.trs toodynamic.trs challenge.trs readconf.trs charconv.trs nulls.trs" || rm -f t0001.trs t0002.trs t0003.trs t0004.trs t0005.trs t0006.trs t0007.trs t0008.trs dynamic1.trs convert.trs dataread.trs utf8_1.trs utf8_2.trs utf8_3.trs numeric.trs iconv_fread.trs toodynamic.trs challenge.trs readconf.trs charconv.trs nulls.trs test -z "test-suite.log" || rm -f test-suite.log rm -f *.lo make[3]: Leaving directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src/tds/unittests' make[2]: Leaving directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src/tds' Making clean in ctlib make[2]: Entering directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src/ctlib' Making clean in . make[3]: Entering directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src/ctlib' test -z "libct.la" || rm -f libct.la rm -f ./so_locations rm -rf .libs _libs rm -f *.o rm -f *.lo make[3]: Leaving directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src/ctlib' Making clean in unittests make[3]: Entering directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src/ctlib/unittests' rm -f t0001 t0002 t0003 t0004 t0005 t0006 t0007 t0008 t0009 connect_fail ct_options lang_ct_param array_bind cs_diag get_send_data rpc_ct_param rpc_ct_setparam ct_diagclient ct_diagserver ct_diagall cs_config cancel blk_in blk_out ct_cursor ct_cursors ct_dynamic blk_in2 datafmt test -z "tdsdump.out" || rm -f tdsdump.out rm -rf .libs _libs rm -f *.o test -z "t0001.log t0002.log t0003.log t0004.log t0005.log t0006.log t0007.log t0008.log t0009.log connect_fail.log ct_options.log lang_ct_param.log array_bind.log cs_diag.log get_send_data.log rpc_ct_param.log rpc_ct_setparam.log ct_diagclient.log ct_diagserver.log ct_diagall.log cs_config.log cancel.log blk_in.log blk_out.log ct_cursor.log ct_cursors.log ct_dynamic.log blk_in2.log datafmt.log" || rm -f t0001.log t0002.log t0003.log t0004.log t0005.log t0006.log t0007.log t0008.log t0009.log connect_fail.log ct_options.log lang_ct_param.log array_bind.log cs_diag.log get_send_data.log rpc_ct_param.log rpc_ct_setparam.log ct_diagclient.log ct_diagserver.log ct_diagall.log cs_config.log cancel.log blk_in.log blk_out.log ct_cursor.log ct_cursors.log ct_dynamic.log blk_in2.log datafmt.log test -z "t0001.trs t0002.trs t0003.trs t0004.trs t0005.trs t0006.trs t0007.trs t0008.trs t0009.trs connect_fail.trs ct_options.trs lang_ct_param.trs array_bind.trs cs_diag.trs get_send_data.trs rpc_ct_param.trs rpc_ct_setparam.trs ct_diagclient.trs ct_diagserver.trs ct_diagall.trs cs_config.trs cancel.trs blk_in.trs blk_out.trs ct_cursor.trs ct_cursors.trs ct_dynamic.trs blk_in2.trs datafmt.trs" || rm -f t0001.trs t0002.trs t0003.trs t0004.trs t0005.trs t0006.trs t0007.trs t0008.trs t0009.trs connect_fail.trs ct_options.trs lang_ct_param.trs array_bind.trs cs_diag.trs get_send_data.trs rpc_ct_param.trs rpc_ct_setparam.trs ct_diagclient.trs ct_diagserver.trs ct_diagall.trs cs_config.trs cancel.trs blk_in.trs blk_out.trs ct_cursor.trs ct_cursors.trs ct_dynamic.trs blk_in2.trs datafmt.trs test -z "test-suite.log" || rm -f test-suite.log rm -f *.lo make[3]: Leaving directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src/ctlib/unittests' make[2]: Leaving directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src/ctlib' Making clean in dblib make[2]: Entering directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src/dblib' Making clean in . make[3]: Entering directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src/dblib' test -z "libsybdb.la" || rm -f libsybdb.la rm -f ./so_locations rm -rf .libs _libs rm -f *.o rm -f *.lo make[3]: Leaving directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src/dblib' Making clean in unittests make[3]: Entering directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src/dblib/unittests' rm -f t0001 t0002 t0003 t0004 t0005 t0006 t0007 t0008 t0009 t0011 t0012 t0013 t0014 t0015 t0016 t0017 t0018 t0019 t0020 t0021 t0022 t0023 rpc dbmorecmds bcp thread text_buffer done_handling timeout hang null null2 setnull numeric pending test -z "tdsdump.out t0013.out t0014.out t0016.out t0016.err t0017.err t0017.out" || rm -f tdsdump.out t0013.out t0014.out t0016.out t0016.err t0017.err t0017.out rm -rf .libs _libs rm -f *.o test -z "t0001.log t0002.log t0003.log t0004.log t0005.log t0006.log t0007.log t0008.log t0009.log t0011.log t0012.log t0013.log t0014.log t0015.log t0016.log t0017.log t0018.log t0019.log t0020.log t0021.log t0022.log t0023.log rpc.log dbmorecmds.log bcp.log thread.log text_buffer.log done_handling.log timeout.log hang.log null.log null2.log setnull.log numeric.log pending.log" || rm -f t0001.log t0002.log t0003.log t0004.log t0005.log t0006.log t0007.log t0008.log t0009.log t0011.log t0012.log t0013.log t0014.log t0015.log t0016.log t0017.log t0018.log t0019.log t0020.log t0021.log t0022.log t0023.log rpc.log dbmorecmds.log bcp.log thread.log text_buffer.log done_handling.log timeout.log hang.log null.log null2.log setnull.log numeric.log pending.log test -z "t0001.trs t0002.trs t0003.trs t0004.trs t0005.trs t0006.trs t0007.trs t0008.trs t0009.trs t0011.trs t0012.trs t0013.trs t0014.trs t0015.trs t0016.trs t0017.trs t0018.trs t0019.trs t0020.trs t0021.trs t0022.trs t0023.trs rpc.trs dbmorecmds.trs bcp.trs thread.trs text_buffer.trs done_handling.trs timeout.trs hang.trs null.trs null2.trs setnull.trs numeric.trs pending.trs" || rm -f t0001.trs t0002.trs t0003.trs t0004.trs t0005.trs t0006.trs t0007.trs t0008.trs t0009.trs t0011.trs t0012.trs t0013.trs t0014.trs t0015.trs t0016.trs t0017.trs t0018.trs t0019.trs t0020.trs t0021.trs t0022.trs t0023.trs rpc.trs dbmorecmds.trs bcp.trs thread.trs text_buffer.trs done_handling.trs timeout.trs hang.trs null.trs null2.trs setnull.trs numeric.trs pending.trs test -z "test-suite.log" || rm -f test-suite.log rm -f *.lo make[3]: Leaving directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src/dblib/unittests' make[2]: Leaving directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src/dblib' Making clean in odbc make[2]: Entering directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src/odbc' Making clean in . make[3]: Entering directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src/odbc' test -z "libtdsodbc.la" || rm -f libtdsodbc.la rm -f ./so_locations rm -rf .libs _libs rm -f *.o rm -f *.lo make[3]: Leaving directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src/odbc' Making clean in unittests make[3]: Entering directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src/odbc/unittests' rm -f t0001 t0002 t0003 t0004 connect print date norowset funccall lang_error tables binary_test moreandcount earlybind putdata params raiserror getdata transaction type genparams preperror prepare_results testodbc data error rebindpar rpc convert_error typeinfo const_params insert_speed compute timeout array array_out cursor1 scroll cursor2 describecol copydesc prepclose warning paramcore timeout2 timeout3 connect2 timeout4 freeclose cursor3 cursor4 cursor5 attributes hidden blob1 cancel wchar rowset transaction2 cursor6 cursor7 utf8 utf8_2 stats descrec peter test64 prepare_warn long_error mars1 array_error describecol2 closestmt rm -rf .libs _libs rm -f *.o test -z "t0001.log t0002.log t0003.log t0004.log connect.log print.log date.log norowset.log funccall.log lang_error.log tables.log binary_test.log moreandcount.log earlybind.log putdata.log params.log raiserror.log getdata.log transaction.log type.log genparams.log preperror.log prepare_results.log testodbc.log data.log error.log rebindpar.log rpc.log convert_error.log typeinfo.log const_params.log insert_speed.log compute.log timeout.log array.log array_out.log cursor1.log scroll.log cursor2.log describecol.log copydesc.log prepclose.log warning.log paramcore.log timeout2.log timeout3.log connect2.log timeout4.log freeclose.log cursor3.log cursor4.log cursor5.log attributes.log hidden.log blob1.log cancel.log wchar.log rowset.log transaction2.log cursor6.log cursor7.log utf8.log utf8_2.log stats.log descrec.log peter.log test64.log prepare_warn.log long_error.log mars1.log array_error.log describecol2.log closestmt.log" || rm -f t0001.log t0002.log t0003.log t0004.log connect.log print.log date.log norowset.log funccall.log lang_error.log tables.log binary_test.log moreandcount.log earlybind.log putdata.log params.log raiserror.log getdata.log transaction.log type.log genparams.log preperror.log prepare_results.log testodbc.log data.log error.log rebindpar.log rpc.log convert_error.log typeinfo.log const_params.log insert_speed.log compute.log timeout.log array.log array_out.log cursor1.log scroll.log cursor2.log describecol.log copydesc.log prepclose.log warning.log paramcore.log timeout2.log timeout3.log connect2.log timeout4.log freeclose.log cursor3.log cursor4.log cursor5.log attributes.log hidden.log blob1.log cancel.log wchar.log rowset.log transaction2.log cursor6.log cursor7.log utf8.log utf8_2.log stats.log descrec.log peter.log test64.log prepare_warn.log long_error.log mars1.log array_error.log describecol2.log closestmt.log test -z "t0001.trs t0002.trs t0003.trs t0004.trs connect.trs print.trs date.trs norowset.trs funccall.trs lang_error.trs tables.trs binary_test.trs moreandcount.trs earlybind.trs putdata.trs params.trs raiserror.trs getdata.trs transaction.trs type.trs genparams.trs preperror.trs prepare_results.trs testodbc.trs data.trs error.trs rebindpar.trs rpc.trs convert_error.trs typeinfo.trs const_params.trs insert_speed.trs compute.trs timeout.trs array.trs array_out.trs cursor1.trs scroll.trs cursor2.trs describecol.trs copydesc.trs prepclose.trs warning.trs paramcore.trs timeout2.trs timeout3.trs connect2.trs timeout4.trs freeclose.trs cursor3.trs cursor4.trs cursor5.trs attributes.trs hidden.trs blob1.trs cancel.trs wchar.trs rowset.trs transaction2.trs cursor6.trs cursor7.trs utf8.trs utf8_2.trs stats.trs descrec.trs peter.trs test64.trs prepare_warn.trs long_error.trs mars1.trs array_error.trs describecol2.trs closestmt.trs" || rm -f t0001.trs t0002.trs t0003.trs t0004.trs connect.trs print.trs date.trs norowset.trs funccall.trs lang_error.trs tables.trs binary_test.trs moreandcount.trs earlybind.trs putdata.trs params.trs raiserror.trs getdata.trs transaction.trs type.trs genparams.trs preperror.trs prepare_results.trs testodbc.trs data.trs error.trs rebindpar.trs rpc.trs convert_error.trs typeinfo.trs const_params.trs insert_speed.trs compute.trs timeout.trs array.trs array_out.trs cursor1.trs scroll.trs cursor2.trs describecol.trs copydesc.trs prepclose.trs warning.trs paramcore.trs timeout2.trs timeout3.trs connect2.trs timeout4.trs freeclose.trs cursor3.trs cursor4.trs cursor5.trs attributes.trs hidden.trs blob1.trs cancel.trs wchar.trs rowset.trs transaction2.trs cursor6.trs cursor7.trs utf8.trs utf8_2.trs stats.trs descrec.trs peter.trs test64.trs prepare_warn.trs long_error.trs mars1.trs array_error.trs describecol2.trs closestmt.trs test -z "test-suite.log" || rm -f test-suite.log rm -f *.lo make[3]: Leaving directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src/odbc/unittests' make[2]: Leaving directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src/odbc' Making clean in apps make[2]: Entering directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src/apps' Making clean in fisql make[3]: Entering directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src/apps/fisql' rm -f fisql rm -rf .libs _libs rm -f *.o rm -f *.lo make[3]: Leaving directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src/apps/fisql' make[3]: Entering directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src/apps' rm -f tsql freebcp bsqldb defncopy datacopy bsqlodbc rm -rf .libs _libs rm -f *.o rm -f *.lo make[3]: Leaving directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src/apps' make[2]: Leaving directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src/apps' Making clean in server make[2]: Entering directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src/server' rm -rf .libs _libs test -z "libtdssrv.la" || rm -f libtdssrv.la rm -f ./so_locations rm -f tdssrv rm -f *.o rm -f *.lo make[2]: Leaving directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src/server' Making clean in pool make[2]: Entering directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src/pool' rm -f tdspool rm -rf .libs _libs rm -f *.o rm -f *.lo make[2]: Leaving directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src/pool' make[2]: Entering directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src' rm -rf .libs _libs rm -f *.lo make[2]: Leaving directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src' make[1]: Leaving directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src' Making clean in doc make[1]: Entering directory '/opt3/dbs/tds/tmp/freetds-0.95.5/doc' test -z "dblib.api.body ctlib.api.body odbc.api.body dblib.api.sgml ctlib.api.sgml odbc.api.sgml freebcp.1 tsql.1 osql.1 bsqldb.1 bsqlodbc.1 defncopy.1 datacopy.1 fisql.1 freetds.conf.5" || rm -f dblib.api.body ctlib.api.body odbc.api.body dblib.api.sgml ctlib.api.sgml odbc.api.sgml freebcp.1 tsql.1 osql.1 bsqldb.1 bsqlodbc.1 defncopy.1 datacopy.1 fisql.1 freetds.conf.5 rm -rf .libs _libs rm -rf userguide.dsl doxy.log \ dblib.api.sgml \ ctlib.api.sgml \ odbc.api.sgml rm -f *.lo make[1]: Leaving directory '/opt3/dbs/tds/tmp/freetds-0.95.5/doc' Making clean in samples make[1]: Entering directory '/opt3/dbs/tds/tmp/freetds-0.95.5/samples' test -z "unixodbc.freetds.driver.template" || rm -f unixodbc.freetds.driver.template rm -rf .libs _libs rm -f *.lo make[1]: Leaving directory '/opt3/dbs/tds/tmp/freetds-0.95.5/samples' Making clean in win32 make[1]: Entering directory '/opt3/dbs/tds/tmp/freetds-0.95.5/win32' test -z "setup.res" || rm -f setup.res rm -rf .libs _libs rm -f *.lo make[1]: Leaving directory '/opt3/dbs/tds/tmp/freetds-0.95.5/win32' Making clean in vms make[1]: Entering directory '/opt3/dbs/tds/tmp/freetds-0.95.5/vms' make[1]: Nothing to be done for 'clean'. make[1]: Leaving directory '/opt3/dbs/tds/tmp/freetds-0.95.5/vms' make[1]: Entering directory '/opt3/dbs/tds/tmp/freetds-0.95.5' rm -rf .libs _libs find . \( -name \*.test_output -o -name \*.bb -o -name \*.bbg -o -name \*.da -o -name \*.gc\* \) -exec rm -f {} \; rm -f *.lo make[1]: Leaving directory '/opt3/dbs/tds/tmp/freetds-0.95.5' Making all in include make[1]: Entering directory '/opt3/dbs/tds/tmp/freetds-0.95.5/include' make all-recursive make[2]: Entering directory '/opt3/dbs/tds/tmp/freetds-0.95.5/include' Making all in freetds make[3]: Entering directory '/opt3/dbs/tds/tmp/freetds-0.95.5/include/freetds' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/opt3/dbs/tds/tmp/freetds-0.95.5/include/freetds' make[3]: Entering directory '/opt3/dbs/tds/tmp/freetds-0.95.5/include' make[3]: Leaving directory '/opt3/dbs/tds/tmp/freetds-0.95.5/include' make[2]: Leaving directory '/opt3/dbs/tds/tmp/freetds-0.95.5/include' make[1]: Leaving directory '/opt3/dbs/tds/tmp/freetds-0.95.5/include' Making all in src make[1]: Entering directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src' Making all in replacements make[2]: Entering directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src/replacements' Making all in . make[3]: Entering directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src/replacements' CC iconv.lo CC gettimeofday.lo CC fakepoll.lo CC getpassarg.lo CC socketpair.lo CC win_mutex.lo CC tds_cond.lo CC getaddrinfo.lo CC sleep.lo CC readpassphrase.lo CC strlcpy.lo CC strlcat.lo CCLD libreplacements.la make[3]: Leaving directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src/replacements' Making all in unittests make[3]: Entering directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src/replacements/unittests' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src/replacements/unittests' make[2]: Leaving directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src/replacements' Making all in tds make[2]: Entering directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src/tds' make all-recursive make[3]: Entering directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src/tds' Making all in . make[4]: Entering directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src/tds' CC mem.lo CC token.lo CC util.lo CC login.lo CC read.lo read.c: In function 'read_and_convert': read.c:292:6: warning: variable 'res' set but not used [-Wunused-but-set-variable] int res; ^ CC write.lo write.c: In function 'tds_put_string': write.c:97:6: warning: variable 'res' set but not used [-Wunused-but-set-variable] int res; ^ CC convert.lo CC numeric.lo CC config.lo CC query.lo CC iconv.lo CC locale.lo CC threadsafe.lo CC vstrbuild.lo CC tdsstring.lo CC getmac.lo CC data.lo CC net.lo CC tls.lo CC tds_checks.lo CC log.lo CC bulk.lo CC packet.lo CC stream.lo CC challenge.lo CC md4.lo md4.c: In function 'MD4Final': md4.c:164:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] ((word32 *) ctx->in)[14] = (word32) (ctx->bytes << 3); ^ md4.c:165:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] ((word32 *) ctx->in)[15] = (word32) (ctx->bytes >> 29); ^ CC md5.lo md5.c: In function 'MD5Final': md5.c:145:5: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] ((word32 *) ctx->in)[14] = (word32) (ctx->bytes << 3); ^ md5.c:146:5: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] ((word32 *) ctx->in)[15] = (word32) (ctx->bytes >> 29); ^ CC des.lo CC gssapi.lo CC hmac_md5.lo CCLD libtds.la make[4]: Leaving directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src/tds' Making all in unittests make[4]: Entering directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src/tds/unittests' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src/tds/unittests' make[3]: Leaving directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src/tds' make[2]: Leaving directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src/tds' Making all in ctlib make[2]: Entering directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src/ctlib' Making all in . make[3]: Entering directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src/ctlib' CC ct.lo CC cs.lo CC blk.lo CC ctutil.lo CCLD libct.la copying selected object files to avoid basename conflicts... make[3]: Leaving directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src/ctlib' Making all in unittests make[3]: Entering directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src/ctlib/unittests' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src/ctlib/unittests' make[2]: Leaving directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src/ctlib' Making all in dblib make[2]: Entering directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src/dblib' Making all in . make[3]: Entering directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src/dblib' CC dblib.lo CC dbutil.lo CC rpc.lo CC bcp.lo bcp.c: In function 'bcp_readfmt': bcp.c:1619:8: warning: variable 'lf_version' set but not used [-Wunused-but-set-variable] float lf_version = 0.0; ^ CC xact.lo CC dbpivot.lo CCLD libsybdb.la copying selected object files to avoid basename conflicts... make[3]: Leaving directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src/dblib' Making all in unittests make[3]: Entering directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src/dblib/unittests' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src/dblib/unittests' make[2]: Leaving directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src/dblib' Making all in odbc make[2]: Entering directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src/odbc' make all-recursive make[3]: Entering directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src/odbc' Making all in . make[4]: Entering directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src/odbc' CC odbc.lo CC connectparams.lo CC convert_tds2sql.lo CC descriptor.lo CC prepare_query.lo CC odbc_util.lo CC native.lo CC sql2tds.lo CC error.lo CC odbc_checks.lo CC sqlwchar.lo CC odbc_data.lo CCLD libtdsodbc.la copying selected object files to avoid basename conflicts... make[4]: Leaving directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src/odbc' Making all in unittests make[4]: Entering directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src/odbc/unittests' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src/odbc/unittests' make[3]: Leaving directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src/odbc' make[2]: Leaving directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src/odbc' Making all in apps make[2]: Entering directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src/apps' Making all in fisql make[3]: Entering directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src/apps/fisql' CC fisql.o CC terminal.o CC edit.o CC handlers.o CC interrupt.o CCLD fisql make[3]: Leaving directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src/apps/fisql' make[3]: Entering directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src/apps' CC tsql.o CCLD tsql CC freebcp.o CCLD freebcp CC bsqldb.o CCLD bsqldb CC defncopy.o defncopy.c: In function 'get_login': defncopy.c:660:6: warning: variable 'fdomain' set but not used [-Wunused-but-set-variable] int fdomain = TRUE; ^ CCLD defncopy CC datacopy.o CCLD datacopy CC bsqlodbc-bsqlodbc.o CCLD bsqlodbc make[3]: Leaving directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src/apps' make[2]: Leaving directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src/apps' Making all in server make[2]: Entering directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src/server' CC query.lo CC server.lo CC login.lo CCLD libtdssrv.la copying selected object files to avoid basename conflicts... CC unittest.o CCLD tdssrv make[2]: Leaving directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src/server' Making all in pool make[2]: Entering directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src/pool' CC config.o CC main.o CC member.o CC user.o CC util.o CCLD tdspool make[2]: Leaving directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src/pool' make[2]: Entering directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src' make[2]: Nothing to be done for 'all-am'. make[2]: Leaving directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src' make[1]: Leaving directory '/opt3/dbs/tds/tmp/freetds-0.95.5/src' Making all in doc make[1]: Entering directory '/opt3/dbs/tds/tmp/freetds-0.95.5/doc' cd .. && /bin/sh ./config.status doc/freebcp.1 config.status: creating doc/freebcp.1 cd .. && /bin/sh ./config.status doc/tsql.1 config.status: creating doc/tsql.1 cd .. && /bin/sh ./config.status doc/osql.1 config.status: creating doc/osql.1 cd .. && /bin/sh ./config.status doc/bsqldb.1 config.status: creating doc/bsqldb.1 cd .. && /bin/sh ./config.status doc/bsqlodbc.1 config.status: creating doc/bsqlodbc.1 cd .. && /bin/sh ./config.status doc/defncopy.1 config.status: creating doc/defncopy.1 cd .. && /bin/sh ./config.status doc/datacopy.1 config.status: creating doc/datacopy.1 cd .. && /bin/sh ./config.status doc/fisql.1 config.status: creating doc/fisql.1 cd .. && /bin/sh ./config.status doc/freetds.conf.5 config.status: creating doc/freetds.conf.5 NAME=`echo dblib.api.body | sed 's/\..*$//'` && \ sed -ne "/^${NAME}[ ]/ s!!!p" \ ./api_status.txt \ | sed -e's![ ][ ]*! !g' \ -e's!$!!' > dblib.api.body~ mv dblib.api.body~ dblib.api.body NAME=`echo dblib.api.sgml | sed 's/\..*$//'` && \ HEAD=' Category Function Status Comments ' && \ if [ ${NAME} = dblib ]; then \ HEAD=`echo ' Category Function Status Comments ' \ | sed 's!Function !Microsoft nameSybase name!'`; \ fi && \ BODY=`cat dblib.api.body` && \ printf '&%s; API Implementation Summary\n \n %s\n \n %s\n
\n' ${NAME} ${NAME} "${HEAD}" "${BODY}" > dblib.api.sgml~ mv dblib.api.sgml~ dblib.api.sgml NAME=`echo ctlib.api.body | sed 's/\..*$//'` && \ sed -ne "/^${NAME}[ ]/ s!!!p" \ ./api_status.txt \ | sed -e's![ ][ ]*! !g' \ -e's!$!!' > ctlib.api.body~ mv ctlib.api.body~ ctlib.api.body NAME=`echo ctlib.api.sgml | sed 's/\..*$//'` && \ HEAD=' Category Function Status Comments ' && \ if [ ${NAME} = dblib ]; then \ HEAD=`echo ' Category Function Status Comments ' \ | sed 's!Function !Microsoft nameSybase name!'`; \ fi && \ BODY=`cat ctlib.api.body` && \ printf '&%s; API Implementation Summary\n \n %s\n \n %s\n
\n' ${NAME} ${NAME} "${HEAD}" "${BODY}" > ctlib.api.sgml~ mv ctlib.api.sgml~ ctlib.api.sgml NAME=`echo odbc.api.body | sed 's/\..*$//'` && \ sed -ne "/^${NAME}[ ]/ s!!!p" \ ./api_status.txt \ | sed -e's![ ][ ]*! !g' \ -e's!$!!' > odbc.api.body~ mv odbc.api.body~ odbc.api.body NAME=`echo odbc.api.sgml | sed 's/\..*$//'` && \ HEAD=' Category Function Status Comments ' && \ if [ ${NAME} = dblib ]; then \ HEAD=`echo ' Category Function Status Comments ' \ | sed 's!Function !Microsoft nameSybase name!'`; \ fi && \ BODY=`cat odbc.api.body` && \ printf '&%s; API Implementation Summary\n \n %s\n \n %s\n
\n' ${NAME} ${NAME} "${HEAD}" "${BODY}" > odbc.api.sgml~ mv odbc.api.sgml~ odbc.api.sgml sed -ne's!SYSTEM "docbook.dsl" CDATA!SYSTEM "" CDATA!; p' \ ./userguide.dsl.in > .userguide.dsl mv .userguide.dsl userguide.dsl if test -h userguide; then rm userguide; fi /bin/mkdir -p ./userguide 2>&1 touch ./userguide/t.htm rm -rf ./userguide/* make dblib.api.sgml ctlib.api.sgml odbc.api.sgml make[2]: Entering directory '/opt3/dbs/tds/tmp/freetds-0.95.5/doc' make[2]: 'dblib.api.sgml' is up to date. make[2]: 'ctlib.api.sgml' is up to date. make[2]: 'odbc.api.sgml' is up to date. make[2]: Leaving directory '/opt3/dbs/tds/tmp/freetds-0.95.5/doc' if test -z "" ; then \ if test -r ././userguide \ -a ! -r ./userguide ; then \ cp -R ././userguide .; \ fi; \ fi (cd ./userguide && \ if test -n "" ; then \ SRCDOC=../.; \ if test ! -r userguide.sgml; then \ ln -s ${SRCDOC}/userguide.sgml userguide.sgml; \ fi; \ openjade -b utf-8 -w all -w no-empty -w no-unused-param \ -d ../userguide.dsl -t sgml userguide.sgml; \ if test -h userguide.sgml; then rm userguide.sgml; fi; \ cp ${SRCDOC}/userguide.css .; \ fi) pwd is /opt3/dbs/tds/tmp/freetds-0.95.5/doc ls -ld `dirname userguide/index.htm` userguide/index.htm ls: cannot access userguide/index.htm: No such file or directory drwxr-xr-x 2 sf fjsadm 4096 Jun 19 10:50 userguide Makefile:780: recipe for target 'userguide/index.htm' failed make[1]: [userguide/index.htm] Error 2 (ignored) if test ! -r userguide/index.htm ; then \ echo '

at www.freetds.org ' > .index.htm && mv .index.htm userguide/index.htm; \ fi test -f ./userguide/index.htm (cd ./userguide && \ if test ! -h index.html ; then ln -s index.htm index.html; fi) make[1]: Leaving directory '/opt3/dbs/tds/tmp/freetds-0.95.5/doc' Making all in samples make[1]: Entering directory '/opt3/dbs/tds/tmp/freetds-0.95.5/samples' rm -f unixodbc.freetds.driver.template unixodbc.freetds.driver.template.tmp sed -e 's, at datadir\@,/opt3/dbs/tds/0.95.5/share/freetds,g' -e 's, at libdir\@,/opt3/dbs/tds/0.95.5/lib,g' -e 's, at prefix\@,/opt3/dbs/tds/0.95.5,g' unixodbc.freetds.driver.template.in >unixodbc.freetds.driver.template.tmp mv unixodbc.freetds.driver.template.tmp unixodbc.freetds.driver.template make[1]: Leaving directory '/opt3/dbs/tds/tmp/freetds-0.95.5/samples' Making all in win32 make[1]: Entering directory '/opt3/dbs/tds/tmp/freetds-0.95.5/win32' make[1]: Nothing to be done for 'all'. make[1]: Leaving directory '/opt3/dbs/tds/tmp/freetds-0.95.5/win32' Making all in vms make[1]: Entering directory '/opt3/dbs/tds/tmp/freetds-0.95.5/vms' make[1]: Nothing to be done for 'all'. make[1]: Leaving directory '/opt3/dbs/tds/tmp/freetds-0.95.5/vms' make[1]: Entering directory '/opt3/dbs/tds/tmp/freetds-0.95.5' make[1]: Nothing to be done for 'all-am'. make[1]: Leaving directory '/opt3/dbs/tds/tmp/freetds-0.95.5' if test ! -f PWD; then cp ./PWD.in PWD; fi From sf at 4js.com Fri Jun 19 05:49:07 2015 From: sf at 4js.com (Sebastien FLAESCH) Date: Fri, 19 Jun 2015 11:49:07 +0200 Subject: [freetds] DATE, TIME and DATETIME2 support Message-ID: <5583E593.10009@4js.com> Hello, Where can I find binding samples using DATE, TIME and DATETIME2? I could not find SQL_SS_TIME2_STRUCT in the header files... (Check sqlncli.h from SQL Server Native client) Seb From sf at 4js.com Fri Jun 19 06:53:26 2015 From: sf at 4js.com (Sebastien FLAESCH) Date: Fri, 19 Jun 2015 12:53:26 +0200 Subject: [freetds] XML type returns SQL_CHAR type Message-ID: <5583F4A6.3030200@4js.com> Seems that when using the XML type, SQLDescribeCol() returns SQL_CHAR, and precision=2147483647 ... expected? BTW what are [N]VARCHAR(MAX) types supposed to return in SQLDescribeCol()? Seb From randy at thesyrings.us Fri Jun 19 08:40:40 2015 From: randy at thesyrings.us (Randy Syring) Date: Fri, 19 Jun 2015 08:40:40 -0400 Subject: [freetds] semver? Message-ID: <55840DC8.7030005@thesyrings.us> Frediano, Any chance FreeTDS could switch to semver for versioning? I think the current logorithmic? method is kind of geeky (in a cool way), but likely causes more confusion than it's worth. *Randy Syring* Husband | Father | Redeemed Sinner /"For what does it profit a man to gain the whole world and forfeit his soul?" (Mark 8:36 ESV)/ From freddy77 at gmail.com Fri Jun 19 12:02:47 2015 From: freddy77 at gmail.com (Frediano Ziglio) Date: Fri, 19 Jun 2015 17:02:47 +0100 Subject: [freetds] semver? In-Reply-To: <55840DC8.7030005@thesyrings.us> References: <55840DC8.7030005@thesyrings.us> Message-ID: 2015-06-19 13:40 GMT+01:00 Randy Syring : > Frediano, > > Any chance FreeTDS could switch to semver for versioning? I think the > current logorithmic? method is kind of geeky (in a cool way), but likely > causes more confusion than it's worth. > > > *Randy Syring* > Husband | Father | Redeemed Sinner > > /"For what does it profit a man to gain the whole world > and forfeit his soul?" (Mark 8:36 ESV)/ Beside point 4 (major is still 0) we follow all the other. However changing major would conflict with point 8. Frediano From freddy77 at gmail.com Fri Jun 19 20:49:48 2015 From: freddy77 at gmail.com (Frediano Ziglio) Date: Sat, 20 Jun 2015 01:49:48 +0100 Subject: [freetds] Progress on AppVeyour Message-ID: Hi Ramiro, I'm following your progress on AppVeyor, quite interesting. Some things I notes: - you register odbc driver with odbcconf, you can use regsvr32, the driver should be able to register itself. Strange to use this program for registering an odbc driver instead of a COM component but I added this feature; - iconv seems not compiled (as tsql output), looks like some checks are not done in CMakeLists.txt and so some variable are not defined correctly; - similar for ODBC, on 64 bit for instance you get lot of problems as some define are not there (like HAVE_SQLLEN). Not your fault but can cause problems. I also added a fix for thread declatation, I'll look forward to see results from next compile with updated master to to check if they disappeared. It's a pity a thread returns a DWORD instead of a DWORD_PTR it's useful to pass a pointerand thread process data passes and return other data with another pointer. Frediano From dam at opencsw.org Sat Jun 20 05:27:36 2015 From: dam at opencsw.org (Dagobert Michelsen) Date: Sat, 20 Jun 2015 11:27:36 +0200 Subject: [freetds] semver? In-Reply-To: References: <55840DC8.7030005@thesyrings.us> Message-ID: Hi, Am 19.06.2015 um 18:02 schrieb Frediano Ziglio: > 2015-06-19 13:40 GMT+01:00 Randy Syring : >> Any chance FreeTDS could switch to semver for versioning? I think the >> current logorithmic? method is kind of geeky (in a cool way), but likely >> causes more confusion than it's worth. > > Beside point 4 (major is still 0) we follow all the other. However > changing major would conflict with point 8. Why is that? I guess we are talking about http://semver.org/ and point 8 says major version MAY include minor and patch level changes. So from my understanding semver allows major versions bumps at any time. Best regards -- Dago From freddy77 at gmail.com Sat Jun 20 06:24:56 2015 From: freddy77 at gmail.com (Frediano Ziglio) Date: Sat, 20 Jun 2015 11:24:56 +0100 Subject: [freetds] semver? In-Reply-To: References: <55840DC8.7030005@thesyrings.us> Message-ID: Il 20/Giu/2015 11:19, "Dagobert Michelsen" ha scritto: > > Hi, > > Am 19.06.2015 um 18:02 schrieb Frediano Ziglio: > > 2015-06-19 13:40 GMT+01:00 Randy Syring : > >> Any chance FreeTDS could switch to semver for versioning? I think the > >> current logorithmic? method is kind of geeky (in a cool way), but likely > >> causes more confusion than it's worth. > > > > Beside point 4 (major is still 0) we follow all the other. However > > changing major would conflict with point 8. > > Why is that? I guess we are talking about > http://semver.org/ > and point 8 says major version MAY include minor and patch level changes. > So from my understanding semver allows major versions bumps at any time. > > > Best regards > > -- Dago I think what both are trying to say is: "men, is time for a 1.xx release!" Yes, it's time. I'll bump master to 0.99 to state that. Frediano From freddy77 at gmail.com Sat Jun 20 06:30:13 2015 From: freddy77 at gmail.com (Frediano Ziglio) Date: Sat, 20 Jun 2015 11:30:13 +0100 Subject: [freetds] XML type returns SQL_CHAR type In-Reply-To: <5583F4A6.3030200@4js.com> References: <5583F4A6.3030200@4js.com> Message-ID: Il 19/Giu/2015 11:53, "Sebastien FLAESCH" ha scritto: > > Seems that when using the XML type, SQLDescribeCol() returns SQL_CHAR, and > precision=2147483647 ... expected? > > BTW what are [N]VARCHAR(MAX) types supposed to return in SQLDescribeCol()? > > Seb > don't remember. Should be part of describecol test. Frediano From freddy77 at gmail.com Sat Jun 20 06:33:54 2015 From: freddy77 at gmail.com (Frediano Ziglio) Date: Sat, 20 Jun 2015 11:33:54 +0100 Subject: [freetds] Testing 0.95 In-Reply-To: <5583DA51.7080708@4js.com> References: <5583DA51.7080708@4js.com> Message-ID: Il 19/Giu/2015 10:33, "Sebastien FLAESCH" ha scritto: > > Hi all, > > Just installed 0.95.5 got from: ftp://ftp.freetds.org/pub/freetds/stable/ > (I guess this is the latest stable version?) > > Attached some compilation warnings... > Yes, no problems > Is there an configure option to turn on gcc's address sanitizer? Just define CFLAGS properly calling configure. > We are using this option in our product. > For production?? You known is not meant for production? It slows down quite a lot. > So far, my QA tests ran ok against SQL Server 2005, will test on other servers. > > Seems that new datetime data types are now supported which is good news! > As stated in the news :) > Cheers > Seb > Frediano From freddy77 at gmail.com Sat Jun 20 06:35:54 2015 From: freddy77 at gmail.com (Frediano Ziglio) Date: Sat, 20 Jun 2015 11:35:54 +0100 Subject: [freetds] DATE, TIME and DATETIME2 support In-Reply-To: <5583E593.10009@4js.com> References: <5583E593.10009@4js.com> Message-ID: Il 19/Giu/2015 10:49, "Sebastien FLAESCH" ha scritto: > > Hello, > > Where can I find binding samples using DATE, TIME and DATETIME2? > > I could not find SQL_SS_TIME2_STRUCT in the header files... > > (Check sqlncli.h from SQL Server Native client) > > Yes, same structure. Is crafted in a strange way. Yes, perhaps we should define it in an installed header. Don't remember if we install some headers for ODBC. Frediano From rrankins at gothamconsulting.com Sat Jun 20 09:18:30 2015 From: rrankins at gothamconsulting.com (Ray Rankins) Date: Sat, 20 Jun 2015 09:18:30 -0400 Subject: [freetds] 0.91 freebcp performance Message-ID: <12d701d0ab5b$9a893000$cf9b9000$@gothamconsulting.com> Just tested running a large bcp with 0.91 freebcp and the performance was awful. Took 1.5 hours to load 5 million rows (conversely, Sybase bcp loaded the same file in 1.5 minutes). Is there some setting that might be on during compile that would cause freebcp to run slow. I checked and double checked that the debug flags were not enabled (have made that mistake before) and they were not. Are there any compile time options that could slow down freebcp that I should make sure are disabled when I compile it? -Ray From matthew.green at datamartcomputing.com Sat Jun 20 09:40:20 2015 From: matthew.green at datamartcomputing.com (Matthew) Date: Sat, 20 Jun 2015 15:40:20 +0200 Subject: [freetds] 0.91 freebcp performance In-Reply-To: <12d701d0ab5b$9a893000$cf9b9000$@gothamconsulting.com> References: <12d701d0ab5b$9a893000$cf9b9000$@gothamconsulting.com> Message-ID: <55856D44.70208@datamartcomputing.com> Hi Ray, I did come across performance problems when compared to Sybase bcp but those were mostly around text and image data types. Those problems appeared to be fixed, in my testing, or at least greatly improved when I tried a nightly from a few weeks ago. What's the definition of the table you are using and which flags are you using? Can you take a look inside the Sybase server and see what it's waiting for when you use freetds and which packet size the connection is using? I assume your comparison is from the same machine and it's not the case that you're running the Sybase bcp locally and freetds remotely? Can you see if both are using fast bcp, i.e. minimally logged or are both using fully logged? Just some ideas unless someone else has got better ones! Cheers, Matthew On 20/06/15 15:18, Ray Rankins wrote: > Just tested running a large bcp with 0.91 freebcp and the performance was awful. > Took 1.5 hours to load 5 million rows (conversely, Sybase bcp loaded the same file in 1.5 minutes). > Is there some setting that might be on during compile that would cause freebcp to run slow. > I checked and double checked that the debug flags were not enabled (have made that mistake before) and they were not. > Are there any compile time options that could slow down freebcp that I should make sure are disabled when I compile it? > > -Ray > > > > _______________________________________________ > FreeTDS mailing list > FreeTDS at lists.ibiblio.org > http://lists.ibiblio.org/mailman/listinfo/freetds From sf at 4js.com Sun Jun 21 03:04:25 2015 From: sf at 4js.com (Sebastien FLAESCH) Date: Sun, 21 Jun 2015 09:04:25 +0200 Subject: [freetds] Testing 0.95 In-Reply-To: References: <5583DA51.7080708@4js.com> Message-ID: <558661F9.9000106@4js.com> Hi Frediano! On 06/20/2015 12:33 PM, Frediano Ziglio wrote: > Il 19/Giu/2015 10:33, "Sebastien FLAESCH" ha scritto: >> >> Hi all, >> >> Just installed 0.95.5 got from: ftp://ftp.freetds.org/pub/freetds/stable/ >> (I guess this is the latest stable version?) >> >> Attached some compilation warnings... >> > > Yes, no problems > >> Is there an configure option to turn on gcc's address sanitizer? > > Just define CFLAGS properly calling configure. > >> We are using this option in our product. >> > > For production?? You known is not meant for production? It slows down quite > a lot. No of course it's just for internal compilation, production releases are compiled with optimization flags... Seb >> So far, my QA tests ran ok against SQL Server 2005, will test on other > servers. >> >> Seems that new datetime data types are now supported which is good news! >> > > As stated in the news :) > >> Cheers >> Seb >> > > Frediano > _______________________________________________ > FreeTDS mailing list > FreeTDS at lists.ibiblio.org > http://lists.ibiblio.org/mailman/listinfo/freetds > From sf at 4js.com Sun Jun 21 03:07:13 2015 From: sf at 4js.com (Sebastien FLAESCH) Date: Sun, 21 Jun 2015 09:07:13 +0200 Subject: [freetds] DATE, TIME and DATETIME2 support In-Reply-To: References: <5583E593.10009@4js.com> Message-ID: <558662A1.1050307@4js.com> On 06/20/2015 12:35 PM, Frediano Ziglio wrote: > Il 19/Giu/2015 10:49, "Sebastien FLAESCH" ha scritto: >> >> Hello, >> >> Where can I find binding samples using DATE, TIME and DATETIME2? >> >> I could not find SQL_SS_TIME2_STRUCT in the header files... >> >> (Check sqlncli.h from SQL Server Native client) >> >> > > Yes, same structure. Is crafted in a strange way. > > Yes, perhaps we should define it in an installed header. Don't remember if > we install some headers for ODBC. So I just need to define the same structures/defines as in sqlncli.h and (basically) bind as within SQL Native Client ODBC? Maybe there are some test cases I can look at? Seb > Frediano > _______________________________________________ > FreeTDS mailing list > FreeTDS at lists.ibiblio.org > http://lists.ibiblio.org/mailman/listinfo/freetds > From sf at 4js.com Sun Jun 21 04:21:53 2015 From: sf at 4js.com (Sebastien FLAESCH) Date: Sun, 21 Jun 2015 10:21:53 +0200 Subject: [freetds] XML type returns SQL_CHAR type In-Reply-To: References: <5583F4A6.3030200@4js.com> Message-ID: <55867421.3070804@4js.com> On 06/20/2015 12:30 PM, Frediano Ziglio wrote: > Il 19/Giu/2015 11:53, "Sebastien FLAESCH" ha scritto: >> >> Seems that when using the XML type, SQLDescribeCol() returns SQL_CHAR, and >> precision=2147483647 ... expected? >> >> BTW what are [N]VARCHAR(MAX) types supposed to return in SQLDescribeCol()? >> >> Seb >> > > don't remember. Should be part of describecol test. > > Frediano > _______________________________________________ > FreeTDS mailing list > FreeTDS at lists.ibiblio.org > http://lists.ibiblio.org/mailman/listinfo/freetds > From: https://technet.microsoft.com/en-us/library/ms130896%28v=sql.110%29.aspx (very end of page) SQL Server Native Client ODBC Driver The SQL Server Native Client ODBC driver exposes the varchar(max), varbinary(max) and nvarchar(max) types as SQL_VARCHAR, SQL_VARBINARY, and SQL_WVARCHAR in ODBC API functions that accept or return ODBC SQL data types. When reporting the maximum size of a column, the driver will report either: - The defined maximum size, which for example, is 2000 for a varchar(2000) column, or - The value "unlimited" which in the case of a varchar(max) column equals 0. ... From rrankins at gothamconsulting.com Mon Jun 22 13:10:38 2015 From: rrankins at gothamconsulting.com (Ray Rankins) Date: Mon, 22 Jun 2015 13:10:38 -0400 Subject: [freetds] 0.91 freebcp performance In-Reply-To: <55856D44.70208@datamartcomputing.com> References: <12d701d0ab5b$9a893000$cf9b9000$@gothamconsulting.com> <55856D44.70208@datamartcomputing.com> Message-ID: <180601d0ad0e$5cce5d80$166b1880$@gothamconsulting.com> Thanks Matt, I might expect some slight performance degradation compared to Sybase bcp (or SQL Server bcp), but I'm seeing orders of magnitude degradation (1.5 minutes versus 1.5 hours for 5 million rows). The table is pretty simple - no large object types. Mostly int and float fields. Largest char field is 7 characters. There is one non-nulllable date field at the end which has a default - freebcp didn't like that the file didn't contain a value for the last field, but I worked around this using a format file or by making the last field nullable. CREATE TABLE [dbo].[test_table]( [val_geo] [char](5) NOT NULL, [cd_wrsi_mdl] [smallint] NOT NULL, [cd_geo_srce] [int] NOT NULL, [cd_ppty_type_cpr] [char](1) NOT NULL, [cd_mrtg_purp_altv] [char](4) NOT NULL, [text_grth_multr_mol] [char](7) NOT NULL, [cd_geo_type] [smallint] NULL, [rate_grth_multr] [float] NULL, [rate_std_dev_neg] [float] NULL, [rate_std_dev_pstv] [float] NULL, [dt_lst_updt] [date] default getdate()NULL ) Initially, I was running freebcp from a Solaris host to SQL Server on Windows, but then I tested Sybase bcp and freebcp both running on the same Solaris client and importing into the same ASE server running on a Linux host, so it was an apples to apples comparison between the 2. The import file is a text file, so the flags I'm using are -c, -t, -r with the -b to set a batch size of 10000 Also tried -f with a format file and there was no noticeable performance difference (although there did appear to be a bug when using the format file where seemed to ignore the -b option). I don't have much access to the Sybase server to do too much monitoring, but what I could see, it seemed like it was waiting on network I/O most of the time. Is there and easy way to tell of the BCP is using fast bcp versus fully logged besides looking at what's being written to the log file? -Ray > -----Original Message----- > From: FreeTDS [mailto:freetds-bounces at lists.ibiblio.org] On Behalf Of > Matthew > Sent: Saturday, June 20, 2015 9:40 AM > To: FreeTDS Development Group > Subject: Re: [freetds] 0.91 freebcp performance > > Hi Ray, > > I did come across performance problems when compared to Sybase bcp but > those were mostly around text and image data types. Those problems > appeared to be fixed, in my testing, or at least greatly improved when I > tried a nightly from a few weeks ago. > > What's the definition of the table you are using and which flags are you > using? Can you take a look inside the Sybase server and see what it's > waiting for when you use freetds and which packet size the connection is > using? I assume your comparison is from the same machine and it's not > the case that you're running the Sybase bcp locally and freetds > remotely? Can you see if both are using fast bcp, i.e. minimally logged > or are both using fully logged? > > Just some ideas unless someone else has got better ones! > > Cheers, > > Matthew > > > On 20/06/15 15:18, Ray Rankins wrote: > > Just tested running a large bcp with 0.91 freebcp and the performance was > awful. > > Took 1.5 hours to load 5 million rows (conversely, Sybase bcp loaded the > same file in 1.5 minutes). > > Is there some setting that might be on during compile that would cause > freebcp to run slow. > > I checked and double checked that the debug flags were not enabled (have > made that mistake before) and they were not. > > Are there any compile time options that could slow down freebcp that I > should make sure are disabled when I compile it? > > > > -Ray > > > > > > > > _______________________________________________ > > FreeTDS mailing list > > FreeTDS at lists.ibiblio.org > > http://lists.ibiblio.org/mailman/listinfo/freetds > > _______________________________________________ > FreeTDS mailing list > FreeTDS at lists.ibiblio.org > http://lists.ibiblio.org/mailman/listinfo/freetds From dchang at fsautomation.com Mon Jun 22 14:47:11 2015 From: dchang at fsautomation.com (David Chang) Date: Mon, 22 Jun 2015 11:47:11 -0700 Subject: [freetds] 0.91 freebcp performance In-Reply-To: <180601d0ad0e$5cce5d80$166b1880$@gothamconsulting.com> References: <12d701d0ab5b$9a893000$cf9b9000$@gothamconsulting.com> <55856D44.70208@datamartcomputing.com> <180601d0ad0e$5cce5d80$166b1880$@gothamconsulting.com> Message-ID: <5588582F.9000500@fsautomation.com> Ray, I don't use freebcp, but for Sybase bcp, it runs the fast bcp (non-logged) if you don't have any indexes on the table. Thus, for large tables, we usually drop the indexes, run the bcp, then create the indexes again. However, if you are running freebcp and Sybase bcp on the same exact client and server with the same exact bcp import file to the same exact database table, I think you've uncovered a bug in freebcp. Your table is very narrow (less than 100 bytes wide). You have very little data (5M rows). I would expect to insert this amount of data into Sybase in about a minute. To test out the fast bcp versus slow bcp, I would create a new table with the same table structure (but no indexes) and test out freebcp against it. DC On 6/22/2015 10:10 AM, Ray Rankins wrote: > Thanks Matt, > I might expect some slight performance degradation compared to Sybase bcp (or SQL Server bcp), but I'm seeing orders of magnitude degradation (1.5 minutes versus 1.5 hours for 5 million rows). > > The table is pretty simple - no large object types. > Mostly int and float fields. Largest char field is 7 characters. > There is one non-nulllable date field at the end which has a default - freebcp didn't like that the file didn't contain a value for the last field, but I worked around this using a format file or by making the last field nullable. > > CREATE TABLE [dbo].[test_table]( > [val_geo] [char](5) NOT NULL, > [cd_wrsi_mdl] [smallint] NOT NULL, > [cd_geo_srce] [int] NOT NULL, > [cd_ppty_type_cpr] [char](1) NOT NULL, > [cd_mrtg_purp_altv] [char](4) NOT NULL, > [text_grth_multr_mol] [char](7) NOT NULL, > [cd_geo_type] [smallint] NULL, > [rate_grth_multr] [float] NULL, > [rate_std_dev_neg] [float] NULL, > [rate_std_dev_pstv] [float] NULL, > [dt_lst_updt] [date] default getdate()NULL > ) > > Initially, I was running freebcp from a Solaris host to SQL Server on Windows, but then I tested Sybase bcp and freebcp both running on the same Solaris client and importing into the same ASE server running on a Linux host, so it was an apples to apples comparison between the 2. > > The import file is a text file, so the flags I'm using are -c, -t, -r with the -b to set a batch size of 10000 > Also tried -f with a format file and there was no noticeable performance difference (although there did appear to be a bug when using the format file where seemed to ignore the -b option). > > I don't have much access to the Sybase server to do too much monitoring, but what I could see, it seemed like it was waiting on network I/O most of the time. > Is there and easy way to tell of the BCP is using fast bcp versus fully logged besides looking at what's being written to the log file? > > -Ray > >> -----Original Message----- >> From: FreeTDS [mailto:freetds-bounces at lists.ibiblio.org] On Behalf Of >> Matthew >> Sent: Saturday, June 20, 2015 9:40 AM >> To: FreeTDS Development Group >> Subject: Re: [freetds] 0.91 freebcp performance >> >> Hi Ray, >> >> I did come across performance problems when compared to Sybase bcp but >> those were mostly around text and image data types. Those problems >> appeared to be fixed, in my testing, or at least greatly improved when I >> tried a nightly from a few weeks ago. >> >> What's the definition of the table you are using and which flags are you >> using? Can you take a look inside the Sybase server and see what it's >> waiting for when you use freetds and which packet size the connection is >> using? I assume your comparison is from the same machine and it's not >> the case that you're running the Sybase bcp locally and freetds >> remotely? Can you see if both are using fast bcp, i.e. minimally logged >> or are both using fully logged? >> >> Just some ideas unless someone else has got better ones! >> >> Cheers, >> >> Matthew >> >> >> On 20/06/15 15:18, Ray Rankins wrote: >>> Just tested running a large bcp with 0.91 freebcp and the performance was >> awful. >>> Took 1.5 hours to load 5 million rows (conversely, Sybase bcp loaded the >> same file in 1.5 minutes). >>> Is there some setting that might be on during compile that would cause >> freebcp to run slow. >>> I checked and double checked that the debug flags were not enabled (have >> made that mistake before) and they were not. >>> Are there any compile time options that could slow down freebcp that I >> should make sure are disabled when I compile it? >>> -Ray >>> >>> >>> >>> _______________________________________________ >>> FreeTDS mailing list >>> FreeTDS at lists.ibiblio.org >>> http://lists.ibiblio.org/mailman/listinfo/freetds >> _______________________________________________ >> FreeTDS mailing list >> FreeTDS at lists.ibiblio.org >> http://lists.ibiblio.org/mailman/listinfo/freetds > _______________________________________________ > FreeTDS mailing list > FreeTDS at lists.ibiblio.org > http://lists.ibiblio.org/mailman/listinfo/freetds From sf at 4js.com Tue Jun 23 09:03:27 2015 From: sf at 4js.com (Sebastien FLAESCH) Date: Tue, 23 Jun 2015 15:03:27 +0200 Subject: [freetds] Testing 0.95: What TDS version for SQL Server 2012 / 2014? In-Reply-To: <558661F9.9000106@4js.com> References: <5583DA51.7080708@4js.com> <558661F9.9000106@4js.com> Message-ID: <5589591F.2050608@4js.com> I connect to SQL Server 2014 using FreeTDS 0.95.5 from a Linux Debian 64b... To me SQLDescribeCol() returns unusable type info... According to the TDS_Version, I different (incompatible) type info: TDS Column Type sqltype precision scale --------------------------------------------------------------------------------- 7.1 VARCHAR(MAX) -1 (SQL_LONGVARCHAR) 2147483647 0 (ok) 7.2 VARCHAR(MAX) 12 (SQL_VARCHAR) 1073741823 0 ??? 7.3 VARCHAR(MAX) 12 (SQL_VARCHAR) 1073741823 0 ??? 7.1 TIME(3) -9 ??? 12 0 (should be 3) 7.2 TIME(3) -9 ??? 12 0 (should be 3) 7.3 TIME(3) -154 (SQL_SS_TIME2/ok) 12 0 (should be 3) What TDS version should I use with SQL Server 2014? Is there a doc reference somewhere? Same problems with SQL Server 2012 ... Seb On 06/21/2015 09:04 AM, Sebastien FLAESCH wrote: > Hi Frediano! > > On 06/20/2015 12:33 PM, Frediano Ziglio wrote: >> Il 19/Giu/2015 10:33, "Sebastien FLAESCH" ha scritto: >>> >>> Hi all, >>> >>> Just installed 0.95.5 got from: ftp://ftp.freetds.org/pub/freetds/stable/ >>> (I guess this is the latest stable version?) >>> >>> Attached some compilation warnings... >>> >> >> Yes, no problems >> >>> Is there an configure option to turn on gcc's address sanitizer? >> >> Just define CFLAGS properly calling configure. >> >>> We are using this option in our product. >>> >> >> For production?? You known is not meant for production? It slows down quite >> a lot. > > No of course it's just for internal compilation, production releases > are compiled with optimization flags... > > Seb >>> So far, my QA tests ran ok against SQL Server 2005, will test on other >> servers. >>> >>> Seems that new datetime data types are now supported which is good news! >>> >> >> As stated in the news :) >> >>> Cheers >>> Seb >>> >> >> Frediano >> _______________________________________________ >> FreeTDS mailing list >> FreeTDS at lists.ibiblio.org >> http://lists.ibiblio.org/mailman/listinfo/freetds >> > > _______________________________________________ > FreeTDS mailing list > FreeTDS at lists.ibiblio.org > http://lists.ibiblio.org/mailman/listinfo/freetds > From randy at thesyrings.us Tue Jun 23 09:24:07 2015 From: randy at thesyrings.us (Randy Syring) Date: Tue, 23 Jun 2015 09:24:07 -0400 Subject: [freetds] Testing 0.95: What TDS version for SQL Server 2012 / 2014? In-Reply-To: <5589591F.2050608@4js.com> References: <5583DA51.7080708@4js.com> <558661F9.9000106@4js.com> <5589591F.2050608@4js.com> Message-ID: <55895DF7.1090409@thesyrings.us> Sebastian, More info on TDS protocols are here: http://www.freetds.org/userguide/choosingtdsprotocol.htm Microsoft servers are backwards compatible with previous TDS versions but you should generally use the latest TDS version supported by the server in order to get support for that server's capabilities (varchar(max), date, time, etc.). *Randy Syring* Husband | Father | Redeemed Sinner /"For what does it profit a man to gain the whole world and forfeit his soul?" (Mark 8:36 ESV)/ On 06/23/2015 09:03 AM, Sebastien FLAESCH wrote: > I connect to SQL Server 2014 using FreeTDS 0.95.5 from a Linux Debian > 64b... > > To me SQLDescribeCol() returns unusable type info... > > According to the TDS_Version, I different (incompatible) type info: > > TDS Column Type sqltype precision scale > --------------------------------------------------------------------------------- > > 7.1 VARCHAR(MAX) -1 (SQL_LONGVARCHAR) 2147483647 0 > (ok) > 7.2 VARCHAR(MAX) 12 (SQL_VARCHAR) 1073741823 0 > ??? > 7.3 VARCHAR(MAX) 12 (SQL_VARCHAR) 1073741823 0 > ??? > > 7.1 TIME(3) -9 ??? 12 0 > (should be 3) > 7.2 TIME(3) -9 ??? 12 0 > (should be 3) > 7.3 TIME(3) -154 (SQL_SS_TIME2/ok) 12 0 > (should be 3) > > What TDS version should I use with SQL Server 2014? > > Is there a doc reference somewhere? > > Same problems with SQL Server 2012 ... > > Seb > > On 06/21/2015 09:04 AM, Sebastien FLAESCH wrote: >> Hi Frediano! >> >> On 06/20/2015 12:33 PM, Frediano Ziglio wrote: >>> Il 19/Giu/2015 10:33, "Sebastien FLAESCH" ha scritto: >>>> >>>> Hi all, >>>> >>>> Just installed 0.95.5 got from: >>>> ftp://ftp.freetds.org/pub/freetds/stable/ >>>> (I guess this is the latest stable version?) >>>> >>>> Attached some compilation warnings... >>>> >>> >>> Yes, no problems >>> >>>> Is there an configure option to turn on gcc's address sanitizer? >>> >>> Just define CFLAGS properly calling configure. >>> >>>> We are using this option in our product. >>>> >>> >>> For production?? You known is not meant for production? It slows >>> down quite >>> a lot. >> >> No of course it's just for internal compilation, production releases >> are compiled with optimization flags... >> >> Seb >>>> So far, my QA tests ran ok against SQL Server 2005, will test on other >>> servers. >>>> >>>> Seems that new datetime data types are now supported which is good >>>> news! >>>> >>> >>> As stated in the news :) >>> >>>> Cheers >>>> Seb >>>> >>> >>> Frediano >>> _______________________________________________ >>> FreeTDS mailing list >>> FreeTDS at lists.ibiblio.org >>> http://lists.ibiblio.org/mailman/listinfo/freetds >>> >> >> _______________________________________________ >> FreeTDS mailing list >> FreeTDS at lists.ibiblio.org >> http://lists.ibiblio.org/mailman/listinfo/freetds >> > > _______________________________________________ > FreeTDS mailing list > FreeTDS at lists.ibiblio.org > http://lists.ibiblio.org/mailman/listinfo/freetds > From rrankins at gothamconsulting.com Tue Jun 23 09:29:22 2015 From: rrankins at gothamconsulting.com (Ray Rankins) Date: Tue, 23 Jun 2015 09:29:22 -0400 Subject: [freetds] 0.91 freebcp performance In-Reply-To: <5588582F.9000500@fsautomation.com> References: <12d701d0ab5b$9a893000$cf9b9000$@gothamconsulting.com> <55856D44.70208@datamartcomputing.com> <180601d0ad0e$5cce5d80$166b1880$@gothamconsulting.com> <5588582F.9000500@fsautomation.com> Message-ID: <1a1401d0adb8$9e47aeb0$dad70c10$@gothamconsulting.com> Thanks David. I was thinking more deeply regarding fast bcp versus "slow" bcp beyond just whether there was an index or not. Been working more in SQL Server these days and whether you get minimally logged bcp there depends on indexes, triggers, as well as the recovery model chosen. Anyway, whether fast or slow bcp, I compared Sybase versus freebcp both with and without indexes on the table and 0.91 version of freebcp was considerably slower in both cases. Performance without indexes still was not acceptable. I downloaded and built 0.95 last night and tested the freebcp included with that and that was just as fast (and possibly slightly faster) than the Sybase bcp. So now I guess it may be a matter of convincing them to switch to 0.95, but they are pretty far along in their testing cycle, so it might not be feasible at this point as they'd probably have to go back and regression test everything again. -Ray > -----Original Message----- > From: FreeTDS [mailto:freetds-bounces at lists.ibiblio.org] On Behalf Of David > Chang > Sent: Monday, June 22, 2015 2:47 PM > To: FreeTDS Development Group > Subject: Re: [freetds] 0.91 freebcp performance > > Ray, > > I don't use freebcp, but for Sybase bcp, it runs the fast bcp > (non-logged) if you don't have any indexes on the table. Thus, for > large tables, we usually drop the indexes, run the bcp, then create the > indexes again. > > However, if you are running freebcp and Sybase bcp on the same exact > client and server with the same exact bcp import file to the same exact > database table, I think you've uncovered a bug in freebcp. > > Your table is very narrow (less than 100 bytes wide). You have very > little data (5M rows). I would expect to insert this amount of data > into Sybase in about a minute. > > To test out the fast bcp versus slow bcp, I would create a new table > with the same table structure (but no indexes) and test out freebcp > against it. > > DC > > On 6/22/2015 10:10 AM, Ray Rankins wrote: > > Thanks Matt, > > I might expect some slight performance degradation compared to Sybase > bcp (or SQL Server bcp), but I'm seeing orders of magnitude degradation (1.5 > minutes versus 1.5 hours for 5 million rows). > > > > The table is pretty simple - no large object types. > > Mostly int and float fields. Largest char field is 7 characters. > > There is one non-nulllable date field at the end which has a default - > freebcp didn't like that the file didn't contain a value for the last field, but I > worked around this using a format file or by making the last field nullable. > > > > CREATE TABLE [dbo].[test_table]( > > [val_geo] [char](5) NOT NULL, > > [cd_wrsi_mdl] [smallint] NOT NULL, > > [cd_geo_srce] [int] NOT NULL, > > [cd_ppty_type_cpr] [char](1) NOT NULL, > > [cd_mrtg_purp_altv] [char](4) NOT NULL, > > [text_grth_multr_mol] [char](7) NOT NULL, > > [cd_geo_type] [smallint] NULL, > > [rate_grth_multr] [float] NULL, > > [rate_std_dev_neg] [float] NULL, > > [rate_std_dev_pstv] [float] NULL, > > [dt_lst_updt] [date] default getdate()NULL > > ) > > > > Initially, I was running freebcp from a Solaris host to SQL Server on > Windows, but then I tested Sybase bcp and freebcp both running on the > same Solaris client and importing into the same ASE server running on a Linux > host, so it was an apples to apples comparison between the 2. > > > > The import file is a text file, so the flags I'm using are -c, -t, -r with the -b to > set a batch size of 10000 > > Also tried -f with a format file and there was no noticeable performance > difference (although there did appear to be a bug when using the format file > where seemed to ignore the -b option). > > > > I don't have much access to the Sybase server to do too much monitoring, > but what I could see, it seemed like it was waiting on network I/O most of > the time. > > Is there and easy way to tell of the BCP is using fast bcp versus fully logged > besides looking at what's being written to the log file? > > > > -Ray > > > >> -----Original Message----- > >> From: FreeTDS [mailto:freetds-bounces at lists.ibiblio.org] On Behalf Of > >> Matthew > >> Sent: Saturday, June 20, 2015 9:40 AM > >> To: FreeTDS Development Group > >> Subject: Re: [freetds] 0.91 freebcp performance > >> > >> Hi Ray, > >> > >> I did come across performance problems when compared to Sybase bcp > but > >> those were mostly around text and image data types. Those problems > >> appeared to be fixed, in my testing, or at least greatly improved when I > >> tried a nightly from a few weeks ago. > >> > >> What's the definition of the table you are using and which flags are you > >> using? Can you take a look inside the Sybase server and see what it's > >> waiting for when you use freetds and which packet size the connection is > >> using? I assume your comparison is from the same machine and it's not > >> the case that you're running the Sybase bcp locally and freetds > >> remotely? Can you see if both are using fast bcp, i.e. minimally logged > >> or are both using fully logged? > >> > >> Just some ideas unless someone else has got better ones! > >> > >> Cheers, > >> > >> Matthew > >> > >> > >> On 20/06/15 15:18, Ray Rankins wrote: > >>> Just tested running a large bcp with 0.91 freebcp and the performance > was > >> awful. > >>> Took 1.5 hours to load 5 million rows (conversely, Sybase bcp loaded the > >> same file in 1.5 minutes). > >>> Is there some setting that might be on during compile that would cause > >> freebcp to run slow. > >>> I checked and double checked that the debug flags were not enabled > (have > >> made that mistake before) and they were not. > >>> Are there any compile time options that could slow down freebcp that I > >> should make sure are disabled when I compile it? > >>> -Ray > >>> > >>> > >>> > >>> _______________________________________________ > >>> FreeTDS mailing list > >>> FreeTDS at lists.ibiblio.org > >>> http://lists.ibiblio.org/mailman/listinfo/freetds > >> _______________________________________________ > >> FreeTDS mailing list > >> FreeTDS at lists.ibiblio.org > >> http://lists.ibiblio.org/mailman/listinfo/freetds > > _______________________________________________ > > FreeTDS mailing list > > FreeTDS at lists.ibiblio.org > > http://lists.ibiblio.org/mailman/listinfo/freetds > > _______________________________________________ > FreeTDS mailing list > FreeTDS at lists.ibiblio.org > http://lists.ibiblio.org/mailman/listinfo/freetds From sf at 4js.com Tue Jun 23 10:15:05 2015 From: sf at 4js.com (Sebastien FLAESCH) Date: Tue, 23 Jun 2015 16:15:05 +0200 Subject: [freetds] Testing 0.95: What TDS version for SQL Server 2012 / 2014? In-Reply-To: <55895DF7.1090409@thesyrings.us> References: <5583DA51.7080708@4js.com> <558661F9.9000106@4js.com> <5589591F.2050608@4js.com> <55895DF7.1090409@thesyrings.us> Message-ID: <558969E9.5050500@4js.com> Thank you Randy, but according to my tests, VARCHAR(MAX) works with TDS 7.1, but not with 7.3, and I want to use 7.3 to have datetime2(n)/time(n) support. I see also that SQL Server 2012 / 2014 are not listed in the choosingtdsprotocol.htm page... would be nice that someone clarifies if these server versions are supported. S. On 06/23/2015 03:24 PM, Randy Syring wrote: > Sebastian, > > More info on TDS protocols are here: > > http://www.freetds.org/userguide/choosingtdsprotocol.htm > > Microsoft servers are backwards compatible with previous TDS versions but you should generally use the latest TDS version supported by the server in > order to get support for that server's capabilities (varchar(max), date, time, etc.). > > *Randy Syring* > Husband | Father | Redeemed Sinner > > /"For what does it profit a man to gain the whole world > and forfeit his soul?" (Mark 8:36 ESV)/ > > On 06/23/2015 09:03 AM, Sebastien FLAESCH wrote: >> I connect to SQL Server 2014 using FreeTDS 0.95.5 from a Linux Debian 64b... >> >> To me SQLDescribeCol() returns unusable type info... >> >> According to the TDS_Version, I different (incompatible) type info: >> >> TDS Column Type sqltype precision scale >> --------------------------------------------------------------------------------- >> 7.1 VARCHAR(MAX) -1 (SQL_LONGVARCHAR) 2147483647 0 (ok) >> 7.2 VARCHAR(MAX) 12 (SQL_VARCHAR) 1073741823 0 ??? >> 7.3 VARCHAR(MAX) 12 (SQL_VARCHAR) 1073741823 0 ??? >> >> 7.1 TIME(3) -9 ??? 12 0 (should be 3) >> 7.2 TIME(3) -9 ??? 12 0 (should be 3) >> 7.3 TIME(3) -154 (SQL_SS_TIME2/ok) 12 0 (should be 3) >> >> What TDS version should I use with SQL Server 2014? >> >> Is there a doc reference somewhere? >> >> Same problems with SQL Server 2012 ... >> >> Seb >> >> On 06/21/2015 09:04 AM, Sebastien FLAESCH wrote: >>> Hi Frediano! >>> >>> On 06/20/2015 12:33 PM, Frediano Ziglio wrote: >>>> Il 19/Giu/2015 10:33, "Sebastien FLAESCH" ha scritto: >>>>> >>>>> Hi all, >>>>> >>>>> Just installed 0.95.5 got from: ftp://ftp.freetds.org/pub/freetds/stable/ >>>>> (I guess this is the latest stable version?) >>>>> >>>>> Attached some compilation warnings... >>>>> >>>> >>>> Yes, no problems >>>> >>>>> Is there an configure option to turn on gcc's address sanitizer? >>>> >>>> Just define CFLAGS properly calling configure. >>>> >>>>> We are using this option in our product. >>>>> >>>> >>>> For production?? You known is not meant for production? It slows down quite >>>> a lot. >>> >>> No of course it's just for internal compilation, production releases >>> are compiled with optimization flags... >>> >>> Seb >>>>> So far, my QA tests ran ok against SQL Server 2005, will test on other >>>> servers. >>>>> >>>>> Seems that new datetime data types are now supported which is good news! >>>>> >>>> >>>> As stated in the news :) >>>> >>>>> Cheers >>>>> Seb >>>>> >>>> >>>> Frediano >>>> _______________________________________________ >>>> FreeTDS mailing list >>>> FreeTDS at lists.ibiblio.org >>>> http://lists.ibiblio.org/mailman/listinfo/freetds >>>> >>> >>> _______________________________________________ >>> FreeTDS mailing list >>> FreeTDS at lists.ibiblio.org >>> http://lists.ibiblio.org/mailman/listinfo/freetds >>> >> >> _______________________________________________ >> FreeTDS mailing list >> FreeTDS at lists.ibiblio.org >> http://lists.ibiblio.org/mailman/listinfo/freetds >> > From freddy77 at gmail.com Tue Jun 23 16:25:11 2015 From: freddy77 at gmail.com (Frediano Ziglio) Date: Tue, 23 Jun 2015 21:25:11 +0100 Subject: [freetds] Testing 0.95: What TDS version for SQL Server 2012 / 2014? In-Reply-To: <5589591F.2050608@4js.com> References: <5583DA51.7080708@4js.com> <558661F9.9000106@4js.com> <5589591F.2050608@4js.com> Message-ID: 2015-06-23 14:03 GMT+01:00 Sebastien FLAESCH : > I connect to SQL Server 2014 using FreeTDS 0.95.5 from a Linux Debian 64b... > > To me SQLDescribeCol() returns unusable type info... > > According to the TDS_Version, I different (incompatible) type info: > > TDS Column Type sqltype precision scale > --------------------------------------------------------------------------------- > 7.1 VARCHAR(MAX) -1 (SQL_LONGVARCHAR) 2147483647 0 > (ok) > 7.2 VARCHAR(MAX) 12 (SQL_VARCHAR) 1073741823 0 > ??? > 7.3 VARCHAR(MAX) 12 (SQL_VARCHAR) 1073741823 0 > ??? > SQL_VARCHAR is fine. precision should be 0 for 7.2+. There is a test for this and for me returns 0! Are you sure you did everything correct? > 7.1 TIME(3) -9 ??? 12 0 (should be > 3) > 7.2 TIME(3) -9 ??? 12 0 (should be > 3) yes, server return it as a string so 12 is the string length. Scale is obviously 0. > 7.3 TIME(3) -154 (SQL_SS_TIME2/ok) 12 0 (should be > 3) > beside scale other information are fine. > What TDS version should I use with SQL Server 2014? > 7.3 is fine. master support 7.4 but there are no improvements (support some session recovery which are not implemented anyway) > Is there a doc reference somewhere? > > Same problems with SQL Server 2012 ... > sql 2012 and sql 2014 use same protocol (7.4) but as I said using sql 2008 protocol is perfectly fine. > Seb > Frediano > On 06/21/2015 09:04 AM, Sebastien FLAESCH wrote: >> >> Hi Frediano! >> >> On 06/20/2015 12:33 PM, Frediano Ziglio wrote: >>> >>> Il 19/Giu/2015 10:33, "Sebastien FLAESCH" ha scritto: >>>> >>>> >>>> Hi all, >>>> >>>> Just installed 0.95.5 got from: >>>> ftp://ftp.freetds.org/pub/freetds/stable/ >>>> (I guess this is the latest stable version?) >>>> >>>> Attached some compilation warnings... >>>> >>> >>> Yes, no problems >>> >>>> Is there an configure option to turn on gcc's address sanitizer? >>> >>> >>> Just define CFLAGS properly calling configure. >>> >>>> We are using this option in our product. >>>> >>> >>> For production?? You known is not meant for production? It slows down >>> quite >>> a lot. >> >> >> No of course it's just for internal compilation, production releases >> are compiled with optimization flags... >> >> Seb >>>> >>>> So far, my QA tests ran ok against SQL Server 2005, will test on other >>> >>> servers. >>>> >>>> >>>> Seems that new datetime data types are now supported which is good news! >>>> >>> >>> As stated in the news :) >>> >>>> Cheers >>>> Seb >>>> From freddy77 at gmail.com Tue Jun 23 16:26:56 2015 From: freddy77 at gmail.com (Frediano Ziglio) Date: Tue, 23 Jun 2015 21:26:56 +0100 Subject: [freetds] 0.91 freebcp performance In-Reply-To: <1a1401d0adb8$9e47aeb0$dad70c10$@gothamconsulting.com> References: <12d701d0ab5b$9a893000$cf9b9000$@gothamconsulting.com> <55856D44.70208@datamartcomputing.com> <180601d0ad0e$5cce5d80$166b1880$@gothamconsulting.com> <5588582F.9000500@fsautomation.com> <1a1401d0adb8$9e47aeb0$dad70c10$@gothamconsulting.com> Message-ID: 2015-06-23 14:29 GMT+01:00 Ray Rankins : > Thanks David. > I was thinking more deeply regarding fast bcp versus "slow" bcp beyond just whether there was an index or not. > Been working more in SQL Server these days and whether you get minimally logged bcp there depends on indexes, triggers, as well as the recovery model chosen. > > Anyway, whether fast or slow bcp, I compared Sybase versus freebcp both with and without indexes on the table and 0.91 version of freebcp was considerably slower in both cases. Performance without indexes still was not acceptable. > > I downloaded and built 0.95 last night and tested the freebcp included with that and that was just as fast (and possibly slightly faster) than the Sybase bcp. > So now I guess it may be a matter of convincing them to switch to 0.95, but they are pretty far along in their testing cycle, so it might not be feasible at this point as they'd probably have to go back and regression test everything again. > > -Ray > Glad to ear this! Usually Unix is very flexible, you could try installing new version along the old one. PATH, LD_RUN_PATH, LD_LIBRARY_PATH and --prefix are your friends :-) Frediano > >> -----Original Message----- >> From: FreeTDS [mailto:freetds-bounces at lists.ibiblio.org] On Behalf Of David >> Chang >> Sent: Monday, June 22, 2015 2:47 PM >> To: FreeTDS Development Group >> Subject: Re: [freetds] 0.91 freebcp performance >> >> Ray, >> >> I don't use freebcp, but for Sybase bcp, it runs the fast bcp >> (non-logged) if you don't have any indexes on the table. Thus, for >> large tables, we usually drop the indexes, run the bcp, then create the >> indexes again. >> >> However, if you are running freebcp and Sybase bcp on the same exact >> client and server with the same exact bcp import file to the same exact >> database table, I think you've uncovered a bug in freebcp. >> >> Your table is very narrow (less than 100 bytes wide). You have very >> little data (5M rows). I would expect to insert this amount of data >> into Sybase in about a minute. >> >> To test out the fast bcp versus slow bcp, I would create a new table >> with the same table structure (but no indexes) and test out freebcp >> against it. >> >> DC >> >> On 6/22/2015 10:10 AM, Ray Rankins wrote: >> > Thanks Matt, >> > I might expect some slight performance degradation compared to Sybase >> bcp (or SQL Server bcp), but I'm seeing orders of magnitude degradation (1.5 >> minutes versus 1.5 hours for 5 million rows). >> > >> > The table is pretty simple - no large object types. >> > Mostly int and float fields. Largest char field is 7 characters. >> > There is one non-nulllable date field at the end which has a default - >> freebcp didn't like that the file didn't contain a value for the last field, but I >> worked around this using a format file or by making the last field nullable. >> > >> > CREATE TABLE [dbo].[test_table]( >> > [val_geo] [char](5) NOT NULL, >> > [cd_wrsi_mdl] [smallint] NOT NULL, >> > [cd_geo_srce] [int] NOT NULL, >> > [cd_ppty_type_cpr] [char](1) NOT NULL, >> > [cd_mrtg_purp_altv] [char](4) NOT NULL, >> > [text_grth_multr_mol] [char](7) NOT NULL, >> > [cd_geo_type] [smallint] NULL, >> > [rate_grth_multr] [float] NULL, >> > [rate_std_dev_neg] [float] NULL, >> > [rate_std_dev_pstv] [float] NULL, >> > [dt_lst_updt] [date] default getdate()NULL >> > ) >> > >> > Initially, I was running freebcp from a Solaris host to SQL Server on >> Windows, but then I tested Sybase bcp and freebcp both running on the >> same Solaris client and importing into the same ASE server running on a Linux >> host, so it was an apples to apples comparison between the 2. >> > >> > The import file is a text file, so the flags I'm using are -c, -t, -r with the -b to >> set a batch size of 10000 >> > Also tried -f with a format file and there was no noticeable performance >> difference (although there did appear to be a bug when using the format file >> where seemed to ignore the -b option). >> > >> > I don't have much access to the Sybase server to do too much monitoring, >> but what I could see, it seemed like it was waiting on network I/O most of >> the time. >> > Is there and easy way to tell of the BCP is using fast bcp versus fully logged >> besides looking at what's being written to the log file? >> > >> > -Ray >> > >> >> -----Original Message----- >> >> From: FreeTDS [mailto:freetds-bounces at lists.ibiblio.org] On Behalf Of >> >> Matthew >> >> Sent: Saturday, June 20, 2015 9:40 AM >> >> To: FreeTDS Development Group >> >> Subject: Re: [freetds] 0.91 freebcp performance >> >> >> >> Hi Ray, >> >> >> >> I did come across performance problems when compared to Sybase bcp >> but >> >> those were mostly around text and image data types. Those problems >> >> appeared to be fixed, in my testing, or at least greatly improved when I >> >> tried a nightly from a few weeks ago. >> >> >> >> What's the definition of the table you are using and which flags are you >> >> using? Can you take a look inside the Sybase server and see what it's >> >> waiting for when you use freetds and which packet size the connection is >> >> using? I assume your comparison is from the same machine and it's not >> >> the case that you're running the Sybase bcp locally and freetds >> >> remotely? Can you see if both are using fast bcp, i.e. minimally logged >> >> or are both using fully logged? >> >> >> >> Just some ideas unless someone else has got better ones! >> >> >> >> Cheers, >> >> >> >> Matthew >> >> >> >> >> >> On 20/06/15 15:18, Ray Rankins wrote: >> >>> Just tested running a large bcp with 0.91 freebcp and the performance >> was >> >> awful. >> >>> Took 1.5 hours to load 5 million rows (conversely, Sybase bcp loaded the >> >> same file in 1.5 minutes). >> >>> Is there some setting that might be on during compile that would cause >> >> freebcp to run slow. >> >>> I checked and double checked that the debug flags were not enabled >> (have >> >> made that mistake before) and they were not. >> >>> Are there any compile time options that could slow down freebcp that I >> >> should make sure are disabled when I compile it? >> >>> -Ray >> >>> >> >>> >> >>> >> >>> _______________________________________________ >> >>> FreeTDS mailing list >> >>> FreeTDS at lists.ibiblio.org >> >>> http://lists.ibiblio.org/mailman/listinfo/freetds >> >> _______________________________________________ >> >> FreeTDS mailing list >> >> FreeTDS at lists.ibiblio.org >> >> http://lists.ibiblio.org/mailman/listinfo/freetds >> > _______________________________________________ >> > FreeTDS mailing list >> > FreeTDS at lists.ibiblio.org >> > http://lists.ibiblio.org/mailman/listinfo/freetds >> >> _______________________________________________ >> FreeTDS mailing list >> FreeTDS at lists.ibiblio.org >> http://lists.ibiblio.org/mailman/listinfo/freetds > > _______________________________________________ > FreeTDS mailing list > FreeTDS at lists.ibiblio.org > http://lists.ibiblio.org/mailman/listinfo/freetds From rrankins at gothamconsulting.com Tue Jun 23 16:40:50 2015 From: rrankins at gothamconsulting.com (Ray Rankins) Date: Tue, 23 Jun 2015 16:40:50 -0400 Subject: [freetds] 0.91 freebcp performance In-Reply-To: References: <12d701d0ab5b$9a893000$cf9b9000$@gothamconsulting.com> <55856D44.70208@datamartcomputing.com> <180601d0ad0e$5cce5d80$166b1880$@gothamconsulting.com> <5588582F.9000500@fsautomation.com> <1a1401d0adb8$9e47aeb0$dad70c10$@gothamconsulting.com> Message-ID: <1afc01d0adf4$e5010860$af031920$@gothamconsulting.com> Thanks Frediano. That?s actually what I ended up doing. I built a copy of 0.95 and installed it in a different folder alongside the 0.91 version. In the shell scripts that run the bcp loads, I set the environment variables to point to the 0.95 folder and it's working like a charm. Import of an 83 million row file went from more than a day down to 1 hour and 42 minutes. -Ray > -----Original Message----- > From: FreeTDS [mailto:freetds-bounces at lists.ibiblio.org] On Behalf Of > Frediano Ziglio > Sent: Tuesday, June 23, 2015 4:27 PM > To: FreeTDS Development Group > Subject: Re: [freetds] 0.91 freebcp performance > > 2015-06-23 14:29 GMT+01:00 Ray Rankins > : > > Thanks David. > > I was thinking more deeply regarding fast bcp versus "slow" bcp beyond > just whether there was an index or not. > > Been working more in SQL Server these days and whether you get > minimally logged bcp there depends on indexes, triggers, as well as the > recovery model chosen. > > > > Anyway, whether fast or slow bcp, I compared Sybase versus freebcp both > with and without indexes on the table and 0.91 version of freebcp was > considerably slower in both cases. Performance without indexes still was not > acceptable. > > > > I downloaded and built 0.95 last night and tested the freebcp included with > that and that was just as fast (and possibly slightly faster) than the Sybase > bcp. > > So now I guess it may be a matter of convincing them to switch to 0.95, but > they are pretty far along in their testing cycle, so it might not be feasible at > this point as they'd probably have to go back and regression test everything > again. > > > > -Ray > > > > Glad to ear this! > > Usually Unix is very flexible, you could try installing new version > along the old one. PATH, LD_RUN_PATH, LD_LIBRARY_PATH and --prefix are > your friends :-) > > Frediano > > > > > >> -----Original Message----- > >> From: FreeTDS [mailto:freetds-bounces at lists.ibiblio.org] On Behalf Of > David > >> Chang > >> Sent: Monday, June 22, 2015 2:47 PM > >> To: FreeTDS Development Group > >> Subject: Re: [freetds] 0.91 freebcp performance > >> > >> Ray, > >> > >> I don't use freebcp, but for Sybase bcp, it runs the fast bcp > >> (non-logged) if you don't have any indexes on the table. Thus, for > >> large tables, we usually drop the indexes, run the bcp, then create the > >> indexes again. > >> > >> However, if you are running freebcp and Sybase bcp on the same exact > >> client and server with the same exact bcp import file to the same exact > >> database table, I think you've uncovered a bug in freebcp. > >> > >> Your table is very narrow (less than 100 bytes wide). You have very > >> little data (5M rows). I would expect to insert this amount of data > >> into Sybase in about a minute. > >> > >> To test out the fast bcp versus slow bcp, I would create a new table > >> with the same table structure (but no indexes) and test out freebcp > >> against it. > >> > >> DC > >> > >> On 6/22/2015 10:10 AM, Ray Rankins wrote: > >> > Thanks Matt, > >> > I might expect some slight performance degradation compared to > Sybase > >> bcp (or SQL Server bcp), but I'm seeing orders of magnitude degradation > (1.5 > >> minutes versus 1.5 hours for 5 million rows). > >> > > >> > The table is pretty simple - no large object types. > >> > Mostly int and float fields. Largest char field is 7 characters. > >> > There is one non-nulllable date field at the end which has a default - > >> freebcp didn't like that the file didn't contain a value for the last field, but I > >> worked around this using a format file or by making the last field nullable. > >> > > >> > CREATE TABLE [dbo].[test_table]( > >> > [val_geo] [char](5) NOT NULL, > >> > [cd_wrsi_mdl] [smallint] NOT NULL, > >> > [cd_geo_srce] [int] NOT NULL, > >> > [cd_ppty_type_cpr] [char](1) NOT NULL, > >> > [cd_mrtg_purp_altv] [char](4) NOT NULL, > >> > [text_grth_multr_mol] [char](7) NOT NULL, > >> > [cd_geo_type] [smallint] NULL, > >> > [rate_grth_multr] [float] NULL, > >> > [rate_std_dev_neg] [float] NULL, > >> > [rate_std_dev_pstv] [float] NULL, > >> > [dt_lst_updt] [date] default getdate()NULL > >> > ) > >> > > >> > Initially, I was running freebcp from a Solaris host to SQL Server on > >> Windows, but then I tested Sybase bcp and freebcp both running on the > >> same Solaris client and importing into the same ASE server running on a > Linux > >> host, so it was an apples to apples comparison between the 2. > >> > > >> > The import file is a text file, so the flags I'm using are -c, -t, -r with the -b > to > >> set a batch size of 10000 > >> > Also tried -f with a format file and there was no noticeable performance > >> difference (although there did appear to be a bug when using the format > file > >> where seemed to ignore the -b option). > >> > > >> > I don't have much access to the Sybase server to do too much > monitoring, > >> but what I could see, it seemed like it was waiting on network I/O most of > >> the time. > >> > Is there and easy way to tell of the BCP is using fast bcp versus fully > logged > >> besides looking at what's being written to the log file? > >> > > >> > -Ray > >> > > >> >> -----Original Message----- > >> >> From: FreeTDS [mailto:freetds-bounces at lists.ibiblio.org] On Behalf Of > >> >> Matthew > >> >> Sent: Saturday, June 20, 2015 9:40 AM > >> >> To: FreeTDS Development Group > >> >> Subject: Re: [freetds] 0.91 freebcp performance > >> >> > >> >> Hi Ray, > >> >> > >> >> I did come across performance problems when compared to Sybase > bcp > >> but > >> >> those were mostly around text and image data types. Those problems > >> >> appeared to be fixed, in my testing, or at least greatly improved when I > >> >> tried a nightly from a few weeks ago. > >> >> > >> >> What's the definition of the table you are using and which flags are you > >> >> using? Can you take a look inside the Sybase server and see what it's > >> >> waiting for when you use freetds and which packet size the connection > is > >> >> using? I assume your comparison is from the same machine and it's not > >> >> the case that you're running the Sybase bcp locally and freetds > >> >> remotely? Can you see if both are using fast bcp, i.e. minimally logged > >> >> or are both using fully logged? > >> >> > >> >> Just some ideas unless someone else has got better ones! > >> >> > >> >> Cheers, > >> >> > >> >> Matthew > >> >> > >> >> > >> >> On 20/06/15 15:18, Ray Rankins wrote: > >> >>> Just tested running a large bcp with 0.91 freebcp and the > performance > >> was > >> >> awful. > >> >>> Took 1.5 hours to load 5 million rows (conversely, Sybase bcp loaded > the > >> >> same file in 1.5 minutes). > >> >>> Is there some setting that might be on during compile that would > cause > >> >> freebcp to run slow. > >> >>> I checked and double checked that the debug flags were not enabled > >> (have > >> >> made that mistake before) and they were not. > >> >>> Are there any compile time options that could slow down freebcp > that I > >> >> should make sure are disabled when I compile it? > >> >>> -Ray > >> >>> > >> >>> > >> >>> > >> >>> _______________________________________________ > >> >>> FreeTDS mailing list > >> >>> FreeTDS at lists.ibiblio.org > >> >>> http://lists.ibiblio.org/mailman/listinfo/freetds > >> >> _______________________________________________ > >> >> FreeTDS mailing list > >> >> FreeTDS at lists.ibiblio.org > >> >> http://lists.ibiblio.org/mailman/listinfo/freetds > >> > _______________________________________________ > >> > FreeTDS mailing list > >> > FreeTDS at lists.ibiblio.org > >> > http://lists.ibiblio.org/mailman/listinfo/freetds > >> > >> _______________________________________________ > >> FreeTDS mailing list > >> FreeTDS at lists.ibiblio.org > >> http://lists.ibiblio.org/mailman/listinfo/freetds > > > > _______________________________________________ > > FreeTDS mailing list > > FreeTDS at lists.ibiblio.org > > http://lists.ibiblio.org/mailman/listinfo/freetds > _______________________________________________ > FreeTDS mailing list > FreeTDS at lists.ibiblio.org > http://lists.ibiblio.org/mailman/listinfo/freetds From matthew.green at datamartcomputing.com Wed Jun 24 04:06:48 2015 From: matthew.green at datamartcomputing.com (matthew.green at datamartcomputing.com) Date: Wed, 24 Jun 2015 08:06:48 +0000 Subject: [freetds] 0.91 freebcp performance In-Reply-To: <1afc01d0adf4$e5010860$af031920$@gothamconsulting.com> References: <1afc01d0adf4$e5010860$af031920$@gothamconsulting.com> <12d701d0ab5b$9a893000$cf9b9000$@gothamconsulting.com> <55856D44.70208@datamartcomputing.com> <180601d0ad0e$5cce5d80$166b1880$@gothamconsulting.com> <5588582F.9000500@fsautomation.com> <1a1401d0adb8$9e47aeb0$dad70c10$@gothamconsulting.com> Message-ID: <5b29ee2b0bcb9129eb750bb4e8b1f34f@datamartcomputing.com> Glad to hear things are working better! As an aside you could try using a larger packet size and try different batch sizes to optimise the process even further. Larger packet sizes would imply that the Sybase server is set-up to support them ("additional network memory" and "max network packet size"). Cheers, Matthew. June 23 2015 10:41 PM, "Ray Rankins" wrote: > Thanks Frediano. > That?s actually what I ended up doing. > I built a copy of 0.95 and installed it in a different folder alongside the 0.91 version. > In the shell scripts that run the bcp loads, I set the environment variables to point to the 0.95 > folder and it's working like a charm. > Import of an 83 million row file went from more than a day down to 1 hour and 42 minutes. > > -Ray > >> -----Original Message----- >> From: FreeTDS [mailto:freetds-bounces at lists.ibiblio.org] On Behalf Of >> Frediano Ziglio >> Sent: Tuesday, June 23, 2015 4:27 PM >> To: FreeTDS Development Group >> Subject: Re: [freetds] 0.91 freebcp performance >> >> 2015-06-23 14:29 GMT+01:00 Ray Rankins >> : >>> Thanks David. >>> I was thinking more deeply regarding fast bcp versus "slow" bcp beyond >> just whether there was an index or not. >>> Been working more in SQL Server these days and whether you get >> minimally logged bcp there depends on indexes, triggers, as well as the >> recovery model chosen. >>> >>> Anyway, whether fast or slow bcp, I compared Sybase versus freebcp both >> with and without indexes on the table and 0.91 version of freebcp was >> considerably slower in both cases. Performance without indexes still was not >> acceptable. >>> >>> I downloaded and built 0.95 last night and tested the freebcp included with >> that and that was just as fast (and possibly slightly faster) than the Sybase >> bcp. >>> So now I guess it may be a matter of convincing them to switch to 0.95, but >> they are pretty far along in their testing cycle, so it might not be feasible at >> this point as they'd probably have to go back and regression test everything >> again. >>> >>> -Ray >>> >> >> Glad to ear this! >> >> Usually Unix is very flexible, you could try installing new version >> along the old one. PATH, LD_RUN_PATH, LD_LIBRARY_PATH and --prefix are >> your friends :-) >> >> Frediano >> >>> >>>> -----Original Message----- >>>> From: FreeTDS [mailto:freetds-bounces at lists.ibiblio.org] On Behalf Of >> David >>>> Chang >>>> Sent: Monday, June 22, 2015 2:47 PM >>>> To: FreeTDS Development Group >>>> Subject: Re: [freetds] 0.91 freebcp performance >>>> >>>> Ray, >>>> >>>> I don't use freebcp, but for Sybase bcp, it runs the fast bcp >>>> (non-logged) if you don't have any indexes on the table. Thus, for >>>> large tables, we usually drop the indexes, run the bcp, then create the >>>> indexes again. >>>> >>>> However, if you are running freebcp and Sybase bcp on the same exact >>>> client and server with the same exact bcp import file to the same exact >>>> database table, I think you've uncovered a bug in freebcp. >>>> >>>> Your table is very narrow (less than 100 bytes wide). You have very >>>> little data (5M rows). I would expect to insert this amount of data >>>> into Sybase in about a minute. >>>> >>>> To test out the fast bcp versus slow bcp, I would create a new table >>>> with the same table structure (but no indexes) and test out freebcp >>>> against it. >>>> >>>> DC >>>> >>>> On 6/22/2015 10:10 AM, Ray Rankins wrote: >>>>> Thanks Matt, >>>>> I might expect some slight performance degradation compared to >> Sybase >>>> bcp (or SQL Server bcp), but I'm seeing orders of magnitude degradation >> (1.5 >>>> minutes versus 1.5 hours for 5 million rows). >>>>> >>>>> The table is pretty simple - no large object types. >>>>> Mostly int and float fields. Largest char field is 7 characters. >>>>> There is one non-nulllable date field at the end which has a default - >>>> freebcp didn't like that the file didn't contain a value for the last field, but I >>>> worked around this using a format file or by making the last field nullable. >>>>> >>>>> CREATE TABLE [dbo].[test_table]( >>>>> [val_geo] [char](5) NOT NULL, >>>>> [cd_wrsi_mdl] [smallint] NOT NULL, >>>>> [cd_geo_srce] [int] NOT NULL, >>>>> [cd_ppty_type_cpr] [char](1) NOT NULL, >>>>> [cd_mrtg_purp_altv] [char](4) NOT NULL, >>>>> [text_grth_multr_mol] [char](7) NOT NULL, >>>>> [cd_geo_type] [smallint] NULL, >>>>> [rate_grth_multr] [float] NULL, >>>>> [rate_std_dev_neg] [float] NULL, >>>>> [rate_std_dev_pstv] [float] NULL, >>>>> [dt_lst_updt] [date] default getdate()NULL >>>>> ) >>>>> >>>>> Initially, I was running freebcp from a Solaris host to SQL Server on >>>> Windows, but then I tested Sybase bcp and freebcp both running on the >>>> same Solaris client and importing into the same ASE server running on a >> Linux >>>> host, so it was an apples to apples comparison between the 2. >>>>> >>>>> The import file is a text file, so the flags I'm using are -c, -t, -r with the -b >> to >>>> set a batch size of 10000 >>>>> Also tried -f with a format file and there was no noticeable performance >>>> difference (although there did appear to be a bug when using the format >> file >>>> where seemed to ignore the -b option). >>>>> >>>>> I don't have much access to the Sybase server to do too much >> monitoring, >>>> but what I could see, it seemed like it was waiting on network I/O most of >>>> the time. >>>>> Is there and easy way to tell of the BCP is using fast bcp versus fully >> logged >>>> besides looking at what's being written to the log file? >>>>> >>>>> -Ray >>>>> >>>>>> -----Original Message----- >>>>>> From: FreeTDS [mailto:freetds-bounces at lists.ibiblio.org] On Behalf Of >>>>>> Matthew >>>>>> Sent: Saturday, June 20, 2015 9:40 AM >>>>>> To: FreeTDS Development Group >>>>>> Subject: Re: [freetds] 0.91 freebcp performance >>>>>> >>>>>> Hi Ray, >>>>>> >>>>>> I did come across performance problems when compared to Sybase >> bcp >>>> but >>>>>> those were mostly around text and image data types. Those problems >>>>>> appeared to be fixed, in my testing, or at least greatly improved when I >>>>>> tried a nightly from a few weeks ago. >>>>>> >>>>>> What's the definition of the table you are using and which flags are you >>>>>> using? Can you take a look inside the Sybase server and see what it's >>>>>> waiting for when you use freetds and which packet size the connection >> is >>>>>> using? I assume your comparison is from the same machine and it's not >>>>>> the case that you're running the Sybase bcp locally and freetds >>>>>> remotely? Can you see if both are using fast bcp, i.e. minimally logged >>>>>> or are both using fully logged? >>>>>> >>>>>> Just some ideas unless someone else has got better ones! >>>>>> >>>>>> Cheers, >>>>>> >>>>>> Matthew >>>>>> >>>>>> >>>>>> On 20/06/15 15:18, Ray Rankins wrote: >>>>>>> Just tested running a large bcp with 0.91 freebcp and the >> performance >>>> was >>>>>> awful. >>>>>>> Took 1.5 hours to load 5 million rows (conversely, Sybase bcp loaded >> the >>>>>> same file in 1.5 minutes). >>>>>>> Is there some setting that might be on during compile that would >> cause >>>>>> freebcp to run slow. >>>>>>> I checked and double checked that the debug flags were not enabled >>>> (have >>>>>> made that mistake before) and they were not. >>>>>>> Are there any compile time options that could slow down freebcp >> that I >>>>>> should make sure are disabled when I compile it? >>>>>>> -Ray >>>>>>> >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> FreeTDS mailing list >>>>>>> FreeTDS at lists.ibiblio.org >>>>>>> http://lists.ibiblio.org/mailman/listinfo/freetds >>>>>> _______________________________________________ >>>>>> FreeTDS mailing list >>>>>> FreeTDS at lists.ibiblio.org >>>>>> http://lists.ibiblio.org/mailman/listinfo/freetds >>>>> _______________________________________________ >>>>> FreeTDS mailing list >>>>> FreeTDS at lists.ibiblio.org >>>>> http://lists.ibiblio.org/mailman/listinfo/freetds >>>> >>>> _______________________________________________ >>>> FreeTDS mailing list >>>> FreeTDS at lists.ibiblio.org >>>> http://lists.ibiblio.org/mailman/listinfo/freetds >>> >>> _______________________________________________ >>> FreeTDS mailing list >>> FreeTDS at lists.ibiblio.org >>> http://lists.ibiblio.org/mailman/listinfo/freetds >> _______________________________________________ >> FreeTDS mailing list >> FreeTDS at lists.ibiblio.org >> http://lists.ibiblio.org/mailman/listinfo/freetds > > _______________________________________________ > FreeTDS mailing list > FreeTDS at lists.ibiblio.org > http://lists.ibiblio.org/mailman/listinfo/freetds From sf at 4js.com Wed Jun 24 10:13:57 2015 From: sf at 4js.com (Sebastien FLAESCH) Date: Wed, 24 Jun 2015 16:13:57 +0200 Subject: [freetds] Testing 0.95: What TDS version for SQL Server 2012 / 2014? In-Reply-To: References: <5583DA51.7080708@4js.com> <558661F9.9000106@4js.com> <5589591F.2050608@4js.com> Message-ID: <558ABB25.2090303@4js.com> On 06/23/2015 10:25 PM, Frediano Ziglio wrote: > 2015-06-23 14:03 GMT+01:00 Sebastien FLAESCH : >> I connect to SQL Server 2014 using FreeTDS 0.95.5 from a Linux Debian 64b... >> >> To me SQLDescribeCol() returns unusable type info... >> >> According to the TDS_Version, I different (incompatible) type info: >> >> TDS Column Type sqltype precision scale >> --------------------------------------------------------------------------------- >> 7.1 VARCHAR(MAX) -1 (SQL_LONGVARCHAR) 2147483647 0 >> (ok) >> 7.2 VARCHAR(MAX) 12 (SQL_VARCHAR) 1073741823 0 >> ??? >> 7.3 VARCHAR(MAX) 12 (SQL_VARCHAR) 1073741823 0 >> ??? >> > > SQL_VARCHAR is fine. precision should be 0 for 7.2+. There is a test > for this and for me returns 0! Are you sure you did everything > correct? I am using the same code in Easysoft and SQL Native Client: SQLULEN precision; Note that I am connected to SQL Server 2014 and that tdsdump shows: token.c:1533:tds7_get_data_info: colname = t type = 39 (varchar) server's type = 167 (xvarchar) column_varint_size = 8 column_size = 1073741823 (1073741823 on server) ... > >> 7.1 TIME(3) -9 ??? 12 0 (should be >> 3) >> 7.2 TIME(3) -9 ??? 12 0 (should be >> 3) > > yes, server return it as a string so 12 is the string length. Scale is > obviously 0. > >> 7.3 TIME(3) -154 (SQL_SS_TIME2/ok) 12 0 (should be >> 3) > > beside scale other information are fine. I can deal with this based on the precision. > >> What TDS version should I use with SQL Server 2014? >> > > 7.3 is fine. master support 7.4 but there are no improvements (support > some session recovery which are not implemented anyway) > >> Is there a doc reference somewhere? >> >> Same problems with SQL Server 2012 ... >> > > sql 2012 and sql 2014 use same protocol (7.4) but as I said using sql > 2008 protocol is perfectly fine. > >> Seb >> > > Frediano > >> On 06/21/2015 09:04 AM, Sebastien FLAESCH wrote: >>> >>> Hi Frediano! >>> >>> On 06/20/2015 12:33 PM, Frediano Ziglio wrote: >>>> >>>> Il 19/Giu/2015 10:33, "Sebastien FLAESCH" ha scritto: >>>>> >>>>> >>>>> Hi all, >>>>> >>>>> Just installed 0.95.5 got from: >>>>> ftp://ftp.freetds.org/pub/freetds/stable/ >>>>> (I guess this is the latest stable version?) >>>>> >>>>> Attached some compilation warnings... >>>>> >>>> >>>> Yes, no problems >>>> >>>>> Is there an configure option to turn on gcc's address sanitizer? >>>> >>>> >>>> Just define CFLAGS properly calling configure. >>>> >>>>> We are using this option in our product. >>>>> >>>> >>>> For production?? You known is not meant for production? It slows down >>>> quite >>>> a lot. >>> >>> >>> No of course it's just for internal compilation, production releases >>> are compiled with optimization flags... >>> >>> Seb >>>>> >>>>> So far, my QA tests ran ok against SQL Server 2005, will test on other >>>> >>>> servers. >>>>> >>>>> >>>>> Seems that new datetime data types are now supported which is good news! >>>>> >>>> >>>> As stated in the news :) >>>> >>>>> Cheers >>>>> Seb >>>>> > _______________________________________________ > FreeTDS mailing list > FreeTDS at lists.ibiblio.org > http://lists.ibiblio.org/mailman/listinfo/freetds > From freddy77 at gmail.com Wed Jun 24 16:10:13 2015 From: freddy77 at gmail.com (Frediano Ziglio) Date: Wed, 24 Jun 2015 21:10:13 +0100 Subject: [freetds] 0.91 freebcp performance In-Reply-To: <5b29ee2b0bcb9129eb750bb4e8b1f34f@datamartcomputing.com> References: <12d701d0ab5b$9a893000$cf9b9000$@gothamconsulting.com> <55856D44.70208@datamartcomputing.com> <180601d0ad0e$5cce5d80$166b1880$@gothamconsulting.com> <5588582F.9000500@fsautomation.com> <1a1401d0adb8$9e47aeb0$dad70c10$@gothamconsulting.com> <1afc01d0adf4$e5010860$af031920$@gothamconsulting.com> <5b29ee2b0bcb9129eb750bb4e8b1f34f@datamartcomputing.com> Message-ID: Il 24/Giu/2015 09:07, ha scritto: > > Glad to hear things are working better! > > As an aside you could try using a larger packet size and try different batch sizes to optimise the process even further. Larger packet sizes would imply that the Sybase server is set-up to support them ("additional network memory" and "max network packet size"). > > Cheers, > > Matthew. > I don't think it will change much. Unfortunately I realized that we don't ask for packet size for Sybase. There is a patch in master that change a bit in the capability. If it continue like this version 1.0 will be ready this year :-) There are already 100 patches since 0.95. Frediano > June 23 2015 10:41 PM, "Ray Rankins" wrote: > > Thanks Frediano. > > That?s actually what I ended up doing. > > I built a copy of 0.95 and installed it in a different folder alongside the 0.91 version. > > In the shell scripts that run the bcp loads, I set the environment variables to point to the 0.95 > > folder and it's working like a charm. > > Import of an 83 million row file went from more than a day down to 1 hour and 42 minutes. > > > > -Ray > > > >> -----Original Message----- > >> From: FreeTDS [mailto:freetds-bounces at lists.ibiblio.org] On Behalf Of > >> Frediano Ziglio > >> Sent: Tuesday, June 23, 2015 4:27 PM > >> To: FreeTDS Development Group > >> Subject: Re: [freetds] 0.91 freebcp performance > >> > >> 2015-06-23 14:29 GMT+01:00 Ray Rankins > >> : > >>> Thanks David. > >>> I was thinking more deeply regarding fast bcp versus "slow" bcp beyond > >> just whether there was an index or not. > >>> Been working more in SQL Server these days and whether you get > >> minimally logged bcp there depends on indexes, triggers, as well as the > >> recovery model chosen. > >>> > >>> Anyway, whether fast or slow bcp, I compared Sybase versus freebcp both > >> with and without indexes on the table and 0.91 version of freebcp was > >> considerably slower in both cases. Performance without indexes still was not > >> acceptable. > >>> > >>> I downloaded and built 0.95 last night and tested the freebcp included with > >> that and that was just as fast (and possibly slightly faster) than the Sybase > >> bcp. > >>> So now I guess it may be a matter of convincing them to switch to 0.95, but > >> they are pretty far along in their testing cycle, so it might not be feasible at > >> this point as they'd probably have to go back and regression test everything > >> again. > >>> > >>> -Ray > >>> > >> > >> Glad to ear this! > >> > >> Usually Unix is very flexible, you could try installing new version > >> along the old one. PATH, LD_RUN_PATH, LD_LIBRARY_PATH and --prefix are > >> your friends :-) > >> > >> Frediano > >> > >>> > >>>> -----Original Message----- > >>>> From: FreeTDS [mailto:freetds-bounces at lists.ibiblio.org] On Behalf Of > >> David > >>>> Chang > >>>> Sent: Monday, June 22, 2015 2:47 PM > >>>> To: FreeTDS Development Group > >>>> Subject: Re: [freetds] 0.91 freebcp performance > >>>> > >>>> Ray, > >>>> > >>>> I don't use freebcp, but for Sybase bcp, it runs the fast bcp > >>>> (non-logged) if you don't have any indexes on the table. Thus, for > >>>> large tables, we usually drop the indexes, run the bcp, then create the > >>>> indexes again. > >>>> > >>>> However, if you are running freebcp and Sybase bcp on the same exact > >>>> client and server with the same exact bcp import file to the same exact > >>>> database table, I think you've uncovered a bug in freebcp. > >>>> > >>>> Your table is very narrow (less than 100 bytes wide). You have very > >>>> little data (5M rows). I would expect to insert this amount of data > >>>> into Sybase in about a minute. > >>>> > >>>> To test out the fast bcp versus slow bcp, I would create a new table > >>>> with the same table structure (but no indexes) and test out freebcp > >>>> against it. > >>>> > >>>> DC > >>>> > >>>> On 6/22/2015 10:10 AM, Ray Rankins wrote: > >>>>> Thanks Matt, > >>>>> I might expect some slight performance degradation compared to > >> Sybase > >>>> bcp (or SQL Server bcp), but I'm seeing orders of magnitude degradation > >> (1.5 > >>>> minutes versus 1.5 hours for 5 million rows). > >>>>> > >>>>> The table is pretty simple - no large object types. > >>>>> Mostly int and float fields. Largest char field is 7 characters. > >>>>> There is one non-nulllable date field at the end which has a default - > >>>> freebcp didn't like that the file didn't contain a value for the last field, but I > >>>> worked around this using a format file or by making the last field nullable. > >>>>> > >>>>> CREATE TABLE [dbo].[test_table]( > >>>>> [val_geo] [char](5) NOT NULL, > >>>>> [cd_wrsi_mdl] [smallint] NOT NULL, > >>>>> [cd_geo_srce] [int] NOT NULL, > >>>>> [cd_ppty_type_cpr] [char](1) NOT NULL, > >>>>> [cd_mrtg_purp_altv] [char](4) NOT NULL, > >>>>> [text_grth_multr_mol] [char](7) NOT NULL, > >>>>> [cd_geo_type] [smallint] NULL, > >>>>> [rate_grth_multr] [float] NULL, > >>>>> [rate_std_dev_neg] [float] NULL, > >>>>> [rate_std_dev_pstv] [float] NULL, > >>>>> [dt_lst_updt] [date] default getdate()NULL > >>>>> ) > >>>>> > >>>>> Initially, I was running freebcp from a Solaris host to SQL Server on > >>>> Windows, but then I tested Sybase bcp and freebcp both running on the > >>>> same Solaris client and importing into the same ASE server running on a > >> Linux > >>>> host, so it was an apples to apples comparison between the 2. > >>>>> > >>>>> The import file is a text file, so the flags I'm using are -c, -t, -r with the -b > >> to > >>>> set a batch size of 10000 > >>>>> Also tried -f with a format file and there was no noticeable performance > >>>> difference (although there did appear to be a bug when using the format > >> file > >>>> where seemed to ignore the -b option). > >>>>> > >>>>> I don't have much access to the Sybase server to do too much > >> monitoring, > >>>> but what I could see, it seemed like it was waiting on network I/O most of > >>>> the time. > >>>>> Is there and easy way to tell of the BCP is using fast bcp versus fully > >> logged > >>>> besides looking at what's being written to the log file? > >>>>> > >>>>> -Ray > >>>>> > >>>>>> -----Original Message----- > >>>>>> From: FreeTDS [mailto:freetds-bounces at lists.ibiblio.org] On Behalf Of > >>>>>> Matthew > >>>>>> Sent: Saturday, June 20, 2015 9:40 AM > >>>>>> To: FreeTDS Development Group > >>>>>> Subject: Re: [freetds] 0.91 freebcp performance > >>>>>> > >>>>>> Hi Ray, > >>>>>> > >>>>>> I did come across performance problems when compared to Sybase > >> bcp > >>>> but > >>>>>> those were mostly around text and image data types. Those problems > >>>>>> appeared to be fixed, in my testing, or at least greatly improved when I > >>>>>> tried a nightly from a few weeks ago. > >>>>>> > >>>>>> What's the definition of the table you are using and which flags are you > >>>>>> using? Can you take a look inside the Sybase server and see what it's > >>>>>> waiting for when you use freetds and which packet size the connection > >> is > >>>>>> using? I assume your comparison is from the same machine and it's not > >>>>>> the case that you're running the Sybase bcp locally and freetds > >>>>>> remotely? Can you see if both are using fast bcp, i.e. minimally logged > >>>>>> or are both using fully logged? > >>>>>> > >>>>>> Just some ideas unless someone else has got better ones! > >>>>>> > >>>>>> Cheers, > >>>>>> > >>>>>> Matthew > >>>>>> > >>>>>> > >>>>>> On 20/06/15 15:18, Ray Rankins wrote: > >>>>>>> Just tested running a large bcp with 0.91 freebcp and the > >> performance > >>>> was > >>>>>> awful. > >>>>>>> Took 1.5 hours to load 5 million rows (conversely, Sybase bcp loaded > >> the > >>>>>> same file in 1.5 minutes). > >>>>>>> Is there some setting that might be on during compile that would > >> cause > >>>>>> freebcp to run slow. > >>>>>>> I checked and double checked that the debug flags were not enabled > >>>> (have > >>>>>> made that mistake before) and they were not. > >>>>>>> Are there any compile time options that could slow down freebcp > >> that I > >>>>>> should make sure are disabled when I compile it? > >>>>>>> -Ray > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> _______________________________________________ > >>>>>>> FreeTDS mailing list > >>>>>>> FreeTDS at lists.ibiblio.org > >>>>>>> http://lists.ibiblio.org/mailman/listinfo/freetds > >>>>>> _______________________________________________ > >>>>>> FreeTDS mailing list > >>>>>> FreeTDS at lists.ibiblio.org > >>>>>> http://lists.ibiblio.org/mailman/listinfo/freetds > >>>>> _______________________________________________ > >>>>> FreeTDS mailing list > >>>>> FreeTDS at lists.ibiblio.org > >>>>> http://lists.ibiblio.org/mailman/listinfo/freetds > >>>> > >>>> _______________________________________________ > >>>> FreeTDS mailing list > >>>> FreeTDS at lists.ibiblio.org > >>>> http://lists.ibiblio.org/mailman/listinfo/freetds > >>> > >>> _______________________________________________ > >>> FreeTDS mailing list > >>> FreeTDS at lists.ibiblio.org > >>> http://lists.ibiblio.org/mailman/listinfo/freetds > >> _______________________________________________ > >> FreeTDS mailing list > >> FreeTDS at lists.ibiblio.org > >> http://lists.ibiblio.org/mailman/listinfo/freetds > > > > _______________________________________________ > > FreeTDS mailing list > > FreeTDS at lists.ibiblio.org > > http://lists.ibiblio.org/mailman/listinfo/freetds > _______________________________________________ > FreeTDS mailing list > FreeTDS at lists.ibiblio.org > http://lists.ibiblio.org/mailman/listinfo/freetds From freddy77 at gmail.com Wed Jun 24 16:13:32 2015 From: freddy77 at gmail.com (Frediano Ziglio) Date: Wed, 24 Jun 2015 21:13:32 +0100 Subject: [freetds] Testing 0.95: What TDS version for SQL Server 2012 / 2014? In-Reply-To: <558ABB25.2090303@4js.com> References: <5583DA51.7080708@4js.com> <558661F9.9000106@4js.com> <5589591F.2050608@4js.com> <558ABB25.2090303@4js.com> Message-ID: Il 24/Giu/2015 15:16, "Sebastien FLAESCH" ha scritto: > > On 06/23/2015 10:25 PM, Frediano Ziglio wrote: >> >> 2015-06-23 14:03 GMT+01:00 Sebastien FLAESCH : >>> >>> I connect to SQL Server 2014 using FreeTDS 0.95.5 from a Linux Debian 64b... >>> >>> To me SQLDescribeCol() returns unusable type info... >>> >>> According to the TDS_Version, I different (incompatible) type info: >>> >>> TDS Column Type sqltype precision scale >>> --------------------------------------------------------------------------------- >>> 7.1 VARCHAR(MAX) -1 (SQL_LONGVARCHAR) 2147483647 0 >>> (ok) >>> 7.2 VARCHAR(MAX) 12 (SQL_VARCHAR) 1073741823 0 >>> ??? >>> 7.3 VARCHAR(MAX) 12 (SQL_VARCHAR) 1073741823 0 >>> ??? >>> >> >> SQL_VARCHAR is fine. precision should be 0 for 7.2+. There is a test >> for this and for me returns 0! Are you sure you did everything >> correct? > > > I am using the same code in Easysoft and SQL Native Client: > > SQLULEN precision; > > Note that I am connected to SQL Server 2014 and that tdsdump shows: > > token.c:1533:tds7_get_data_info: > colname = t > type = 39 (varchar) > server's type = 167 (xvarchar) > column_varint_size = 8 > column_size = 1073741823 (1073741823 on server) > > ... > Please try SQLDescribeCol. Libtds have slightly different point of view. As stated from Ms documentation varchar max is returned as varchar with size 0 (unlimited). Same for freetds. > >> >>> 7.1 TIME(3) -9 ??? 12 0 (should be >>> 3) >>> 7.2 TIME(3) -9 ??? 12 0 (should be >>> 3) >> >> >> yes, server return it as a string so 12 is the string length. Scale is >> obviously 0. >> >>> 7.3 TIME(3) -154 (SQL_SS_TIME2/ok) 12 0 (should be >>> 3) >> >> >> beside scale other information are fine. > I'll do other test. We can fix it. Frediano > > I can deal with this based on the precision. > > >> >>> What TDS version should I use with SQL Server 2014? >>> >> >> 7.3 is fine. master support 7.4 but there are no improvements (support >> some session recovery which are not implemented anyway) >> >>> Is there a doc reference somewhere? >>> >>> Same problems with SQL Server 2012 ... >>> >> >> sql 2012 and sql 2014 use same protocol (7.4) but as I said using sql >> 2008 protocol is perfectly fine. >> >>> Seb >>> >> >> Frediano >> >>> On 06/21/2015 09:04 AM, Sebastien FLAESCH wrote: >>>> >>>> >>>> Hi Frediano! >>>> >>>> On 06/20/2015 12:33 PM, Frediano Ziglio wrote: >>>>> >>>>> >>>>> Il 19/Giu/2015 10:33, "Sebastien FLAESCH" ha scritto: >>>>>> >>>>>> >>>>>> >>>>>> Hi all, >>>>>> >>>>>> Just installed 0.95.5 got from: >>>>>> ftp://ftp.freetds.org/pub/freetds/stable/ >>>>>> (I guess this is the latest stable version?) >>>>>> >>>>>> Attached some compilation warnings... >>>>>> >>>>> >>>>> Yes, no problems >>>>> >>>>>> Is there an configure option to turn on gcc's address sanitizer? >>>>> >>>>> >>>>> >>>>> Just define CFLAGS properly calling configure. >>>>> >>>>>> We are using this option in our product. >>>>>> >>>>> >>>>> For production?? You known is not meant for production? It slows down >>>>> quite >>>>> a lot. >>>> >>>> >>>> >>>> No of course it's just for internal compilation, production releases >>>> are compiled with optimization flags... >>>> >>>> Seb >>>>>> >>>>>> >>>>>> So far, my QA tests ran ok against SQL Server 2005, will test on other >>>>> >>>>> >>>>> servers. >>>>>> >>>>>> >>>>>> >>>>>> Seems that new datetime data types are now supported which is good news! >>>>>> >>>>> >>>>> As stated in the news :) >>>>> >>>>>> Cheers >>>>>> Seb >>>>>> >> _______________________________________________ >> FreeTDS mailing list >> FreeTDS at lists.ibiblio.org >> http://lists.ibiblio.org/mailman/listinfo/freetds >> > > _______________________________________________ > FreeTDS mailing list > FreeTDS at lists.ibiblio.org > http://lists.ibiblio.org/mailman/listinfo/freetds From matthew.green at datamartcomputing.com Thu Jun 25 03:43:18 2015 From: matthew.green at datamartcomputing.com (matthew.green at datamartcomputing.com) Date: Thu, 25 Jun 2015 07:43:18 +0000 Subject: [freetds] 0.91 freebcp performance In-Reply-To: References: <12d701d0ab5b$9a893000$cf9b9000$@gothamconsulting.com> <55856D44.70208@datamartcomputing.com> <180601d0ad0e$5cce5d80$166b1880$@gothamconsulting.com> <5588582F.9000500@fsautomation.com> <1a1401d0adb8$9e47aeb0$dad70c10$@gothamconsulting.com> <1afc01d0adf4$e5010860$af031920$@gothamconsulting.com> <5b29ee2b0bcb9129eb750bb4e8b1f34f@datamartcomputing.com> Message-ID: <04d84a6cc5f0020ee81bc4c861b15bba@datamartcomputing.com> That I didn't know! I saw it being used in datacopy (confirmed by querying the system tables in both SAP/Sybase and SQL Server) so I just assumed it was implemented for bcp too. My mistake, Matthew. June 24 2015 10:38 PM, "Frediano Ziglio" wrote: > Il 24/Giu/2015 09:07, ha scritto: > >> Glad to hear things are working better! >> >> As an aside you could try using a larger packet size and try different > > batch sizes to optimise the process even further. Larger packet sizes would > imply that the Sybase server is set-up to support them ("additional network > memory" and "max network packet size"). >> Cheers, >> >> Matthew. > > I don't think it will change much. Unfortunately I realized that we don't > ask for packet size for Sybase. There is a patch in master that change a > bit in the capability. > > If it continue like this version 1.0 will be ready this year :-) There are > already 100 patches since 0.95. > > Frediano > >> June 23 2015 10:41 PM, "Ray Rankins" > > wrote: >>> Thanks Frediano. >>> That?s actually what I ended up doing. >>> I built a copy of 0.95 and installed it in a different folder alongside > > the 0.91 version. >>> In the shell scripts that run the bcp loads, I set the environment > > variables to point to the 0.95 >>> folder and it's working like a charm. >>> Import of an 83 million row file went from more than a day down to 1 > > hour and 42 minutes. > >>> >>> -Ray >>> >>>> -----Original Message----- >>>> From: FreeTDS [mailto:freetds-bounces at lists.ibiblio.org] On Behalf Of >>>> Frediano Ziglio >>>> Sent: Tuesday, June 23, 2015 4:27 PM >>>> To: FreeTDS Development Group >>>> Subject: Re: [freetds] 0.91 freebcp performance >>>> >>>> 2015-06-23 14:29 GMT+01:00 Ray Rankins >>>> : >>>>> Thanks David. >>>>> I was thinking more deeply regarding fast bcp versus "slow" bcp beyond >>>> just whether there was an index or not. >>>>> Been working more in SQL Server these days and whether you get >>>> minimally logged bcp there depends on indexes, triggers, as well as the >>>> recovery model chosen. >>>>> >>>>> Anyway, whether fast or slow bcp, I compared Sybase versus freebcp > > both >>>> with and without indexes on the table and 0.91 version of freebcp was >>>> considerably slower in both cases. Performance without indexes still > > was not >>>> acceptable. >>>>> >>>>> I downloaded and built 0.95 last night and tested the freebcp > > included with >>>> that and that was just as fast (and possibly slightly faster) than the > > Sybase >>>> bcp. >>>>> So now I guess it may be a matter of convincing them to switch to > > 0.95, but >>>> they are pretty far along in their testing cycle, so it might not be > > feasible at >>>> this point as they'd probably have to go back and regression test > > everything > >>>> again. >>>>> >>>>> -Ray >>>>> >>>> >>>> Glad to ear this! >>>> >>>> Usually Unix is very flexible, you could try installing new version >>>> along the old one. PATH, LD_RUN_PATH, LD_LIBRARY_PATH and --prefix are >>>> your friends :-) >>>> >>>> Frediano >>>> >>>>> >>>>>> -----Original Message----- >>>>>> From: FreeTDS [mailto:freetds-bounces at lists.ibiblio.org] On Behalf Of >>>> David >>>>>> Chang >>>>>> Sent: Monday, June 22, 2015 2:47 PM >>>>>> To: FreeTDS Development Group >>>>>> Subject: Re: [freetds] 0.91 freebcp performance >>>>>> >>>>>> Ray, >>>>>> >>>>>> I don't use freebcp, but for Sybase bcp, it runs the fast bcp >>>>>> (non-logged) if you don't have any indexes on the table. Thus, for >>>>>> large tables, we usually drop the indexes, run the bcp, then create > > the >>>>>> indexes again. >>>>>> >>>>>> However, if you are running freebcp and Sybase bcp on the same exact >>>>>> client and server with the same exact bcp import file to the same > > exact > >>>>>> database table, I think you've uncovered a bug in freebcp. >>>>>> >>>>>> Your table is very narrow (less than 100 bytes wide). You have very >>>>>> little data (5M rows). I would expect to insert this amount of data >>>>>> into Sybase in about a minute. >>>>>> >>>>>> To test out the fast bcp versus slow bcp, I would create a new table >>>>>> with the same table structure (but no indexes) and test out freebcp >>>>>> against it. >>>>>> >>>>>> DC >>>>>> >>>>>> On 6/22/2015 10:10 AM, Ray Rankins wrote: >>>>>>> Thanks Matt, >>>>>>> I might expect some slight performance degradation compared to >>>> Sybase >>>>>> bcp (or SQL Server bcp), but I'm seeing orders of magnitude > > degradation >>>> (1.5 >>>>>> minutes versus 1.5 hours for 5 million rows). >>>>>>> >>>>>>> The table is pretty simple - no large object types. >>>>>>> Mostly int and float fields. Largest char field is 7 characters. >>>>>>> There is one non-nulllable date field at the end which has a > > default - >>>>>> freebcp didn't like that the file didn't contain a value for the > > last field, but I >>>>>> worked around this using a format file or by making the last field > > nullable. > >>>>>>> >>>>>>> CREATE TABLE [dbo].[test_table]( >>>>>>> [val_geo] [char](5) NOT NULL, >>>>>>> [cd_wrsi_mdl] [smallint] NOT NULL, >>>>>>> [cd_geo_srce] [int] NOT NULL, >>>>>>> [cd_ppty_type_cpr] [char](1) NOT NULL, >>>>>>> [cd_mrtg_purp_altv] [char](4) NOT NULL, >>>>>>> [text_grth_multr_mol] [char](7) NOT NULL, >>>>>>> [cd_geo_type] [smallint] NULL, >>>>>>> [rate_grth_multr] [float] NULL, >>>>>>> [rate_std_dev_neg] [float] NULL, >>>>>>> [rate_std_dev_pstv] [float] NULL, >>>>>>> [dt_lst_updt] [date] default getdate()NULL >>>>>>> ) >>>>>>> >>>>>>> Initially, I was running freebcp from a Solaris host to SQL Server > > on >>>>>> Windows, but then I tested Sybase bcp and freebcp both running on the >>>>>> same Solaris client and importing into the same ASE server running > > on a >>>> Linux >>>>>> host, so it was an apples to apples comparison between the 2. >>>>>>> >>>>>>> The import file is a text file, so the flags I'm using are -c, -t, > > -r with the -b >>>> to >>>>>> set a batch size of 10000 >>>>>>> Also tried -f with a format file and there was no noticeable > > performance >>>>>> difference (although there did appear to be a bug when using the > > format >>>> file >>>>>> where seemed to ignore the -b option). >>>>>>> >>>>>>> I don't have much access to the Sybase server to do too much >>>> monitoring, >>>>>> but what I could see, it seemed like it was waiting on network I/O > > most of >>>>>> the time. >>>>>>> Is there and easy way to tell of the BCP is using fast bcp versus > > fully >>>> logged >>>>>> besides looking at what's being written to the log file? >>>>>>> >>>>>>> -Ray >>>>>>> >>>>>>>> -----Original Message----- >>>>>>>> From: FreeTDS [mailto:freetds-bounces at lists.ibiblio.org] On Behalf > > Of > >>>>>>>> Matthew >>>>>>>> Sent: Saturday, June 20, 2015 9:40 AM >>>>>>>> To: FreeTDS Development Group >>>>>>>> Subject: Re: [freetds] 0.91 freebcp performance >>>>>>>> >>>>>>>> Hi Ray, >>>>>>>> >>>>>>>> I did come across performance problems when compared to Sybase >>>> bcp >>>>>> but >>>>>>>> those were mostly around text and image data types. Those problems >>>>>>>> appeared to be fixed, in my testing, or at least greatly improved > > when I >>>>>>>> tried a nightly from a few weeks ago. >>>>>>>> >>>>>>>> What's the definition of the table you are using and which flags > > are you >>>>>>>> using? Can you take a look inside the Sybase server and see what > > it's >>>>>>>> waiting for when you use freetds and which packet size the > > connection >>>> is >>>>>>>> using? I assume your comparison is from the same machine and it's > > not >>>>>>>> the case that you're running the Sybase bcp locally and freetds >>>>>>>> remotely? Can you see if both are using fast bcp, i.e. minimally > > logged > >>>>>>>> or are both using fully logged? >>>>>>>> >>>>>>>> Just some ideas unless someone else has got better ones! >>>>>>>> >>>>>>>> Cheers, >>>>>>>> >>>>>>>> Matthew >>>>>>>> >>>>>>>> >>>>>>>> On 20/06/15 15:18, Ray Rankins wrote: >>>>>>>>> Just tested running a large bcp with 0.91 freebcp and the >>>> performance >>>>>> was >>>>>>>> awful. >>>>>>>>> Took 1.5 hours to load 5 million rows (conversely, Sybase bcp > > loaded > >>>> the >>>>>>>> same file in 1.5 minutes). >>>>>>>>> Is there some setting that might be on during compile that would >>>> cause >>>>>>>> freebcp to run slow. >>>>>>>>> I checked and double checked that the debug flags were not enabled >>>>>> (have >>>>>>>> made that mistake before) and they were not. >>>>>>>>> Are there any compile time options that could slow down freebcp >>>> that I >>>>>>>> should make sure are disabled when I compile it? >>>>>>>>> -Ray >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> _______________________________________________ >>>>>>>>> FreeTDS mailing list >>>>>>>>> FreeTDS at lists.ibiblio.org >>>>>>>>> http://lists.ibiblio.org/mailman/listinfo/freetds >>>>>>>> _______________________________________________ >>>>>>>> FreeTDS mailing list >>>>>>>> FreeTDS at lists.ibiblio.org >>>>>>>> http://lists.ibiblio.org/mailman/listinfo/freetds >>>>>>> _______________________________________________ >>>>>>> FreeTDS mailing list >>>>>>> FreeTDS at lists.ibiblio.org >>>>>>> http://lists.ibiblio.org/mailman/listinfo/freetds >>>>>> >>>>>> _______________________________________________ >>>>>> FreeTDS mailing list >>>>>> FreeTDS at lists.ibiblio.org >>>>>> http://lists.ibiblio.org/mailman/listinfo/freetds >>>>> >>>>> _______________________________________________ >>>>> FreeTDS mailing list >>>>> FreeTDS at lists.ibiblio.org >>>>> http://lists.ibiblio.org/mailman/listinfo/freetds >>>> _______________________________________________ >>>> FreeTDS mailing list >>>> FreeTDS at lists.ibiblio.org >>>> http://lists.ibiblio.org/mailman/listinfo/freetds >>> >>> _______________________________________________ >>> FreeTDS mailing list >>> FreeTDS at lists.ibiblio.org >>> http://lists.ibiblio.org/mailman/listinfo/freetds >> _______________________________________________ >> FreeTDS mailing list >> FreeTDS at lists.ibiblio.org >> http://lists.ibiblio.org/mailman/listinfo/freetds > > _______________________________________________ > FreeTDS mailing list > FreeTDS at lists.ibiblio.org > http://lists.ibiblio.org/mailman/listinfo/freetds From sf at 4js.com Thu Jun 25 03:50:49 2015 From: sf at 4js.com (Sebastien FLAESCH) Date: Thu, 25 Jun 2015 09:50:49 +0200 Subject: [freetds] Testing 0.95: What TDS version for SQL Server 2012 / 2014? In-Reply-To: References: <5583DA51.7080708@4js.com> <558661F9.9000106@4js.com> <5589591F.2050608@4js.com> <558ABB25.2090303@4js.com> Message-ID: <558BB2D9.6060605@4js.com> On 06/24/2015 10:13 PM, Frediano Ziglio wrote: > Il 24/Giu/2015 15:16, "Sebastien FLAESCH" ha scritto: >> >> On 06/23/2015 10:25 PM, Frediano Ziglio wrote: >>> >>> 2015-06-23 14:03 GMT+01:00 Sebastien FLAESCH : >>>> >>>> I connect to SQL Server 2014 using FreeTDS 0.95.5 from a Linux Debian > 64b... >>>> >>>> To me SQLDescribeCol() returns unusable type info... >>>> >>>> According to the TDS_Version, I different (incompatible) type info: >>>> >>>> TDS Column Type sqltype precision scale >>>> > --------------------------------------------------------------------------------- >>>> 7.1 VARCHAR(MAX) -1 (SQL_LONGVARCHAR) 2147483647 0 >>>> (ok) >>>> 7.2 VARCHAR(MAX) 12 (SQL_VARCHAR) 1073741823 0 >>>> ??? >>>> 7.3 VARCHAR(MAX) 12 (SQL_VARCHAR) 1073741823 0 >>>> ??? >>>> >>> >>> SQL_VARCHAR is fine. precision should be 0 for 7.2+. There is a test >>> for this and for me returns 0! Are you sure you did everything >>> correct? >> >> >> I am using the same code in Easysoft and SQL Native Client: >> >> SQLULEN precision; >> >> Note that I am connected to SQL Server 2014 and that tdsdump shows: >> >> token.c:1533:tds7_get_data_info: >> colname = t >> type = 39 (varchar) >> server's type = 167 (xvarchar) >> column_varint_size = 8 >> column_size = 1073741823 (1073741823 on server) >> >> ... >> > > Please try SQLDescribeCol. Libtds have slightly different point of view. > As stated from Ms documentation varchar max is returned as varchar with > size 0 (unlimited). Same for freetds. ??? I am confused... of course using SQLDescribeCol(), I just copied lines from TDSDUMP... Why can I see: column_size = 1073741823 (1073741823 on server) Remember: I am using SQL Server 2014... did you try with SQL Server 2014? S. >> >>> >>>> 7.1 TIME(3) -9 ??? 12 0 > (should be >>>> 3) >>>> 7.2 TIME(3) -9 ??? 12 0 > (should be >>>> 3) >>> >>> >>> yes, server return it as a string so 12 is the string length. Scale is >>> obviously 0. >>> >>>> 7.3 TIME(3) -154 (SQL_SS_TIME2/ok) 12 0 > (should be >>>> 3) >>> >>> >>> beside scale other information are fine. >> > > I'll do other test. We can fix it. > > Frediano > >> >> I can deal with this based on the precision. >> >> >>> >>>> What TDS version should I use with SQL Server 2014? >>>> >>> >>> 7.3 is fine. master support 7.4 but there are no improvements (support >>> some session recovery which are not implemented anyway) >>> >>>> Is there a doc reference somewhere? >>>> >>>> Same problems with SQL Server 2012 ... >>>> >>> >>> sql 2012 and sql 2014 use same protocol (7.4) but as I said using sql >>> 2008 protocol is perfectly fine. >>> >>>> Seb >>>> >>> >>> Frediano >>> >>>> On 06/21/2015 09:04 AM, Sebastien FLAESCH wrote: >>>>> >>>>> >>>>> Hi Frediano! >>>>> >>>>> On 06/20/2015 12:33 PM, Frediano Ziglio wrote: >>>>>> >>>>>> >>>>>> Il 19/Giu/2015 10:33, "Sebastien FLAESCH" ha scritto: >>>>>>> >>>>>>> >>>>>>> >>>>>>> Hi all, >>>>>>> >>>>>>> Just installed 0.95.5 got from: >>>>>>> ftp://ftp.freetds.org/pub/freetds/stable/ >>>>>>> (I guess this is the latest stable version?) >>>>>>> >>>>>>> Attached some compilation warnings... >>>>>>> >>>>>> >>>>>> Yes, no problems >>>>>> >>>>>>> Is there an configure option to turn on gcc's address sanitizer? >>>>>> >>>>>> >>>>>> >>>>>> Just define CFLAGS properly calling configure. >>>>>> >>>>>>> We are using this option in our product. >>>>>>> >>>>>> >>>>>> For production?? You known is not meant for production? It slows down >>>>>> quite >>>>>> a lot. >>>>> >>>>> >>>>> >>>>> No of course it's just for internal compilation, production releases >>>>> are compiled with optimization flags... >>>>> >>>>> Seb >>>>>>> >>>>>>> >>>>>>> So far, my QA tests ran ok against SQL Server 2005, will test on > other >>>>>> >>>>>> >>>>>> servers. >>>>>>> >>>>>>> >>>>>>> >>>>>>> Seems that new datetime data types are now supported which is good > news! >>>>>>> >>>>>> >>>>>> As stated in the news :) >>>>>> >>>>>>> Cheers >>>>>>> Seb >>>>>>> >>> _______________________________________________ >>> FreeTDS mailing list >>> FreeTDS at lists.ibiblio.org >>> http://lists.ibiblio.org/mailman/listinfo/freetds >>> >> >> _______________________________________________ >> FreeTDS mailing list >> FreeTDS at lists.ibiblio.org >> http://lists.ibiblio.org/mailman/listinfo/freetds > _______________________________________________ > FreeTDS mailing list > FreeTDS at lists.ibiblio.org > http://lists.ibiblio.org/mailman/listinfo/freetds > From lacak at zoznam.sk Thu Jun 25 04:05:44 2015 From: lacak at zoznam.sk (LacaK) Date: Thu, 25 Jun 2015 10:05:44 +0200 Subject: [freetds] Testing 0.95: What TDS version for SQL Server 2012 / 2014? In-Reply-To: <558BB2D9.6060605@4js.com> References: <5583DA51.7080708@4js.com> <558661F9.9000106@4js.com> <5589591F.2050608@4js.com> <558ABB25.2090303@4js.com> <558BB2D9.6060605@4js.com> Message-ID: <558BB658.4050709@zoznam.sk> >>> colname = t >>> type = 39 (varchar) >>> server's type = 167 (xvarchar) >>> column_varint_size = 8 >>> column_size = 1073741823 (1073741823 on server) >>> >>> ... >>> >> >> Please try SQLDescribeCol. Libtds have slightly different point of view. >> As stated from Ms documentation varchar max is returned as varchar with >> size 0 (unlimited). Same for freetds. > > ??? I am confused... of course using SQLDescribeCol(), I just copied > lines from TDSDUMP... > > Why can I see: > > column_size = 1073741823 (1073741823 on server) > > Remember: I am using SQL Server 2014... did you try with SQL Server 2014? > It is my experience with dblib also. That varchar(MAX) returns for column size "big number", not 0 (I thought that it is as expected) -Laco. From freddy77 at gmail.com Sun Jun 28 16:10:07 2015 From: freddy77 at gmail.com (Frediano Ziglio) Date: Sun, 28 Jun 2015 21:10:07 +0100 Subject: [freetds] Testing 0.95: What TDS version for SQL Server 2012 / 2014? In-Reply-To: <558BB2D9.6060605@4js.com> References: <5583DA51.7080708@4js.com> <558661F9.9000106@4js.com> <5589591F.2050608@4js.com> <558ABB25.2090303@4js.com> <558BB2D9.6060605@4js.com> Message-ID: 2015-06-25 8:50 GMT+01:00 Sebastien FLAESCH : > On 06/24/2015 10:13 PM, Frediano Ziglio wrote: >> >> Il 24/Giu/2015 15:16, "Sebastien FLAESCH" ha scritto: >>> >>> >>> On 06/23/2015 10:25 PM, Frediano Ziglio wrote: >>>> >>>> >>>> 2015-06-23 14:03 GMT+01:00 Sebastien FLAESCH : >>>>> >>>>> >>>>> I connect to SQL Server 2014 using FreeTDS 0.95.5 from a Linux Debian >> >> 64b... >>>>> >>>>> >>>>> To me SQLDescribeCol() returns unusable type info... >>>>> >>>>> According to the TDS_Version, I different (incompatible) type info: >>>>> >>>>> TDS Column Type sqltype precision scale >>>>> >> >> --------------------------------------------------------------------------------- >>>>> >>>>> 7.1 VARCHAR(MAX) -1 (SQL_LONGVARCHAR) 2147483647 0 >>>>> (ok) >>>>> 7.2 VARCHAR(MAX) 12 (SQL_VARCHAR) 1073741823 0 >>>>> ??? >>>>> 7.3 VARCHAR(MAX) 12 (SQL_VARCHAR) 1073741823 0 >>>>> ??? >>>>> >>>> >>>> SQL_VARCHAR is fine. precision should be 0 for 7.2+. There is a test >>>> for this and for me returns 0! Are you sure you did everything >>>> correct? >>> >>> >>> >>> I am using the same code in Easysoft and SQL Native Client: >>> >>> SQLULEN precision; >>> >>> Note that I am connected to SQL Server 2014 and that tdsdump shows: >>> >>> token.c:1533:tds7_get_data_info: >>> colname = t >>> type = 39 (varchar) >>> server's type = 167 (xvarchar) >>> column_varint_size = 8 >>> column_size = 1073741823 (1073741823 on server) >>> >>> ... >>> >> >> Please try SQLDescribeCol. Libtds have slightly different point of view. >> As stated from Ms documentation varchar max is returned as varchar with >> size 0 (unlimited). Same for freetds. > > > ??? I am confused... of course using SQLDescribeCol(), I just copied > lines from TDSDUMP... > > Why can I see: > > column_size = 1073741823 (1073741823 on server) > libTDS is not ODBC > Remember: I am using SQL Server 2014... did you try with SQL Server 2014? > Yes. > S. > > Fixed the scale problem in both 0.95 and master. Frediano > >>> >>>> >>>>> 7.1 TIME(3) -9 ??? 12 0 >> >> (should be >>>>> >>>>> 3) >>>>> 7.2 TIME(3) -9 ??? 12 0 >> >> (should be >>>>> >>>>> 3) >>>> >>>> >>>> >>>> yes, server return it as a string so 12 is the string length. Scale is >>>> obviously 0. >>>> >>>>> 7.3 TIME(3) -154 (SQL_SS_TIME2/ok) 12 0 >> >> (should be >>>>> >>>>> 3) >>>> >>>> >>>> >>>> beside scale other information are fine. >>> >>> >> >> I'll do other test. We can fix it. >> >> Frediano >> >>> >>> I can deal with this based on the precision. >>> >>> >>>> >>>>> What TDS version should I use with SQL Server 2014? >>>>> >>>> >>>> 7.3 is fine. master support 7.4 but there are no improvements (support >>>> some session recovery which are not implemented anyway) >>>> >>>>> Is there a doc reference somewhere? >>>>> >>>>> Same problems with SQL Server 2012 ... >>>>> >>>> >>>> sql 2012 and sql 2014 use same protocol (7.4) but as I said using sql >>>> 2008 protocol is perfectly fine. >>>> >>>>> Seb >>>>> >>>> >>>> Frediano >>>> >>>>> On 06/21/2015 09:04 AM, Sebastien FLAESCH wrote: >>>>>> >>>>>> >>>>>> >>>>>> Hi Frediano! >>>>>> >>>>>> On 06/20/2015 12:33 PM, Frediano Ziglio wrote: >>>>>>> >>>>>>> >>>>>>> >>>>>>> Il 19/Giu/2015 10:33, "Sebastien FLAESCH" ha scritto: >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Hi all, >>>>>>>> >>>>>>>> Just installed 0.95.5 got from: >>>>>>>> ftp://ftp.freetds.org/pub/freetds/stable/ >>>>>>>> (I guess this is the latest stable version?) >>>>>>>> >>>>>>>> Attached some compilation warnings... >>>>>>>> >>>>>>> >>>>>>> Yes, no problems >>>>>>> >>>>>>>> Is there an configure option to turn on gcc's address sanitizer? >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> Just define CFLAGS properly calling configure. >>>>>>> >>>>>>>> We are using this option in our product. >>>>>>>> >>>>>>> >>>>>>> For production?? You known is not meant for production? It slows down >>>>>>> quite >>>>>>> a lot. >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> No of course it's just for internal compilation, production releases >>>>>> are compiled with optimization flags... >>>>>> >>>>>> Seb >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> So far, my QA tests ran ok against SQL Server 2005, will test on >> >> other >>>>>>> >>>>>>> >>>>>>> >>>>>>> servers. >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Seems that new datetime data types are now supported which is good >> >> news! >>>>>>>> >>>>>>>> >>>>>>> >>>>>>> As stated in the news :) >>>>>>> >>>>>>>> Cheers >>>>>>>> Seb >>>>>>>> >>>> _______________________________________________ >>>> FreeTDS mailing list >>>> FreeTDS at lists.ibiblio.org >>>> http://lists.ibiblio.org/mailman/listinfo/freetds >>>> >>> >>> _______________________________________________ >>> FreeTDS mailing list >>> FreeTDS at lists.ibiblio.org >>> http://lists.ibiblio.org/mailman/listinfo/freetds >> >> _______________________________________________ >> FreeTDS mailing list >> FreeTDS at lists.ibiblio.org >> http://lists.ibiblio.org/mailman/listinfo/freetds >> > > _______________________________________________ > FreeTDS mailing list > FreeTDS at lists.ibiblio.org > http://lists.ibiblio.org/mailman/listinfo/freetds From acraigwest at gmail.com Sun Jun 28 19:42:46 2015 From: acraigwest at gmail.com (A. Craig West) Date: Sun, 28 Jun 2015 19:42:46 -0400 Subject: [freetds] Building as a DLL on Windows Message-ID: I discovered that I require freetds to be buildable as a DLL file under Windows, so I have modified the Nmakefile to add some new build targets and directories. After I have tested it a bit, I will port my changes up to head. I am also getting a fault in the compiler on one of the files, but have not investigated the cause yet. It is possible that the issue is already resolved in head. I am currently building with Visual Studio 2008 command line. Jas anybody else dealt with similar issues lately? It seems to have been a while since anybody tried to build DLL's, although it turned out to be pretty easy to implement... -Craig From freddy77 at gmail.com Mon Jun 29 02:30:37 2015 From: freddy77 at gmail.com (Frediano Ziglio) Date: Mon, 29 Jun 2015 07:30:37 +0100 Subject: [freetds] Building as a DLL on Windows In-Reply-To: References: Message-ID: 2015-06-29 0:42 GMT+01:00 A. Craig West : > I discovered that I require freetds to be buildable as a DLL file under > Windows, so I have modified the Nmakefile to add some new build targets and > directories. After I have tested it a bit, I will port my changes up to > head. We are removing nmake support moving to cmake. > I am also getting a fault in the compiler on one of the files, but have not > investigated the cause yet. It is possible that the issue is already > resolved in head. I am currently building with Visual Studio 2008 command > line. We released quite recently possibly problem is still there. Or could be you called a function with wrong arguments. Technically "a fault in the compiler" looks like a compiler bug to me. > Jas anybody else dealt with similar issues lately? It seems to have been a > while since anybody tried to build DLL's, although it turned out to be > pretty easy to implement... > -Craig Frediano From luisdv at icon.co.za Mon Jun 29 12:04:25 2015 From: luisdv at icon.co.za (luisdv at icon.co.za) Date: Mon, 29 Jun 2015 18:04:25 +0200 Subject: [freetds] Building as a DLL on Windows In-Reply-To: References: Message-ID: <004701d0b285$456a6720$d03f3560$@icon.co.za> > I discovered that I require freetds to be buildable as a DLL file under Windows >... > although it turned out to be pretty easy to implement... > -Craig So do I - and nobody seems to have published a Windows .dll. You say it's easy, so can you share the details of how you compiled FreeTDS for Windows? I'm not a C/C++ developer, so I'm not familiar with building C/C++ code... Thanks. From acraigwest at gmail.com Mon Jun 29 14:01:21 2015 From: acraigwest at gmail.com (A. Craig West) Date: Mon, 29 Jun 2015 14:01:21 -0400 Subject: [freetds] Building as a DLL on Windows In-Reply-To: References: Message-ID: I tend to agree, it is pretty much guaranteed to be a compiler bug, but fixing compilers is outside the scope of my current project :-) I find that the first time I build after a clean, it fails, and if I build again it succeeds. I'm not sure if this is actually an error, as it is possible there is a broken object file produced from the failed build that satisfies the time stamps... I will have to look into the cmake option, my nmakefile is working quite well, though. On Mon, Jun 29, 2015 at 2:30 AM, Frediano Ziglio wrote: > 2015-06-29 0:42 GMT+01:00 A. Craig West : > > I discovered that I require freetds to be buildable as a DLL file under > > Windows, so I have modified the Nmakefile to add some new build targets > and > > directories. After I have tested it a bit, I will port my changes up to > > head. > > We are removing nmake support moving to cmake. > > > I am also getting a fault in the compiler on one of the files, but have > not > > investigated the cause yet. It is possible that the issue is already > > resolved in head. I am currently building with Visual Studio 2008 command > > line. > > We released quite recently possibly problem is still there. Or could > be you called a function with wrong arguments. Technically "a fault in > the compiler" looks like a compiler bug to me. > > > Jas anybody else dealt with similar issues lately? It seems to have been > a > > while since anybody tried to build DLL's, although it turned out to be > > pretty easy to implement... > > -Craig > > Frediano > _______________________________________________ > FreeTDS mailing list > FreeTDS at lists.ibiblio.org > http://lists.ibiblio.org/mailman/listinfo/freetds > From freddy77 at gmail.com Tue Jun 30 04:35:11 2015 From: freddy77 at gmail.com (Frediano Ziglio) Date: Tue, 30 Jun 2015 09:35:11 +0100 Subject: [freetds] 0.91 freebcp performance In-Reply-To: <04d84a6cc5f0020ee81bc4c861b15bba@datamartcomputing.com> References: <12d701d0ab5b$9a893000$cf9b9000$@gothamconsulting.com> <55856D44.70208@datamartcomputing.com> <180601d0ad0e$5cce5d80$166b1880$@gothamconsulting.com> <5588582F.9000500@fsautomation.com> <1a1401d0adb8$9e47aeb0$dad70c10$@gothamconsulting.com> <1afc01d0adf4$e5010860$af031920$@gothamconsulting.com> <5b29ee2b0bcb9129eb750bb4e8b1f34f@datamartcomputing.com> <04d84a6cc5f0020ee81bc4c861b15bba@datamartcomputing.com> Message-ID: Sorry this time is my time to confuse people. Yes, there is the option for request a different packet size. By default server can also suggest a given packet size base on its settings but this was not enabled (although supported) in 0.95. The change is really small, just set one bit to say to the server "please give me your suggestion on packet size". Frediano 2015-06-25 8:43 GMT+01:00 : > That I didn't know! I saw it being used in datacopy (confirmed by querying the system tables in both SAP/Sybase and SQL Server) so I just assumed it was implemented for bcp too. > > My mistake, > > Matthew. > > June 24 2015 10:38 PM, "Frediano Ziglio" wrote: >> Il 24/Giu/2015 09:07, ha scritto: >> >>> Glad to hear things are working better! >>> >>> As an aside you could try using a larger packet size and try different >> >> batch sizes to optimise the process even further. Larger packet sizes would >> imply that the Sybase server is set-up to support them ("additional network >> memory" and "max network packet size"). >>> Cheers, >>> >>> Matthew. >> >> I don't think it will change much. Unfortunately I realized that we don't >> ask for packet size for Sybase. There is a patch in master that change a >> bit in the capability. >> >> If it continue like this version 1.0 will be ready this year :-) There are >> already 100 patches since 0.95. >> >> Frediano >> >>> June 23 2015 10:41 PM, "Ray Rankins" >> >> wrote: >>>> Thanks Frediano. >>>> That?s actually what I ended up doing. >>>> I built a copy of 0.95 and installed it in a different folder alongside >> >> the 0.91 version. >>>> In the shell scripts that run the bcp loads, I set the environment >> >> variables to point to the 0.95 >>>> folder and it's working like a charm. >>>> Import of an 83 million row file went from more than a day down to 1 >> >> hour and 42 minutes. >> >>>> >>>> -Ray >>>> >>>>> -----Original Message----- >>>>> From: FreeTDS [mailto:freetds-bounces at lists.ibiblio.org] On Behalf Of >>>>> Frediano Ziglio >>>>> Sent: Tuesday, June 23, 2015 4:27 PM >>>>> To: FreeTDS Development Group >>>>> Subject: Re: [freetds] 0.91 freebcp performance >>>>> >>>>> 2015-06-23 14:29 GMT+01:00 Ray Rankins >>>>> : >>>>>> Thanks David. >>>>>> I was thinking more deeply regarding fast bcp versus "slow" bcp beyond >>>>> just whether there was an index or not. >>>>>> Been working more in SQL Server these days and whether you get >>>>> minimally logged bcp there depends on indexes, triggers, as well as the >>>>> recovery model chosen. >>>>>> >>>>>> Anyway, whether fast or slow bcp, I compared Sybase versus freebcp >> >> both >>>>> with and without indexes on the table and 0.91 version of freebcp was >>>>> considerably slower in both cases. Performance without indexes still >> >> was not >>>>> acceptable. >>>>>> >>>>>> I downloaded and built 0.95 last night and tested the freebcp >> >> included with >>>>> that and that was just as fast (and possibly slightly faster) than the >> >> Sybase >>>>> bcp. >>>>>> So now I guess it may be a matter of convincing them to switch to >> >> 0.95, but >>>>> they are pretty far along in their testing cycle, so it might not be >> >> feasible at >>>>> this point as they'd probably have to go back and regression test >> >> everything >> >>>>> again. >>>>>> >>>>>> -Ray >>>>>> >>>>> >>>>> Glad to ear this! >>>>> >>>>> Usually Unix is very flexible, you could try installing new version >>>>> along the old one. PATH, LD_RUN_PATH, LD_LIBRARY_PATH and --prefix are >>>>> your friends :-) >>>>> >>>>> Frediano >>>>> >>>>>> >>>>>>> -----Original Message----- >>>>>>> From: FreeTDS [mailto:freetds-bounces at lists.ibiblio.org] On Behalf Of >>>>> David >>>>>>> Chang >>>>>>> Sent: Monday, June 22, 2015 2:47 PM >>>>>>> To: FreeTDS Development Group >>>>>>> Subject: Re: [freetds] 0.91 freebcp performance >>>>>>> >>>>>>> Ray, >>>>>>> >>>>>>> I don't use freebcp, but for Sybase bcp, it runs the fast bcp >>>>>>> (non-logged) if you don't have any indexes on the table. Thus, for >>>>>>> large tables, we usually drop the indexes, run the bcp, then create >> >> the >>>>>>> indexes again. >>>>>>> >>>>>>> However, if you are running freebcp and Sybase bcp on the same exact >>>>>>> client and server with the same exact bcp import file to the same >> >> exact >> >>>>>>> database table, I think you've uncovered a bug in freebcp. >>>>>>> >>>>>>> Your table is very narrow (less than 100 bytes wide). You have very >>>>>>> little data (5M rows). I would expect to insert this amount of data >>>>>>> into Sybase in about a minute. >>>>>>> >>>>>>> To test out the fast bcp versus slow bcp, I would create a new table >>>>>>> with the same table structure (but no indexes) and test out freebcp >>>>>>> against it. >>>>>>> >>>>>>> DC >>>>>>> >>>>>>> On 6/22/2015 10:10 AM, Ray Rankins wrote: >>>>>>>> Thanks Matt, >>>>>>>> I might expect some slight performance degradation compared to >>>>> Sybase >>>>>>> bcp (or SQL Server bcp), but I'm seeing orders of magnitude >> >> degradation >>>>> (1.5 >>>>>>> minutes versus 1.5 hours for 5 million rows). >>>>>>>> >>>>>>>> The table is pretty simple - no large object types. >>>>>>>> Mostly int and float fields. Largest char field is 7 characters. >>>>>>>> There is one non-nulllable date field at the end which has a >> >> default - >>>>>>> freebcp didn't like that the file didn't contain a value for the >> >> last field, but I >>>>>>> worked around this using a format file or by making the last field >> >> nullable. >> >>>>>>>> >>>>>>>> CREATE TABLE [dbo].[test_table]( >>>>>>>> [val_geo] [char](5) NOT NULL, >>>>>>>> [cd_wrsi_mdl] [smallint] NOT NULL, >>>>>>>> [cd_geo_srce] [int] NOT NULL, >>>>>>>> [cd_ppty_type_cpr] [char](1) NOT NULL, >>>>>>>> [cd_mrtg_purp_altv] [char](4) NOT NULL, >>>>>>>> [text_grth_multr_mol] [char](7) NOT NULL, >>>>>>>> [cd_geo_type] [smallint] NULL, >>>>>>>> [rate_grth_multr] [float] NULL, >>>>>>>> [rate_std_dev_neg] [float] NULL, >>>>>>>> [rate_std_dev_pstv] [float] NULL, >>>>>>>> [dt_lst_updt] [date] default getdate()NULL >>>>>>>> ) >>>>>>>> >>>>>>>> Initially, I was running freebcp from a Solaris host to SQL Server >> >> on >>>>>>> Windows, but then I tested Sybase bcp and freebcp both running on the >>>>>>> same Solaris client and importing into the same ASE server running >> >> on a >>>>> Linux >>>>>>> host, so it was an apples to apples comparison between the 2. >>>>>>>> >>>>>>>> The import file is a text file, so the flags I'm using are -c, -t, >> >> -r with the -b >>>>> to >>>>>>> set a batch size of 10000 >>>>>>>> Also tried -f with a format file and there was no noticeable >> >> performance >>>>>>> difference (although there did appear to be a bug when using the >> >> format >>>>> file >>>>>>> where seemed to ignore the -b option). >>>>>>>> >>>>>>>> I don't have much access to the Sybase server to do too much >>>>> monitoring, >>>>>>> but what I could see, it seemed like it was waiting on network I/O >> >> most of >>>>>>> the time. >>>>>>>> Is there and easy way to tell of the BCP is using fast bcp versus >> >> fully >>>>> logged >>>>>>> besides looking at what's being written to the log file? >>>>>>>> >>>>>>>> -Ray >>>>>>>> >>>>>>>>> -----Original Message----- >>>>>>>>> From: FreeTDS [mailto:freetds-bounces at lists.ibiblio.org] On Behalf >> >> Of >> >>>>>>>>> Matthew >>>>>>>>> Sent: Saturday, June 20, 2015 9:40 AM >>>>>>>>> To: FreeTDS Development Group >>>>>>>>> Subject: Re: [freetds] 0.91 freebcp performance >>>>>>>>> >>>>>>>>> Hi Ray, >>>>>>>>> >>>>>>>>> I did come across performance problems when compared to Sybase >>>>> bcp >>>>>>> but >>>>>>>>> those were mostly around text and image data types. Those problems >>>>>>>>> appeared to be fixed, in my testing, or at least greatly improved >> >> when I >>>>>>>>> tried a nightly from a few weeks ago. >>>>>>>>> >>>>>>>>> What's the definition of the table you are using and which flags >> >> are you >>>>>>>>> using? Can you take a look inside the Sybase server and see what >> >> it's >>>>>>>>> waiting for when you use freetds and which packet size the >> >> connection >>>>> is >>>>>>>>> using? I assume your comparison is from the same machine and it's >> >> not >>>>>>>>> the case that you're running the Sybase bcp locally and freetds >>>>>>>>> remotely? Can you see if both are using fast bcp, i.e. minimally >> >> logged >> >>>>>>>>> or are both using fully logged? >>>>>>>>> >>>>>>>>> Just some ideas unless someone else has got better ones! >>>>>>>>> >>>>>>>>> Cheers, >>>>>>>>> >>>>>>>>> Matthew >>>>>>>>> >>>>>>>>> >>>>>>>>> On 20/06/15 15:18, Ray Rankins wrote: >>>>>>>>>> Just tested running a large bcp with 0.91 freebcp and the >>>>> performance >>>>>>> was >>>>>>>>> awful. >>>>>>>>>> Took 1.5 hours to load 5 million rows (conversely, Sybase bcp >> >> loaded >> >>>>> the >>>>>>>>> same file in 1.5 minutes). >>>>>>>>>> Is there some setting that might be on during compile that would >>>>> cause >>>>>>>>> freebcp to run slow. >>>>>>>>>> I checked and double checked that the debug flags were not enabled >>>>>>> (have >>>>>>>>> made that mistake before) and they were not. >>>>>>>>>> Are there any compile time options that could slow down freebcp >>>>> that I >>>>>>>>> should make sure are disabled when I compile it? >>>>>>>>>> -Ray >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> _______________________________________________ >>>>>>>>>> FreeTDS mailing list >>>>>>>>>> FreeTDS at lists.ibiblio.org >>>>>>>>>> http://lists.ibiblio.org/mailman/listinfo/freetds >>>>>>>>> _______________________________________________ >>>>>>>>> FreeTDS mailing list >>>>>>>>> FreeTDS at lists.ibiblio.org >>>>>>>>> http://lists.ibiblio.org/mailman/listinfo/freetds >>>>>>>> _______________________________________________ >>>>>>>> FreeTDS mailing list >>>>>>>> FreeTDS at lists.ibiblio.org >>>>>>>> http://lists.ibiblio.org/mailman/listinfo/freetds >>>>>>> >>>>>>> _______________________________________________ >>>>>>> FreeTDS mailing list >>>>>>> FreeTDS at lists.ibiblio.org >>>>>>> http://lists.ibiblio.org/mailman/listinfo/freetds >>>>>> >>>>>> _______________________________________________ >>>>>> FreeTDS mailing list >>>>>> FreeTDS at lists.ibiblio.org >>>>>> http://lists.ibiblio.org/mailman/listinfo/freetds >>>>> _______________________________________________ >>>>> FreeTDS mailing list >>>>> FreeTDS at lists.ibiblio.org >>>>> http://lists.ibiblio.org/mailman/listinfo/freetds >>>> >>>> _______________________________________________ >>>> FreeTDS mailing list >>>> FreeTDS at lists.ibiblio.org >>>> http://lists.ibiblio.org/mailman/listinfo/freetds >>> _______________________________________________ >>> FreeTDS mailing list >>> FreeTDS at lists.ibiblio.org >>> http://lists.ibiblio.org/mailman/listinfo/freetds >> >> _______________________________________________ >> FreeTDS mailing list >> FreeTDS at lists.ibiblio.org >> http://lists.ibiblio.org/mailman/listinfo/freetds > _______________________________________________ > FreeTDS mailing list > FreeTDS at lists.ibiblio.org > http://lists.ibiblio.org/mailman/listinfo/freetds From freddy77 at gmail.com Tue Jun 30 04:40:34 2015 From: freddy77 at gmail.com (Frediano Ziglio) Date: Tue, 30 Jun 2015 09:40:34 +0100 Subject: [freetds] Building as a DLL on Windows In-Reply-To: References: Message-ID: Are you sure is not something related to dependency? The problem of nmakefile is that is lack lot of stuff. Is not able to detect additional libraries (openssl, iconv, gnutls and so on). It does not take version from same sources (configure) so it has to be manually changed every time. It does not compile all full package (tests). It does not generate files like versions scripts (for instance resource versioning for dlls). It does not generate files from git sources. To add all these feature is quite hard and is mainly a duplication effort. Actually even cmake+autoconf is a bit a duplication but first serve very much fine Windows while second is better for *nixes. Frediano 2015-06-29 19:01 GMT+01:00 A. Craig West : > I tend to agree, it is pretty much guaranteed to be a compiler bug, but > fixing compilers is outside the scope of my current project :-) > I find that the first time I build after a clean, it fails, and if I build > again it succeeds. I'm not sure if this is actually an error, as it is > possible there is a broken object file produced from the failed build that > satisfies the time stamps... > I will have to look into the cmake option, my nmakefile is working quite > well, though. > > On Mon, Jun 29, 2015 at 2:30 AM, Frediano Ziglio wrote: > >> 2015-06-29 0:42 GMT+01:00 A. Craig West : >> > I discovered that I require freetds to be buildable as a DLL file under >> > Windows, so I have modified the Nmakefile to add some new build targets >> and >> > directories. After I have tested it a bit, I will port my changes up to >> > head. >> >> We are removing nmake support moving to cmake. >> >> > I am also getting a fault in the compiler on one of the files, but have >> not >> > investigated the cause yet. It is possible that the issue is already >> > resolved in head. I am currently building with Visual Studio 2008 command >> > line. >> >> We released quite recently possibly problem is still there. Or could >> be you called a function with wrong arguments. Technically "a fault in >> the compiler" looks like a compiler bug to me. >> >> > Jas anybody else dealt with similar issues lately? It seems to have been >> a >> > while since anybody tried to build DLL's, although it turned out to be >> > pretty easy to implement... >> > -Craig >>