From franta at hanzlici.cz Wed Jul 2 12:33:03 2014 From: franta at hanzlici.cz (Frantisek Hanzlik) Date: Wed, 02 Jul 2014 18:33:03 +0200 Subject: [freetds] bsqldb crashes, fisql does not give the desired results Message-ID: <53B4343F.6050507@hanzlici.cz> I'm absolute newbie in SQL, thus please forgive me if I do something stupid. I tried run this script (which is working fine with \Program Files\Microsoft SQL Server\90\Tools\Binn\osql.exe from MS SQL server 2005 on Windows 2003 server) : --- script begin declare @CityOd varchar(10), @CityDo varchar(10), @datumStavu datetime set @CityOd = 'ADAMOV' set @CityDo = 'WIEN' set @datumStavu = '2014-07-02' create table #tmp(no_ varchar(20), up decimal(38,20), s12 decimal(38,20), s14 decimal(38,20), s5416 decimal(38,20)) declare c cursor for select No_, [Unit Price] from [MyDB$Item] k where [Item Category Code] = 'E-SHOP' declare @no varchar(20), @up decimal(38,20), @s12 decimal(38,20), @s14 decimal(38,20), @s5416 decimal(38,20) open c fetch c into @no, @up while @@fetch_status=0 begin SELECT @s12 = isnull(SUM([s12]),0), at s14=isnull(SUM([s14]),0) FROM [MyDB$TBL1] WITH (READUNCOMMITTED) WHERE (bucket=5 AND f2=@no AND ((f8>=@CityOd AND f8<=@CityDo))) AND f3 < @datumStavu SELECT @s5416=isnull(SUM([s5416]),0) FROM [MyDB$TBL2] WITH (READUNCOMMITTED) WHERE (bucket=6 AND f1=1 AND f5=2 AND f6=@no AND ((f7>=@CityOd AND f7<=@CityDo))) and f10 < @datumStavu insert into #tmp values(@no, @up, @s12, @s14, @s5416) fetch c into @no, @up end close c deallocate c select * from #tmp drop table #tmp go --- script end on bsqldb and fisql from freetds-0.91-6.gitf3ae29d.fc19.x86_64 on Fedora 19 x86_64. When I run bsqldb with params: -i SQL -U user -P pwd -S sqlsrv -D test -t " " -e SQLerr -o SQLout -h -v *** Error in `/bin/bsqldb': free(): invalid pointer: 0x000000000064ae00 *** ======= Backtrace: ========= /lib64/libc.so.6[0x3b2607d0b8] /lib64/libsybdb.so.5(dbnextrow+0x369)[0x3ec820e1b9] /bin/bsqldb[0x40308b] /bin/bsqldb[0x4022a2] /lib64/libc.so.6(__libc_start_main+0xf5)[0x3b26021b45] /bin/bsqldb[0x402431] ======= Memory map: ======== 00400000-00406000 r-xp 00000000 09:01 1736030 /usr/bin/bsqldb 00605000-00606000 r--p 00005000 09:01 1736030 /usr/bin/bsqldb 00606000-0060a000 rw-p 00006000 09:01 1736030 /usr/bin/bsqldb 0060a000-0064f000 rw-p 00000000 00:00 0 [heap] 3974200000-3974279000 r-xp 00000000 09:01 1707453 /usr/lib64/libfreebl3.so 3974279000-3974478000 ---p 00079000 09:01 1707453 /usr/lib64/libfreebl3.so ... 7ffff1ab2000-7ffff7fd7000 r--p 00000000 09:01 1734848 /usr/lib/locale/locale-archive 7ffff7fd7000-7ffff7fe3000 rw-p 00000000 00:00 0 7ffff7ff1000-7ffff7ff4000 rw-p 00000000 00:00 0 7ffff7ff4000-7ffff7ffb000 r--s 00000000 09:01 1734941 /usr/lib64/gconv/gconv-modules.cache 7ffff7ffb000-7ffff7ffd000 rw-p 00000000 00:00 0 7ffff7ffd000-7ffff7fff000 r-xp 00000000 00:00 0 [vdso] 7ffffffde000-7ffffffff000 rw-p 00000000 00:00 0 [stack] ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall] Program received signal SIGABRT, Aborted. 0x0000003b260359e9 in __GI_raise (sig=sig at entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56 56 return INLINE_SYSCALL (tgkill, 3, pid, selftid, sig); And stack backtrace is: #0 0x0000003b260359e9 in __GI_raise (sig=sig at entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56 #1 0x0000003b260370f8 in __GI_abort () at abort.c:90 #2 0x0000003b26075d17 in __libc_message (do_abort=do_abort at entry=2, fmt=fmt at entry=0x3b2617e568 "*** Error in `%s': %s: 0x%s ***\n") at ../sysdeps/unix/sysv/linux/libc_fatal.c:196 #3 0x0000003b2607d0b8 in malloc_printerr (ptr=, str=0x3b2617bc75 "free(): invalid pointer", action=3) at malloc.c:4937 #4 _int_free (av=0x3b263ba780 , p=, have_lock=0) at malloc.c:3789 #5 0x0000003ec820e1b9 in buffer_add_row (resinfo=0x614440, dbproc=0x6133c0) at buffering.h:500 #6 dbnextrow (dbproc=dbproc at entry=0x6133c0) at dblib.c:2071 #7 0x000000000040308b in print_results (dbproc=dbproc at entry=0x6133c0) at bsqldb.c:535 #8 0x00000000004022a2 in main (argc=, argv=0x7fffffffe508) at bsqldb.c:210 When I tried run this SQL script with 'fisql' with params: -i SQL -U user -P pwd -S sqlsrv -D test -e SQLerr -o SQLout -w 65500 -n then program run seemingly without error, but SQLout output is weird: no_ up s12 s14 s5416 -------------------------------------------------------------------------------- -- --- --- ----- DB-LIBRARY error: Data conversion resulted in overflow Operating-system error: Success K2030446 -- --- --- ----- DB-LIBRARY error: Data conversion resulted in overflow Operating-system error: Success K2030457 -- --- --- ----- DB-LIBRARY error: Data conversion resulted in overflow Operating-system error: Success K2030469 -- --- --- ----- DB-LIBRARY error: Data conversion resulted in overflow Operating-system error: Success K2030471 -- --- --- ----- ... Can anyone advise me what I'm doing wrong? Thanks in advance, Franta Hanzlik From freddy77 at gmail.com Wed Jul 2 16:21:33 2014 From: freddy77 at gmail.com (Frediano Ziglio) Date: Wed, 2 Jul 2014 21:21:33 +0100 Subject: [freetds] bsqldb crashes, fisql does not give the desired results In-Reply-To: <53B4343F.6050507@hanzlici.cz> References: <53B4343F.6050507@hanzlici.cz> Message-ID: 2014-07-02 17:33 GMT+01:00 Frantisek Hanzlik : > I'm absolute newbie in SQL, thus please forgive me if I do something > stupid. > I tried run this script (which is working fine with > \Program Files\Microsoft SQL Server\90\Tools\Binn\osql.exe > from MS SQL server 2005 on Windows 2003 server) : > > > --- script begin > declare > @CityOd varchar(10), > @CityDo varchar(10), > @datumStavu datetime > > set @CityOd = 'ADAMOV' > set @CityDo = 'WIEN' > set @datumStavu = '2014-07-02' > > create table #tmp(no_ varchar(20), up decimal(38,20), > s12 decimal(38,20), s14 decimal(38,20), s5416 decimal(38,20)) > declare c cursor for > select No_, [Unit Price] from [MyDB$Item] k > where [Item Category Code] = 'E-SHOP' > > declare @no varchar(20), > @up decimal(38,20), > @s12 decimal(38,20), > @s14 decimal(38,20), > @s5416 decimal(38,20) > > open c > fetch c into @no, @up > while @@fetch_status=0 > begin > SELECT @s12 = isnull(SUM([s12]),0), at s14=isnull(SUM([s14]),0) FROM > [MyDB$TBL1] > WITH (READUNCOMMITTED) WHERE (bucket=5 AND f2=@no AND > ((f8>=@CityOd AND f8<=@CityDo))) > AND f3 < @datumStavu > > SELECT @s5416=isnull(SUM([s5416]),0) FROM [MyDB$TBL2] WITH > (READUNCOMMITTED) > WHERE (bucket=6 AND f1=1 AND f5=2 AND f6=@no AND ((f7>=@CityOd AND > f7<=@CityDo))) > and f10 < @datumStavu > > insert into #tmp values(@no, @up, @s12, @s14, @s5416) > fetch c into @no, @up > end > close c > deallocate c > select * from #tmp > drop table #tmp > go > --- script end > > I think this can be written again using a single select statement. However, not the problem > on bsqldb and fisql from freetds-0.91-6.gitf3ae29d.fc19.x86_64 on > Fedora 19 x86_64. > > When I run bsqldb with params: > -i SQL -U user -P pwd -S sqlsrv -D test -t " " -e SQLerr -o SQLout -h -v > > *** Error in `/bin/bsqldb': free(): invalid pointer: 0x000000000064ae00 *** > ======= Backtrace: ========= > /lib64/libc.so.6[0x3b2607d0b8] > /lib64/libsybdb.so.5(dbnextrow+0x369)[0x3ec820e1b9] > /bin/bsqldb[0x40308b] > /bin/bsqldb[0x4022a2] > /lib64/libc.so.6(__libc_start_main+0xf5)[0x3b26021b45] > /bin/bsqldb[0x402431] > ======= Memory map: ======== > 00400000-00406000 r-xp 00000000 09:01 1736030 > /usr/bin/bsqldb > 00605000-00606000 r--p 00005000 09:01 1736030 > /usr/bin/bsqldb > 00606000-0060a000 rw-p 00006000 09:01 1736030 > /usr/bin/bsqldb > 0060a000-0064f000 rw-p 00000000 00:00 0 > [heap] > 3974200000-3974279000 r-xp 00000000 09:01 1707453 > /usr/lib64/libfreebl3.so > 3974279000-3974478000 ---p 00079000 09:01 1707453 > /usr/lib64/libfreebl3.so > ... > 7ffff1ab2000-7ffff7fd7000 r--p 00000000 09:01 1734848 > /usr/lib/locale/locale-archive > 7ffff7fd7000-7ffff7fe3000 rw-p 00000000 00:00 0 > 7ffff7ff1000-7ffff7ff4000 rw-p 00000000 00:00 0 > 7ffff7ff4000-7ffff7ffb000 r--s 00000000 09:01 1734941 > /usr/lib64/gconv/gconv-modules.cache > 7ffff7ffb000-7ffff7ffd000 rw-p 00000000 00:00 0 > 7ffff7ffd000-7ffff7fff000 r-xp 00000000 00:00 0 > [vdso] > 7ffffffde000-7ffffffff000 rw-p 00000000 00:00 0 > [stack] > ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 > [vsyscall] > > Program received signal SIGABRT, Aborted. > 0x0000003b260359e9 in __GI_raise (sig=sig at entry=6) at > ../nptl/sysdeps/unix/sysv/linux/raise.c:56 > 56 return INLINE_SYSCALL (tgkill, 3, pid, selftid, sig); > > And stack backtrace is: > #0 0x0000003b260359e9 in __GI_raise (sig=sig at entry=6) at > ../nptl/sysdeps/unix/sysv/linux/raise.c:56 > #1 0x0000003b260370f8 in __GI_abort () at abort.c:90 > #2 0x0000003b26075d17 in __libc_message (do_abort=do_abort at entry=2, > fmt=fmt at entry=0x3b2617e568 "*** Error in `%s': %s: 0x%s ***\n") at > ../sysdeps/unix/sysv/linux/libc_fatal.c:196 > #3 0x0000003b2607d0b8 in malloc_printerr (ptr=, > str=0x3b2617bc75 "free(): invalid pointer", action=3) at malloc.c:4937 > #4 _int_free (av=0x3b263ba780 , p=, > have_lock=0) at malloc.c:3789 > #5 0x0000003ec820e1b9 in buffer_add_row (resinfo=0x614440, > dbproc=0x6133c0) at buffering.h:500 > #6 dbnextrow (dbproc=dbproc at entry=0x6133c0) at dblib.c:2071 > #7 0x000000000040308b in print_results (dbproc=dbproc at entry=0x6133c0) at > bsqldb.c:535 > #8 0x00000000004022a2 in main (argc=, argv=0x7fffffffe508) > at bsqldb.c:210 > > This is surely a bug of FreeTDS > > When I tried run this SQL script with 'fisql' with params: > -i SQL -U user -P pwd -S sqlsrv -D test -e SQLerr -o SQLout -w 65500 -n > > then program run seemingly without error, but SQLout output is weird: > > no_ > up s12 s14 s5416 > -------------------------------------------------------------------------------- > -- --- --- ----- > DB-LIBRARY error: > Data conversion resulted in overflow > Operating-system error: > Success > K2030446 > -- --- --- ----- > DB-LIBRARY error: > Data conversion resulted in overflow > Operating-system error: > Success > K2030457 > -- --- --- ----- > DB-LIBRARY error: > Data conversion resulted in overflow > Operating-system error: > Success > K2030469 > -- --- --- ----- > DB-LIBRARY error: > Data conversion resulted in overflow > Operating-system error: > Success > K2030471 > -- --- --- ----- > ... > > Here possibly fisql is not allocating correctly output buffers > > Can anyone advise me what I'm doing wrong? > > Thanks in advance, Franta Hanzlik > > > I'll try to run the same query. Frediano From freddy77 at gmail.com Wed Jul 2 16:26:22 2014 From: freddy77 at gmail.com (Frediano Ziglio) Date: Wed, 2 Jul 2014 21:26:22 +0100 Subject: [freetds] bsqldb crashes, fisql does not give the desired results In-Reply-To: <53B4343F.6050507@hanzlici.cz> References: <53B4343F.6050507@hanzlici.cz> Message-ID: Sorry, I didn't note I don't have all required tables. Can you do and send a dump (TDSDUMP) ? Frediano 2014-07-02 17:33 GMT+01:00 Frantisek Hanzlik : > I'm absolute newbie in SQL, thus please forgive me if I do something > stupid. > I tried run this script (which is working fine with > \Program Files\Microsoft SQL Server\90\Tools\Binn\osql.exe > from MS SQL server 2005 on Windows 2003 server) : > > > --- script begin > declare > @CityOd varchar(10), > @CityDo varchar(10), > @datumStavu datetime > > set @CityOd = 'ADAMOV' > set @CityDo = 'WIEN' > set @datumStavu = '2014-07-02' > > create table #tmp(no_ varchar(20), up decimal(38,20), > s12 decimal(38,20), s14 decimal(38,20), s5416 decimal(38,20)) > declare c cursor for > select No_, [Unit Price] from [MyDB$Item] k > where [Item Category Code] = 'E-SHOP' > > declare @no varchar(20), > @up decimal(38,20), > @s12 decimal(38,20), > @s14 decimal(38,20), > @s5416 decimal(38,20) > > open c > fetch c into @no, @up > while @@fetch_status=0 > begin > SELECT @s12 = isnull(SUM([s12]),0), at s14=isnull(SUM([s14]),0) FROM > [MyDB$TBL1] > WITH (READUNCOMMITTED) WHERE (bucket=5 AND f2=@no AND > ((f8>=@CityOd AND f8<=@CityDo))) > AND f3 < @datumStavu > > SELECT @s5416=isnull(SUM([s5416]),0) FROM [MyDB$TBL2] WITH > (READUNCOMMITTED) > WHERE (bucket=6 AND f1=1 AND f5=2 AND f6=@no AND ((f7>=@CityOd AND > f7<=@CityDo))) > and f10 < @datumStavu > > insert into #tmp values(@no, @up, @s12, @s14, @s5416) > fetch c into @no, @up > end > close c > deallocate c > select * from #tmp > drop table #tmp > go > --- script end > > on bsqldb and fisql from freetds-0.91-6.gitf3ae29d.fc19.x86_64 on > Fedora 19 x86_64. > > When I run bsqldb with params: > -i SQL -U user -P pwd -S sqlsrv -D test -t " " -e SQLerr -o SQLout -h -v > > *** Error in `/bin/bsqldb': free(): invalid pointer: 0x000000000064ae00 *** > ======= Backtrace: ========= > /lib64/libc.so.6[0x3b2607d0b8] > /lib64/libsybdb.so.5(dbnextrow+0x369)[0x3ec820e1b9] > /bin/bsqldb[0x40308b] > /bin/bsqldb[0x4022a2] > /lib64/libc.so.6(__libc_start_main+0xf5)[0x3b26021b45] > /bin/bsqldb[0x402431] > ======= Memory map: ======== > 00400000-00406000 r-xp 00000000 09:01 1736030 > /usr/bin/bsqldb > 00605000-00606000 r--p 00005000 09:01 1736030 > /usr/bin/bsqldb > 00606000-0060a000 rw-p 00006000 09:01 1736030 > /usr/bin/bsqldb > 0060a000-0064f000 rw-p 00000000 00:00 0 > [heap] > 3974200000-3974279000 r-xp 00000000 09:01 1707453 > /usr/lib64/libfreebl3.so > 3974279000-3974478000 ---p 00079000 09:01 1707453 > /usr/lib64/libfreebl3.so > ... > 7ffff1ab2000-7ffff7fd7000 r--p 00000000 09:01 1734848 > /usr/lib/locale/locale-archive > 7ffff7fd7000-7ffff7fe3000 rw-p 00000000 00:00 0 > 7ffff7ff1000-7ffff7ff4000 rw-p 00000000 00:00 0 > 7ffff7ff4000-7ffff7ffb000 r--s 00000000 09:01 1734941 > /usr/lib64/gconv/gconv-modules.cache > 7ffff7ffb000-7ffff7ffd000 rw-p 00000000 00:00 0 > 7ffff7ffd000-7ffff7fff000 r-xp 00000000 00:00 0 > [vdso] > 7ffffffde000-7ffffffff000 rw-p 00000000 00:00 0 > [stack] > ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 > [vsyscall] > > Program received signal SIGABRT, Aborted. > 0x0000003b260359e9 in __GI_raise (sig=sig at entry=6) at > ../nptl/sysdeps/unix/sysv/linux/raise.c:56 > 56 return INLINE_SYSCALL (tgkill, 3, pid, selftid, sig); > > And stack backtrace is: > #0 0x0000003b260359e9 in __GI_raise (sig=sig at entry=6) at > ../nptl/sysdeps/unix/sysv/linux/raise.c:56 > #1 0x0000003b260370f8 in __GI_abort () at abort.c:90 > #2 0x0000003b26075d17 in __libc_message (do_abort=do_abort at entry=2, > fmt=fmt at entry=0x3b2617e568 "*** Error in `%s': %s: 0x%s ***\n") at > ../sysdeps/unix/sysv/linux/libc_fatal.c:196 > #3 0x0000003b2607d0b8 in malloc_printerr (ptr=, > str=0x3b2617bc75 "free(): invalid pointer", action=3) at malloc.c:4937 > #4 _int_free (av=0x3b263ba780 , p=, > have_lock=0) at malloc.c:3789 > #5 0x0000003ec820e1b9 in buffer_add_row (resinfo=0x614440, > dbproc=0x6133c0) at buffering.h:500 > #6 dbnextrow (dbproc=dbproc at entry=0x6133c0) at dblib.c:2071 > #7 0x000000000040308b in print_results (dbproc=dbproc at entry=0x6133c0) at > bsqldb.c:535 > #8 0x00000000004022a2 in main (argc=, argv=0x7fffffffe508) > at bsqldb.c:210 > > > > When I tried run this SQL script with 'fisql' with params: > -i SQL -U user -P pwd -S sqlsrv -D test -e SQLerr -o SQLout -w 65500 -n > > then program run seemingly without error, but SQLout output is weird: > > no_ > up s12 s14 s5416 > -------------------------------------------------------------------------------- > -- --- --- ----- > DB-LIBRARY error: > Data conversion resulted in overflow > Operating-system error: > Success > K2030446 > -- --- --- ----- > DB-LIBRARY error: > Data conversion resulted in overflow > Operating-system error: > Success > K2030457 > -- --- --- ----- > DB-LIBRARY error: > Data conversion resulted in overflow > Operating-system error: > Success > K2030469 > -- --- --- ----- > DB-LIBRARY error: > Data conversion resulted in overflow > Operating-system error: > Success > K2030471 > -- --- --- ----- > ... > > > Can anyone advise me what I'm doing wrong? > > Thanks in advance, Franta Hanzlik > > _______________________________________________ > FreeTDS mailing list > FreeTDS at lists.ibiblio.org > http://lists.ibiblio.org/mailman/listinfo/freetds > From franta at hanzlici.cz Wed Jul 2 17:24:35 2014 From: franta at hanzlici.cz (Frantisek Hanzlik) Date: Wed, 02 Jul 2014 23:24:35 +0200 Subject: [freetds] bsqldb crashes, fisql does not give the desired results In-Reply-To: References: <53B4343F.6050507@hanzlici.cz> Message-ID: <53B47893.90701@hanzlici.cz> Frediano Ziglio wrote: > Sorry, I didn't note I don't have all required tables. Can you do and send > a dump (TDSDUMP) ? > > Frediano > > > 2014-07-02 17:33 GMT+01:00 Frantisek Hanzlik : > >> I'm absolute newbie in SQL, thus please forgive me if I do something >> stupid. >> I tried run this script (which is working fine with >> \Program Files\Microsoft SQL Server\90\Tools\Binn\osql.exe >> from MS SQL server 2005 on Windows 2003 server) : >> >> >> --- script begin >> declare >> @CityOd varchar(10), >> @CityDo varchar(10), >> @datumStavu datetime >> >> set @CityOd = 'ADAMOV' >> set @CityDo = 'WIEN' >> set @datumStavu = '2014-07-02' >> >> create table #tmp(no_ varchar(20), up decimal(38,20), >> s12 decimal(38,20), s14 decimal(38,20), s5416 decimal(38,20)) >> declare c cursor for >> select No_, [Unit Price] from [MyDB$Item] k >> where [Item Category Code] = 'E-SHOP' >> >> declare @no varchar(20), >> @up decimal(38,20), >> @s12 decimal(38,20), >> @s14 decimal(38,20), >> @s5416 decimal(38,20) >> >> open c >> fetch c into @no, @up >> while @@fetch_status=0 >> begin >> SELECT @s12 = isnull(SUM([s12]),0), at s14=isnull(SUM([s14]),0) FROM >> [MyDB$TBL1] >> WITH (READUNCOMMITTED) WHERE (bucket=5 AND f2=@no AND >> ((f8>=@CityOd AND f8<=@CityDo))) >> AND f3 < @datumStavu >> >> SELECT @s5416=isnull(SUM([s5416]),0) FROM [MyDB$TBL2] WITH >> (READUNCOMMITTED) >> WHERE (bucket=6 AND f1=1 AND f5=2 AND f6=@no AND ((f7>=@CityOd AND >> f7<=@CityDo))) >> and f10 < @datumStavu >> >> insert into #tmp values(@no, @up, @s12, @s14, @s5416) >> fetch c into @no, @up >> end >> close c >> deallocate c >> select * from #tmp >> drop table #tmp >> go >> --- script end >> >> on bsqldb and fisql from freetds-0.91-6.gitf3ae29d.fc19.x86_64 on >> Fedora 19 x86_64. >> >> When I run bsqldb with params: >> -i SQL -U user -P pwd -S sqlsrv -D test -t " " -e SQLerr -o SQLout -h -v >> >> *** Error in `/bin/bsqldb': free(): invalid pointer: 0x000000000064ae00 *** >> ======= Backtrace: ========= >> /lib64/libc.so.6[0x3b2607d0b8] >> /lib64/libsybdb.so.5(dbnextrow+0x369)[0x3ec820e1b9] >> /bin/bsqldb[0x40308b] >> /bin/bsqldb[0x4022a2] >> /lib64/libc.so.6(__libc_start_main+0xf5)[0x3b26021b45] >> /bin/bsqldb[0x402431] >> ======= Memory map: ======== >> 00400000-00406000 r-xp 00000000 09:01 1736030 >> /usr/bin/bsqldb >> 00605000-00606000 r--p 00005000 09:01 1736030 >> /usr/bin/bsqldb >> 00606000-0060a000 rw-p 00006000 09:01 1736030 >> /usr/bin/bsqldb >> 0060a000-0064f000 rw-p 00000000 00:00 0 >> [heap] >> 3974200000-3974279000 r-xp 00000000 09:01 1707453 >> /usr/lib64/libfreebl3.so >> 3974279000-3974478000 ---p 00079000 09:01 1707453 >> /usr/lib64/libfreebl3.so >> ... >> 7ffff1ab2000-7ffff7fd7000 r--p 00000000 09:01 1734848 >> /usr/lib/locale/locale-archive >> 7ffff7fd7000-7ffff7fe3000 rw-p 00000000 00:00 0 >> 7ffff7ff1000-7ffff7ff4000 rw-p 00000000 00:00 0 >> 7ffff7ff4000-7ffff7ffb000 r--s 00000000 09:01 1734941 >> /usr/lib64/gconv/gconv-modules.cache >> 7ffff7ffb000-7ffff7ffd000 rw-p 00000000 00:00 0 >> 7ffff7ffd000-7ffff7fff000 r-xp 00000000 00:00 0 >> [vdso] >> 7ffffffde000-7ffffffff000 rw-p 00000000 00:00 0 >> [stack] >> ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 >> [vsyscall] >> >> Program received signal SIGABRT, Aborted. >> 0x0000003b260359e9 in __GI_raise (sig=sig at entry=6) at >> ../nptl/sysdeps/unix/sysv/linux/raise.c:56 >> 56 return INLINE_SYSCALL (tgkill, 3, pid, selftid, sig); >> >> And stack backtrace is: >> #0 0x0000003b260359e9 in __GI_raise (sig=sig at entry=6) at >> ../nptl/sysdeps/unix/sysv/linux/raise.c:56 >> #1 0x0000003b260370f8 in __GI_abort () at abort.c:90 >> #2 0x0000003b26075d17 in __libc_message (do_abort=do_abort at entry=2, >> fmt=fmt at entry=0x3b2617e568 "*** Error in `%s': %s: 0x%s ***\n") at >> ../sysdeps/unix/sysv/linux/libc_fatal.c:196 >> #3 0x0000003b2607d0b8 in malloc_printerr (ptr=, >> str=0x3b2617bc75 "free(): invalid pointer", action=3) at malloc.c:4937 >> #4 _int_free (av=0x3b263ba780 , p=, >> have_lock=0) at malloc.c:3789 >> #5 0x0000003ec820e1b9 in buffer_add_row (resinfo=0x614440, >> dbproc=0x6133c0) at buffering.h:500 >> #6 dbnextrow (dbproc=dbproc at entry=0x6133c0) at dblib.c:2071 >> #7 0x000000000040308b in print_results (dbproc=dbproc at entry=0x6133c0) at >> bsqldb.c:535 >> #8 0x00000000004022a2 in main (argc=, argv=0x7fffffffe508) >> at bsqldb.c:210 >> >> >> >> When I tried run this SQL script with 'fisql' with params: >> -i SQL -U user -P pwd -S sqlsrv -D test -e SQLerr -o SQLout -w 65500 -n >> >> then program run seemingly without error, but SQLout output is weird: >> >> no_ >> up s12 s14 s5416 >> -------------------------------------------------------------------------------- >> -- --- --- ----- >> DB-LIBRARY error: >> Data conversion resulted in overflow >> Operating-system error: >> Success >> K2030446 >> -- --- --- ----- >> DB-LIBRARY error: >> Data conversion resulted in overflow >> Operating-system error: >> Success >> K2030457 >> -- --- --- ----- >> DB-LIBRARY error: >> Data conversion resulted in overflow >> Operating-system error: >> Success >> K2030469 >> -- --- --- ----- >> DB-LIBRARY error: >> Data conversion resulted in overflow >> Operating-system error: >> Success >> K2030471 >> -- --- --- ----- >> ... >> >> >> Can anyone advise me what I'm doing wrong? >> >> Thanks in advance, Franta Hanzlik Hi Frediano, thank you for the quick reply. Please, could you specify a little more detail, what should I do? Although MS osql result output is approx. 3100 rows and 600 kB size, source tables are big (table MyDB$Item has ~ 64 MB, table MyDB$TBL1 ~ 426 MB and table MyDB$TBL2 ~ 444 MB). Also, I not know what is "TDSDUMP", sorry. Thanks, Franta Hanzlik From nem at emptec.com Thu Jul 3 10:29:58 2014 From: nem at emptec.com (Nem W Schlecht) Date: Thu, 3 Jul 2014 09:29:58 -0500 Subject: [freetds] Two issues with defncopy Message-ID: Hello all! Longtime user/admirer of the FreeTDS package, so first off I must thank and praise everybody who has contributed to the development of this extremely useful package. Thank you! :) Secondly, I've had a couple of issues with 'defncopy' that I investigated and fixed on my local copy, but want to know from the developers if the changes I've made are stupid or not. :) My first issue was that every now and then 'defncopy' would seem to eat a space or two. I'd have a stored procedure with a line like this (in a SELECT): , some_field_name AS some_field_alias Which would come out of 'defncopy' as: , some_field_nameAS some_field_alias Which then throws an error upon re-loading into a database as the field "some_field_nameAS" doesn't exist. When the space *after* the AS gets eaten, it'll reload successfully, but then my client will have issues as the field alias is "ASsome_field_alias". I've seen others report this issue on the internet and with a little trial and error, I can now replicate the issue with the attached stored procedure - where it will eat up 50 spaces and leave me with a bad field alias. (dbo.defncopy_test.sql) Just load this stored procedure into tempdb and then dump it out via defncopy and the spaces between "AS" and "defncopytest" should disappear. If you add a couple more of the 50 space concatenation lines in the SELECT, you'll see that it'll eat spaces inbetween the single quotes as well (very bad, IMO, since those spaces might be something that I really need). The issue is a combination of things. First off, defncopy uses an old table, syscomments, to find the stored procedure code. This stores the code in 4000 character chunks, which defncopy fetches and re-assembles. If any of those chunks has trailing spaces, they get removed by lines 7269-7271 in dblib/dblib.c. The space(s) have to occur at a chunk boundry (4000 chars, 8000 chars, etc). In my case, I have a large number of stored procedures and about .5% of them have an issue with whitespace being eaten when I dump them out via 'defncopy'. My solution: comment out lines 7269-7271 in dblib/dblib.c. So far, I haven't seen any adverse issues with having done this, but I don't know the code well enough to know if I just screwed up something else. :) Since syscomment is a deprecated table, defncopy really should be updated to to use either: EXEC sp_helptext 'procowner.procname'; or SELECT OBJECT_DEFINITION(OBJECT_ID('procowner.procname')) I'm not sure about backward compatibility with these, though (I can test SQL Server 2005 on and both work in all of them). But either of these returns the text of a stored procedure in a nicer way, IMO, than syscomment does. I prefer using OBJECT_DEFINITION(). My second issue with 'defncopy' is that I recently converted pretty much everything I work with over to UTF-8. Besides a few issues (still no UTF-8 support in grep!), it's gone quite well. :) My issue with defncopy is that after I switched my locale from C to C.UTF-8, it would always core dump. Increasing the size of sql_text in 546 in defncopy.c from 8000 to 16000 fixed that problem though and it has been working perfectly since. I've attached a patch file for both of these changes and would appreciate any feedback/discussion. :) -- Nem W Schlecht "Perl did the magic. I just waved the wand." -------------- next part -------------- A non-text attachment was scrubbed... Name: dbo.defncopy_test.sql Type: text/x-sql Size: 4139 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: defncopy-fix.patch Type: application/octet-stream Size: 1534 bytes Desc: not available URL: From franta at hanzlici.cz Thu Jul 3 04:14:27 2014 From: franta at hanzlici.cz (Frantisek Hanzlik) Date: Thu, 03 Jul 2014 10:14:27 +0200 Subject: [freetds] bsqldb crashes, fisql does not give the desired results In-Reply-To: References: <53B4343F.6050507@hanzlici.cz> Message-ID: <53B510E3.10400@hanzlici.cz> Hi Frediano, sorry for my previous mail, I now traced what is TDSDUMP, and in attachment are dumps from both freetds utilities: -rw-r--r--. 1 root root 5057241 Jul 3 10:06 freetds-bsqldb.log -rw-r--r--. 1 root root 17898380 Jul 3 10:05 freetds-fisql.log ("tar xJf tdsdump.txz" should extract them) Thanks, Franta Hanzlik Frediano Ziglio wrote: > Sorry, I didn't note I don't have all required tables. Can you do and send > a dump (TDSDUMP) ? > > Frediano > > > 2014-07-02 17:33 GMT+01:00 Frantisek Hanzlik : > >> I'm absolute newbie in SQL, thus please forgive me if I do something >> stupid. >> I tried run this script (which is working fine with >> \Program Files\Microsoft SQL Server\90\Tools\Binn\osql.exe >> from MS SQL server 2005 on Windows 2003 server) : >> >> >> --- script begin >> declare >> @CityOd varchar(10), >> @CityDo varchar(10), >> @datumStavu datetime >> >> set @CityOd = 'ADAMOV' >> set @CityDo = 'WIEN' >> set @datumStavu = '2014-07-02' >> >> create table #tmp(no_ varchar(20), up decimal(38,20), >> s12 decimal(38,20), s14 decimal(38,20), s5416 decimal(38,20)) >> declare c cursor for >> select No_, [Unit Price] from [MyDB$Item] k >> where [Item Category Code] = 'E-SHOP' >> >> declare @no varchar(20), >> @up decimal(38,20), >> @s12 decimal(38,20), >> @s14 decimal(38,20), >> @s5416 decimal(38,20) >> >> open c >> fetch c into @no, @up >> while @@fetch_status=0 >> begin >> SELECT @s12 = isnull(SUM([s12]),0), at s14=isnull(SUM([s14]),0) FROM >> [MyDB$TBL1] >> WITH (READUNCOMMITTED) WHERE (bucket=5 AND f2=@no AND >> ((f8>=@CityOd AND f8<=@CityDo))) >> AND f3 < @datumStavu >> >> SELECT @s5416=isnull(SUM([s5416]),0) FROM [MyDB$TBL2] WITH >> (READUNCOMMITTED) >> WHERE (bucket=6 AND f1=1 AND f5=2 AND f6=@no AND ((f7>=@CityOd AND >> f7<=@CityDo))) >> and f10 < @datumStavu >> >> insert into #tmp values(@no, @up, @s12, @s14, @s5416) >> fetch c into @no, @up >> end >> close c >> deallocate c >> select * from #tmp >> drop table #tmp >> go >> --- script end >> >> on bsqldb and fisql from freetds-0.91-6.gitf3ae29d.fc19.x86_64 on >> Fedora 19 x86_64. >> >> When I run bsqldb with params: >> -i SQL -U user -P pwd -S sqlsrv -D test -t " " -e SQLerr -o SQLout -h -v >> >> *** Error in `/bin/bsqldb': free(): invalid pointer: 0x000000000064ae00 *** >> ======= Backtrace: ========= >> /lib64/libc.so.6[0x3b2607d0b8] >> /lib64/libsybdb.so.5(dbnextrow+0x369)[0x3ec820e1b9] >> /bin/bsqldb[0x40308b] >> /bin/bsqldb[0x4022a2] >> /lib64/libc.so.6(__libc_start_main+0xf5)[0x3b26021b45] >> /bin/bsqldb[0x402431] >> ======= Memory map: ======== >> 00400000-00406000 r-xp 00000000 09:01 1736030 >> /usr/bin/bsqldb >> 00605000-00606000 r--p 00005000 09:01 1736030 >> /usr/bin/bsqldb >> 00606000-0060a000 rw-p 00006000 09:01 1736030 >> /usr/bin/bsqldb >> 0060a000-0064f000 rw-p 00000000 00:00 0 >> [heap] >> 3974200000-3974279000 r-xp 00000000 09:01 1707453 >> /usr/lib64/libfreebl3.so >> 3974279000-3974478000 ---p 00079000 09:01 1707453 >> /usr/lib64/libfreebl3.so >> ... >> 7ffff1ab2000-7ffff7fd7000 r--p 00000000 09:01 1734848 >> /usr/lib/locale/locale-archive >> 7ffff7fd7000-7ffff7fe3000 rw-p 00000000 00:00 0 >> 7ffff7ff1000-7ffff7ff4000 rw-p 00000000 00:00 0 >> 7ffff7ff4000-7ffff7ffb000 r--s 00000000 09:01 1734941 >> /usr/lib64/gconv/gconv-modules.cache >> 7ffff7ffb000-7ffff7ffd000 rw-p 00000000 00:00 0 >> 7ffff7ffd000-7ffff7fff000 r-xp 00000000 00:00 0 >> [vdso] >> 7ffffffde000-7ffffffff000 rw-p 00000000 00:00 0 >> [stack] >> ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 >> [vsyscall] >> >> Program received signal SIGABRT, Aborted. >> 0x0000003b260359e9 in __GI_raise (sig=sig at entry=6) at >> ../nptl/sysdeps/unix/sysv/linux/raise.c:56 >> 56 return INLINE_SYSCALL (tgkill, 3, pid, selftid, sig); >> >> And stack backtrace is: >> #0 0x0000003b260359e9 in __GI_raise (sig=sig at entry=6) at >> ../nptl/sysdeps/unix/sysv/linux/raise.c:56 >> #1 0x0000003b260370f8 in __GI_abort () at abort.c:90 >> #2 0x0000003b26075d17 in __libc_message (do_abort=do_abort at entry=2, >> fmt=fmt at entry=0x3b2617e568 "*** Error in `%s': %s: 0x%s ***\n") at >> ../sysdeps/unix/sysv/linux/libc_fatal.c:196 >> #3 0x0000003b2607d0b8 in malloc_printerr (ptr=, >> str=0x3b2617bc75 "free(): invalid pointer", action=3) at malloc.c:4937 >> #4 _int_free (av=0x3b263ba780 , p=, >> have_lock=0) at malloc.c:3789 >> #5 0x0000003ec820e1b9 in buffer_add_row (resinfo=0x614440, >> dbproc=0x6133c0) at buffering.h:500 >> #6 dbnextrow (dbproc=dbproc at entry=0x6133c0) at dblib.c:2071 >> #7 0x000000000040308b in print_results (dbproc=dbproc at entry=0x6133c0) at >> bsqldb.c:535 >> #8 0x00000000004022a2 in main (argc=, argv=0x7fffffffe508) >> at bsqldb.c:210 >> >> >> >> When I tried run this SQL script with 'fisql' with params: >> -i SQL -U user -P pwd -S sqlsrv -D test -e SQLerr -o SQLout -w 65500 -n >> >> then program run seemingly without error, but SQLout output is weird: >> >> no_ >> up s12 s14 s5416 >> -------------------------------------------------------------------------------- >> -- --- --- ----- >> DB-LIBRARY error: >> Data conversion resulted in overflow >> Operating-system error: >> Success >> K2030446 >> -- --- --- ----- >> DB-LIBRARY error: >> Data conversion resulted in overflow >> Operating-system error: >> Success >> K2030457 >> -- --- --- ----- >> DB-LIBRARY error: >> Data conversion resulted in overflow >> Operating-system error: >> Success >> K2030469 >> -- --- --- ----- >> DB-LIBRARY error: >> Data conversion resulted in overflow >> Operating-system error: >> Success >> K2030471 >> -- --- --- ----- >> ... >> >> >> Can anyone advise me what I'm doing wrong? >> >> Thanks in advance, Franta Hanzlik >> >> _______________________________________________ >> 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 > > !DSPAM:53b46b01290689648517549! > -- S pozdravem Franti?ek Hanzl?k Lu?n? 502 Linux/Unix/LAN/Internet Tel: +420-372-222302 33209 ?t?novice e-mail:franta at hanzlici.cz Fax: +420-372-222302 Czech Republic http://hanzlici.cz/ GSM: +420-604-117319 Tento mail neobsahuje viry, byl odesl?n z opera?n?ho syst?mu Linux -------------- next part -------------- A non-text attachment was scrubbed... Name: tdsdump.txz Type: application/x-xz-compressed-tar Size: 190484 bytes Desc: not available URL: From jklowden at freetds.org Thu Jul 3 19:43:05 2014 From: jklowden at freetds.org (James K. Lowden) Date: Thu, 3 Jul 2014 19:43:05 -0400 Subject: [freetds] Two issues with defncopy In-Reply-To: References: Message-ID: <20140703194305.d12b1f5d.jklowden@freetds.org> On Thu, 3 Jul 2014 09:29:58 -0500 Nem W Schlecht wrote: > Since syscomment is a deprecated table, defncopy really should be > updated to to use either: > EXEC sp_helptext 'procowner.procname'; > or > SELECT OBJECT_DEFINITION(OBJECT_ID('procowner.procname')) Hello Nem, and thanks for your careful work. When defncopy was new, SQL Server 2005 was still in the future. Selecting from syscomments is what Sybase's utility did (and would still have to do on Sybase servers). As I remember, a word could be split across two rows. The logic should probably leave (at least one of) the trailing blanks in place, and stitch the rows together. Agreed OBJECT_DEFINITION is a better choice now if available. defncopy could probe for it and fall back on syscomments if it's not there. That's would be a service to the FreeTDS community and more worthwhile than fixing the 0.5% errors associated with syscomments. In re UTF-8, I have to guess some of your DDL contains non-ASCII characters, and defncopy assumes a character is 1 byte. Your 2x fix will work until someone has column names in ancient Chinese. Han Dynasty objects never fail to surprise. Happy hacking. --jkl From franta at hanzlici.cz Sat Jul 5 05:46:18 2014 From: franta at hanzlici.cz (Frantisek Hanzlik) Date: Sat, 05 Jul 2014 11:46:18 +0200 Subject: [freetds] .dev.YYYY.mmdd hardcoded docdir? Message-ID: <53B7C96A.9040202@hanzlici.cz> A few days ago I wrote here about problems with bsqldb and fisql; now I tried build last git2a830b1 version (because my Fedora 19 has older version 0.91-gitf3ae29d (0a42888 ?) sometimes from November 2013, and I was hoping that new version will be working better). But I have problem with making FreeTDS RPM package - it seems that new git version ignore "--docdir" configure option and always install doc into albeit right "/usr/share/doc/" directory, however here into "freetds-0.92.dev.YYYYmmdd" (where YYYYmmdd is actual date) - though I was specifying "--docdir=/usr/share/doc/freetds-0.92". It is intended, or I'm doing some mistake? IMO docdir (or other package directories) should not depend on current date, but rather on version ev. git subversion only }and should be configurable). Thanks, Franta Hanzlik From freddy77 at gmail.com Sun Jul 6 05:29:58 2014 From: freddy77 at gmail.com (Frediano Ziglio) Date: Sun, 6 Jul 2014 11:29:58 +0200 Subject: [freetds] .dev.YYYY.mmdd hardcoded docdir? In-Reply-To: <53B7C96A.9040202@hanzlici.cz> References: <53B7C96A.9040202@hanzlici.cz> Message-ID: Confirmed, at https://gitorious.org/freetds/freetds/source/8780c1f243abef142756bb9caf0062196d48b9d7:doc/Makefile.am#L9-17 TARGET_DOCDIR uses $(datadir) (which is usually /usr/share) so the problem. I'm not sure however about --docdir. Should it point to main root (like /usr/share/doc) or specific to project? I think you are referring to configure option, in configure I have docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' I think we don't use this as we want to embed the version to this directory however looking at my /usr/share/doc directory there is no versions but only package name so perhaps the target we use is not right. Our spec file say The freetds-doc package contains the useguide and reference of FreeTDS and can be installed even if FreeTDS main package is not installed But this does not say we should be able to install different versions Frediano 2014-07-05 11:46 GMT+02:00 Frantisek Hanzlik : > A few days ago I wrote here about problems with bsqldb and fisql; > now I tried build last git2a830b1 version (because my Fedora 19 has > older version 0.91-gitf3ae29d (0a42888 ?) sometimes from November > 2013, and I was hoping that new version will be working better). > But I have problem with making FreeTDS RPM package - it seems that > new git version ignore "--docdir" configure option and always install > doc into albeit right "/usr/share/doc/" directory, however here into > "freetds-0.92.dev.YYYYmmdd" (where YYYYmmdd is actual date) - though > I was specifying "--docdir=/usr/share/doc/freetds-0.92". > > It is intended, or I'm doing some mistake? IMO docdir (or other > package directories) should not depend on current date, but rather > on version ev. git subversion only }and should be configurable). > > Thanks, Franta Hanzlik > > _______________________________________________ > FreeTDS mailing list > FreeTDS at lists.ibiblio.org > http://lists.ibiblio.org/mailman/listinfo/freetds > From olka at bagheera.se Sun Jul 6 09:32:58 2014 From: olka at bagheera.se (Ola Karlsson) Date: Sun, 6 Jul 2014 13:32:58 +0000 Subject: [freetds] Problem with nvarchar output Message-ID: Hi I'm using Freetds with PHP5 to access a SQL server but I'm having trouble with the output parameters. I have two parameters, one SQLINT4 and one SQLVARCHAR. The int is working but I don't get any returns from the varchar. Is there anything special that needs to be done when outputting nvarchar? PHP binds, mssql_bind($stmt, '@ErrorMsg',$ErrorMsg,SQLVARCHAR,true,false,4000); mssql_bind($stmt, '@OrderNr',$OrderNr,SQLINT4,true,true,8); SQL parameters, @ErrorMsg nvarchar(4000) output @OrderNr Jeeves_OrderNo output Sql server, SQL Server 2008 R2 Freetds server, Ubuntu 12.04 3.5.0-51-generic Tsql -C Version: freetds v0.91 freetds.conf directory: /etc/freetds MS db-lib source compatibility: no Sybase binary compatibility: yes Thread safety: yes iconv library: yes TDS version: 4.2 iODBC: no unixodbc: yes SSPI "trusted" logins: no Kerberos: no Freetds conf, [global] text size = 64512 [Sqlserver] host = xxx.xxx.xxx.xxx port = xxxx tds version = 8.0 PHP5 PHP 5.3.10-1ubuntu3.12 BR Ola From jklowden at freetds.org Mon Jul 7 00:00:16 2014 From: jklowden at freetds.org (James K. Lowden) Date: Mon, 7 Jul 2014 00:00:16 -0400 Subject: [freetds] Problem with nvarchar output In-Reply-To: References: Message-ID: <20140707000016.23217717.jklowden@freetds.org> On Sun, 6 Jul 2014 13:32:58 +0000 Ola Karlsson wrote: > I'm using Freetds with PHP5 to access a SQL server but I'm having > trouble with the output parameters. http://www.freetds.org/faq.html#ms.output.parameters Unless PHP is using the RPC API functions, you won't see output parameters from a modern Microsoft server. Hoppas det hj?lper. --jkl From jklowden at freetds.org Mon Jul 7 00:12:27 2014 From: jklowden at freetds.org (James K. Lowden) Date: Mon, 7 Jul 2014 00:12:27 -0400 Subject: [freetds] .dev.YYYY.mmdd hardcoded docdir? In-Reply-To: References: <53B7C96A.9040202@hanzlici.cz> Message-ID: <20140707001227.e7985ea7.jklowden@freetds.org> On Sun, 6 Jul 2014 11:29:58 +0200 Frediano Ziglio wrote: > I'm not sure however about --docdir. Should it point to main root > (like /usr/share/doc) or specific to project? > > I think you are referring to configure option, in configure I have > > docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' Hi Freddy, I think the HTML install location was overengineered way back when. ISTM it should be just docdir='${datarootdir}/doc/freetds' for the same reason that the libraries are installed in PREFIX/lib: Only one version is installed, and only one version of the documentation need be installed. Nowadays autoconf supports htmldir, which seems more appropriate. Mea culpa. I plead youthful exuberance and lack of elders to guide me. --jkl From olka at bagheera.se Tue Jul 8 06:34:55 2014 From: olka at bagheera.se (Ola Karlsson) Date: Tue, 8 Jul 2014 10:34:55 +0000 Subject: [freetds] Problem with nvarchar output In-Reply-To: <20140707000016.23217717.jklowden@freetds.org> References: <20140707000016.23217717.jklowden@freetds.org> Message-ID: >http://www.freetds.org/faq.html#ms.output.parameters >Unless PHP is using the RPC API functions, you won't see output parameters from a modern Microsoft server. As my integer output parameters are working im guessing this is not the problem. Everything works, except the varchar(4000). BR Ola From cwthomas at llu.edu Tue Jul 8 18:37:34 2014 From: cwthomas at llu.edu (Thomas, Christopher (LLU)) Date: Tue, 8 Jul 2014 22:37:34 +0000 Subject: [freetds] Problem with nvarchar output In-Reply-To: References: <20140707000016.23217717.jklowden@freetds.org> Message-ID: Look at phpinfo() and check the values for mssql.textsize and mssql.textlimit. They might be related to your problem. Chris -----Original Message----- From: FreeTDS [mailto:freetds-bounces at lists.ibiblio.org] On Behalf Of Ola Karlsson Sent: Tuesday, July 08, 2014 3:35 AM To: FreeTDS Development Group Subject: Re: [freetds] Problem with nvarchar output >http://www.freetds.org/faq.html#ms.output.parameters >Unless PHP is using the RPC API functions, you won't see output parameters from a modern Microsoft server. As my integer output parameters are working im guessing this is not the problem. Everything works, except the varchar(4000). BR Ola _______________________________________________ FreeTDS mailing list FreeTDS at lists.ibiblio.org http://lists.ibiblio.org/mailman/listinfo/freetds From matevz.mr at gmail.com Fri Jul 11 02:31:07 2014 From: matevz.mr at gmail.com (=?UTF-8?B?TWF0ZXbFviBNcmFr?=) Date: Fri, 11 Jul 2014 08:31:07 +0200 Subject: [freetds] [unixODBC][Driver Manager]Function sequence error Message-ID: I am using mxODBC with unixODBC and FreeTDS driver 8.0 on OSX to connect MSSQL Server 2008 R2 on other Windows machine in network. I can connect with python and execute queries but when creating database with script I am getting this error: InterfaceError: ('HY010', 0, '[unixODBC][Driver Manager]Function sequence error', 5258) - File "/Users/matevzmrak/Desktop/praksa_fajli/projekt/ana/ana/srv/orm/driver.py", line 101, in execute[0m[31m15:28:59.787 0.0.0.0 {unknown} - Query to execute: sp_pkeys 'Currencies' - File "/Users/matevzmrak/Desktop/praksa_fajli/projekt/ana/ana/srv/orm/driver.py", line 102, in execute at this qry: http://shrani.si/f/30/P8/3E6CUA0m/screen-shot-2014-07-10-a.png *freetds.conf:* [DSNmy] host = 10.13.7.248 port = 1433 tds version = 8.0 client charset = UTF-8 *odbc.ini:* [ODBC Data Sources] DSNmy = mysqlDriver [DSNmy] Driver = /usr/local/Cellar/freetds/lib/libtdsodbc.so Server = 10.13.7.248Database = tst UID = ana-rpc PWD = s21s22 Port = 1433 TDS_Version = 8.0 *odbcinst.ini:* [ODBC Drivers] mysqlDriver = Installed [mysqlDriver] Driver = /usr/local/Cellar/freetds/lib/libtdsodbc.so Setup = /usr/local/Cellar/freetds/lib/libtdsodbc.so UsageCount = 1 *Specs:* *MSSQL Server:* 2008 R2 *FreeTDS:* latest stable version *OSX version:* 10.9.3 *UCS:* UCS2 *Eclipse:* Eclipse Standard/SDK - Kepler Service Release - Build id: 20140224-0627 *Python: 2.7.6* - 64bit *mxBase version:* egenix-mx-base-3.2.7-py2.7_ucs2-macosx-10.5-x86_64-prebuilt *mxODBC version:* egenix-mxodbc-3.1.2.macosx-10.5-x86_64-py2.7_ucs2.prebuilt *unixODBC:* 2.3.2 (this sample script works normally with no error, on my case there is probably some issue with driver because database create is working without problems on Windows machine) from mx.ODBC.unixODBC import DriverConnect db = DriverConnect('DSN=DSNmy;UID=ana-rpc;PWD=s21s22')print db c = db.cursor() c.execute('''CREATE TABLE article ( article_name varchar(20), article_desc varchar(20));''') db.commit() Best regards, Matevz -- Lep pozdrav, Matev? Mrak From matevz.mr at gmail.com Fri Jul 11 03:29:12 2014 From: matevz.mr at gmail.com (=?UTF-8?B?TWF0ZXbFviBNcmFr?=) Date: Fri, 11 Jul 2014 09:29:12 +0200 Subject: [freetds] [unixODBC][Driver Manager]Function sequence error In-Reply-To: References: Message-ID: I forgot to post my ODBC trace log: http://pastie.org/9377035 Best regards, Matevz 2014-07-11 8:31 GMT+02:00 Matev? Mrak : > I am using mxODBC with unixODBC and FreeTDS driver 8.0 on OSX to connect > MSSQL Server 2008 R2 on other Windows machine in network. > > I can connect with python and execute queries but when creating database > with script I am getting this error: > > InterfaceError: ('HY010', 0, '[unixODBC][Driver Manager]Function sequence error', 5258) > - File "/Users/matevzmrak/Desktop/praksa_fajli/projekt/ana/ana/srv/orm/driver.py", line 101, in execute[0m[31m15:28:59.787 0.0.0.0 {unknown} - Query to execute: sp_pkeys 'Currencies' - File "/Users/matevzmrak/Desktop/praksa_fajli/projekt/ana/ana/srv/orm/driver.py", line 102, in execute > > at this qry: > > http://shrani.si/f/30/P8/3E6CUA0m/screen-shot-2014-07-10-a.png > > *freetds.conf:* > > [DSNmy] > host = 10.13.7.248 > port = 1433 > tds version = 8.0 > client charset = UTF-8 > > *odbc.ini:* > > [ODBC Data Sources] > DSNmy = mysqlDriver > [DSNmy] > Driver = /usr/local/Cellar/freetds/lib/libtdsodbc.so > Server = 10.13.7.248Database = tst > UID = ana-rpc > PWD = s21s22 > Port = 1433 > TDS_Version = 8.0 > > *odbcinst.ini:* > > [ODBC Drivers] > mysqlDriver = Installed > [mysqlDriver] > Driver = /usr/local/Cellar/freetds/lib/libtdsodbc.so > Setup = /usr/local/Cellar/freetds/lib/libtdsodbc.so > UsageCount = 1 > > *Specs:* > > *MSSQL Server:* 2008 R2 > *FreeTDS:* latest stable version > *OSX version:* 10.9.3 > *UCS:* UCS2 > *Eclipse:* Eclipse Standard/SDK - Kepler Service Release - Build id: > 20140224-0627 > *Python: 2.7.6* - 64bit > *mxBase version:* > egenix-mx-base-3.2.7-py2.7_ucs2-macosx-10.5-x86_64-prebuilt > *mxODBC version:* > egenix-mxodbc-3.1.2.macosx-10.5-x86_64-py2.7_ucs2.prebuilt > *unixODBC:* 2.3.2 (this sample script works normally with no error, on my > case there is probably some issue with driver because database create is > working without problems on Windows machine) > > from mx.ODBC.unixODBC import DriverConnect > > db = DriverConnect('DSN=DSNmy;UID=ana-rpc;PWD=s21s22')print db > c = db.cursor() > > c.execute('''CREATE TABLE article ( > article_name varchar(20), > article_desc varchar(20));''') > > db.commit() > > Best regards, Matevz > > -- > Lep pozdrav, > Matev? Mrak > -- Lep pozdrav, Matev? Mrak From freddy77 at gmail.com Sat Jul 12 03:06:05 2014 From: freddy77 at gmail.com (Frediano Ziglio) Date: Sat, 12 Jul 2014 08:06:05 +0100 Subject: [freetds] Problem with nvarchar output In-Reply-To: References: Message-ID: Hi, did you check TDSDUMP ? Frediano 2014-07-06 14:32 GMT+01:00 Ola Karlsson : > Hi > I'm using Freetds with PHP5 to access a SQL server but I'm having trouble > with the output parameters. > I have two parameters, one SQLINT4 and one SQLVARCHAR. The int is working > but I don't get any returns from the varchar. > > Is there anything special that needs to be done when outputting nvarchar? > > PHP binds, > mssql_bind($stmt, '@ErrorMsg',$ErrorMsg,SQLVARCHAR,true,false,4000); > mssql_bind($stmt, '@OrderNr',$OrderNr,SQLINT4,true,true,8); > > SQL parameters, > @ErrorMsg nvarchar(4000) output > @OrderNr Jeeves_OrderNo output > > > Sql server, > SQL Server 2008 R2 > > Freetds server, > Ubuntu 12.04 3.5.0-51-generic > > Tsql -C > Version: freetds v0.91 > freetds.conf directory: /etc/freetds > MS db-lib source compatibility: no > Sybase binary compatibility: yes > Thread safety: yes > iconv library: yes > TDS version: 4.2 > iODBC: no > unixodbc: yes > SSPI "trusted" logins: no > Kerberos: no > > Freetds conf, > [global] > text size = 64512 > [Sqlserver] > host = xxx.xxx.xxx.xxx > port = xxxx > tds version = 8.0 > > PHP5 > PHP 5.3.10-1ubuntu3.12 > > > BR > Ola > _______________________________________________ > FreeTDS mailing list > FreeTDS at lists.ibiblio.org > http://lists.ibiblio.org/mailman/listinfo/freetds > From freddy77 at gmail.com Sat Jul 12 03:12:07 2014 From: freddy77 at gmail.com (Frediano Ziglio) Date: Sat, 12 Jul 2014 08:12:07 +0100 Subject: [freetds] [unixODBC][Driver Manager]Function sequence error In-Reply-To: References: Message-ID: Cannot see any error in the trace Frediano 2014-07-11 8:29 GMT+01:00 Matev? Mrak : > I forgot to post my ODBC trace log: http://pastie.org/9377035 > > Best regards, Matevz > > > 2014-07-11 8:31 GMT+02:00 Matev? Mrak : > > > I am using mxODBC with unixODBC and FreeTDS driver 8.0 on OSX to connect > > MSSQL Server 2008 R2 on other Windows machine in network. > > > > I can connect with python and execute queries but when creating database > > with script I am getting this error: > > > > InterfaceError: ('HY010', 0, '[unixODBC][Driver Manager]Function > sequence error', 5258) > > - File > "/Users/matevzmrak/Desktop/praksa_fajli/projekt/ana/ana/srv/orm/driver.py", > line 101, in execute[0m[31m15:28:59.787 0.0.0.0 {unknown} - Query to > execute: sp_pkeys 'Currencies' - File > "/Users/matevzmrak/Desktop/praksa_fajli/projekt/ana/ana/srv/orm/driver.py", > line 102, in execute > > > > at this qry: > > > > http://shrani.si/f/30/P8/3E6CUA0m/screen-shot-2014-07-10-a.png > > > > *freetds.conf:* > > > > [DSNmy] > > host = 10.13.7.248 > > port = 1433 > > tds version = 8.0 > > client charset = UTF-8 > > > > *odbc.ini:* > > > > [ODBC Data Sources] > > DSNmy = mysqlDriver > > [DSNmy] > > Driver = /usr/local/Cellar/freetds/lib/libtdsodbc.so > > Server = 10.13.7.248Database = tst > > UID = ana-rpc > > PWD = s21s22 > > Port = 1433 > > TDS_Version = 8.0 > > > > *odbcinst.ini:* > > > > [ODBC Drivers] > > mysqlDriver = Installed > > [mysqlDriver] > > Driver = /usr/local/Cellar/freetds/lib/libtdsodbc.so > > Setup = /usr/local/Cellar/freetds/lib/libtdsodbc.so > > UsageCount = 1 > > > > *Specs:* > > > > *MSSQL Server:* 2008 R2 > > *FreeTDS:* latest stable version > > *OSX version:* 10.9.3 > > *UCS:* UCS2 > > *Eclipse:* Eclipse Standard/SDK - Kepler Service Release - Build id: > > 20140224-0627 > > *Python: 2.7.6* - 64bit > > *mxBase version:* > > egenix-mx-base-3.2.7-py2.7_ucs2-macosx-10.5-x86_64-prebuilt > > *mxODBC version:* > > egenix-mxodbc-3.1.2.macosx-10.5-x86_64-py2.7_ucs2.prebuilt > > *unixODBC:* 2.3.2 (this sample script works normally with no error, on my > > case there is probably some issue with driver because database create is > > working without problems on Windows machine) > > > > from mx.ODBC.unixODBC import DriverConnect > > > > db = DriverConnect('DSN=DSNmy;UID=ana-rpc;PWD=s21s22')print db > > c = db.cursor() > > > > c.execute('''CREATE TABLE article ( > > article_name varchar(20), > > article_desc varchar(20));''') > > > > db.commit() > > > > Best regards, Matevz > > > > -- > > Lep pozdrav, > > Matev? Mrak > > > > > > -- > Lep pozdrav, > Matev? Mrak > _______________________________________________ > FreeTDS mailing list > FreeTDS at lists.ibiblio.org > http://lists.ibiblio.org/mailman/listinfo/freetds > From jklowden at freetds.org Sat Jul 12 10:10:21 2014 From: jklowden at freetds.org (James K. Lowden) Date: Sat, 12 Jul 2014 10:10:21 -0400 Subject: [freetds] [unixODBC][Driver Manager]Function sequence error In-Reply-To: References: Message-ID: <20140712101021.6b35b1ae.jklowden@freetds.org> On Fri, 11 Jul 2014 08:31:07 +0200 Matev? Mrak wrote: > InterfaceError: ('HY010', 0, '[unixODBC][Driver Manager]Function > sequence error', 5258) > - File > "/Users/matevzmrak/Desktop/praksa_fajli/projekt/ana/ana/srv/orm/driver.py", Doesn't "function sequence error" mean you called the ODBC function in an incorrect sequence, i.e., when you're not supposed to? For example if you try to execute a query on an unopened connection, you'll get an error that says the connection handle is invalid. In other cases, though the handles are valid but the order of operation is unsupported. I would look at the ODBC trace of the calls made, and verify that it makes sense. HTH. --jkl From venkatakrishnat1 at gmail.com Sun Jul 13 01:52:44 2014 From: venkatakrishnat1 at gmail.com (venkata krishna Thaluru) Date: Sun, 13 Jul 2014 11:22:44 +0530 Subject: [freetds] Unclosed quotation mark Message-ID: Hi All, I am exporting data to MSSQL server and getting below error. ODBC error (42000). [FreeTDS][SQL Server]Unclosed quotation mark after the character string ' test Could you please share your thoughts and ideas to resolve it or any know issue in freeTDS ,please share it. Thanks Venkata Krishna 9600185503 From freddy77 at gmail.com Sun Jul 13 08:35:55 2014 From: freddy77 at gmail.com (Frediano Ziglio) Date: Sun, 13 Jul 2014 13:35:55 +0100 Subject: [freetds] Unclosed quotation mark In-Reply-To: References: Message-ID: Looks like you sent a query with a wrong syntax. Can you enable ODBC tracing or TDSDUMP ? Frediano 2014-07-13 6:52 GMT+01:00 venkata krishna Thaluru < venkatakrishnat1 at gmail.com>: > Hi All, > I am exporting data to MSSQL server and getting below error. > > ODBC error (42000). [FreeTDS][SQL Server]Unclosed quotation mark after the > character string ' test > > Could you please share your thoughts and ideas to resolve it or any know > issue in freeTDS ,please share it. > > > Thanks > Venkata Krishna > 9600185503 > _______________________________________________ > FreeTDS mailing list > FreeTDS at lists.ibiblio.org > http://lists.ibiblio.org/mailman/listinfo/freetds > From freddy77 at gmail.com Sun Jul 13 12:10:40 2014 From: freddy77 at gmail.com (Frediano Ziglio) Date: Sun, 13 Jul 2014 17:10:40 +0100 Subject: [freetds] .dev.YYYY.mmdd hardcoded docdir? In-Reply-To: <20140707001227.e7985ea7.jklowden@freetds.org> References: <53B7C96A.9040202@hanzlici.cz> <20140707001227.e7985ea7.jklowden@freetds.org> Message-ID: 2014-07-07 5:12 GMT+01:00 James K. Lowden : > On Sun, 6 Jul 2014 11:29:58 +0200 > Frediano Ziglio wrote: > > > I'm not sure however about --docdir. Should it point to main root > > (like /usr/share/doc) or specific to project? > > > > I think you are referring to configure option, in configure I have > > > > docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' > > Hi Freddy, > > I think the HTML install location was overengineered way back when. > ISTM it should be just > > docdir='${datarootdir}/doc/freetds' > > for the same reason that the libraries are installed in PREFIX/lib: > Only one version is installed, and only one version of the > documentation need be installed. > > Nowadays autoconf supports htmldir, which seems more appropriate. > > Mea culpa. I plead youthful exuberance and lack of elders to guide me. > > Fixed in master branch. Frediano From freddy77 at gmail.com Sun Jul 13 12:15:10 2014 From: freddy77 at gmail.com (Frediano Ziglio) Date: Sun, 13 Jul 2014 17:15:10 +0100 Subject: [freetds] building freetds on windows In-Reply-To: <20140622131624.GA30409@w3.org> References: <20140622131624.GA30409@w3.org> Message-ID: 2014-06-22 14:16 GMT+01:00 ericP : > Some code base I'm working on (SWObjects, if you care) has a freetds > driver, as well as a few other database drivers. Apart from the > freetds driver, the rest of the code builds on Windows without a lot > of fiddling. > > The freetds, which builds trivially on linux, seems to require some > extra infrastructure on Windows. The Nmake recipe > > nmake -fNmakefile -nologo apps PLATFORM=win32 CONFIGURATION=debug > > > works but doesn't build include/tds_sysdep_public.h from the .in. I > figured that configure would run autoconf and generate the appropriate > files but /bin/sh is rare on Windows. I used the MINGW32 shell that > comes with gitshell but that whined about missing DLLs > (e.g. mspdb100.dll when runing MSVC's cl.exe, cygintl-2.dll when just > running configure). > > I eventually copied tds_sysdep_public.h{.in,} and edited out all the > stuff with automake macros (the bottom half of the file). It built and > linked, but I haven't tested 'cause I'm not half smart enough to > configure MS SQL. > > Presuming the above recipe worked and was necessary, I'd like to > streamline it a bit by having windows builds for autoconf files (well, at > least the one that I needed). It seems more likely that I missed a simple > way for MSVC folks to do this (i.e. doesn't involve cygwin, ming, etc.). > > > Hi, did you try with cmake ? Frediano From franta at hanzlici.cz Sun Jul 13 11:53:54 2014 From: franta at hanzlici.cz (Frantisek Hanzlik) Date: Sun, 13 Jul 2014 17:53:54 +0200 Subject: [freetds] .dev.YYYY.mmdd hardcoded docdir? In-Reply-To: References: <53B7C96A.9040202@hanzlici.cz> Message-ID: <53C2AB92.9040908@hanzlici.cz> It seems as Fedora distros specify "configure" --docdir as "/usr/share/doc" (without package name) - as You say, it point to "main root". Then they puts package docs into %{packagename}-%{version}/ subdirectory - but it is distro own policy (moreover, Fedora from release 20 did "Unversioned Docdirs" and packages docs are in "/usr/share/doc/%{packagename}" (without version). This convention was backported also to Fedora 18 and 19. Franta Hanzlik Frediano Ziglio wrote: > Confirmed, at > https://gitorious.org/freetds/freetds/source/8780c1f243abef142756bb9caf0062196d48b9d7:doc/Makefile.am#L9-17 > TARGET_DOCDIR uses $(datadir) (which is usually /usr/share) so the problem. > > I'm not sure however about --docdir. Should it point to main root (like > /usr/share/doc) or specific to project? > > I think you are referring to configure option, in configure I have > > docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' > > I think we don't use this as we want to embed the version to this directory > however looking at my /usr/share/doc directory there is no versions but > only package name so perhaps the target we use is not right. > > Our spec file say > > The freetds-doc package contains the useguide and reference of FreeTDS > and can be installed even if FreeTDS main package is not installed > > But this does not say we should be able to install different versions > > Frediano > > > 2014-07-05 11:46 GMT+02:00 Frantisek Hanzlik : > >> A few days ago I wrote here about problems with bsqldb and fisql; >> now I tried build last git2a830b1 version (because my Fedora 19 has >> older version 0.91-gitf3ae29d (0a42888 ?) sometimes from November >> 2013, and I was hoping that new version will be working better). >> But I have problem with making FreeTDS RPM package - it seems that >> new git version ignore "--docdir" configure option and always install >> doc into albeit right "/usr/share/doc/" directory, however here into >> "freetds-0.92.dev.YYYYmmdd" (where YYYYmmdd is actual date) - though >> I was specifying "--docdir=/usr/share/doc/freetds-0.92". >> >> It is intended, or I'm doing some mistake? IMO docdir (or other >> package directories) should not depend on current date, but rather >> on version ev. git subversion only }and should be configurable). >> >> Thanks, Franta Hanzlik From freddy77 at gmail.com Sun Jul 13 12:19:28 2014 From: freddy77 at gmail.com (Frediano Ziglio) Date: Sun, 13 Jul 2014 17:19:28 +0100 Subject: [freetds] .dev.YYYY.mmdd hardcoded docdir? In-Reply-To: <53C2AB92.9040908@hanzlici.cz> References: <53B7C96A.9040202@hanzlici.cz> <53C2AB92.9040908@hanzlici.cz> Message-ID: Can you try to compile our package using Fedora ? I usually use "rpmbuild -ta freetds-0.XXXXX.tar.bz2" Frediano 2014-07-13 16:53 GMT+01:00 Frantisek Hanzlik : > It seems as Fedora distros specify "configure" --docdir as > "/usr/share/doc" (without package name) - as You say, > it point to "main root". > Then they puts package docs into %{packagename}-%{version}/ > subdirectory - but it is distro own policy (moreover, Fedora > from release 20 did "Unversioned Docdirs" and packages docs > are in "/usr/share/doc/%{packagename}" (without version). > This convention was backported also to Fedora 18 and 19. > > Franta Hanzlik > > Frediano Ziglio wrote: > > Confirmed, at > > > https://gitorious.org/freetds/freetds/source/8780c1f243abef142756bb9caf0062196d48b9d7:doc/Makefile.am#L9-17 > > TARGET_DOCDIR uses $(datadir) (which is usually /usr/share) so the > problem. > > > > I'm not sure however about --docdir. Should it point to main root (like > > /usr/share/doc) or specific to project? > > > > I think you are referring to configure option, in configure I have > > > > docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' > > > > I think we don't use this as we want to embed the version to this > directory > > however looking at my /usr/share/doc directory there is no versions but > > only package name so perhaps the target we use is not right. > > > > Our spec file say > > > > The freetds-doc package contains the useguide and reference of FreeTDS > > and can be installed even if FreeTDS main package is not installed > > > > But this does not say we should be able to install different versions > > > > Frediano > > > > > > 2014-07-05 11:46 GMT+02:00 Frantisek Hanzlik : > > > >> A few days ago I wrote here about problems with bsqldb and fisql; > >> now I tried build last git2a830b1 version (because my Fedora 19 has > >> older version 0.91-gitf3ae29d (0a42888 ?) sometimes from November > >> 2013, and I was hoping that new version will be working better). > >> But I have problem with making FreeTDS RPM package - it seems that > >> new git version ignore "--docdir" configure option and always install > >> doc into albeit right "/usr/share/doc/" directory, however here into > >> "freetds-0.92.dev.YYYYmmdd" (where YYYYmmdd is actual date) - though > >> I was specifying "--docdir=/usr/share/doc/freetds-0.92". > >> > >> It is intended, or I'm doing some mistake? IMO docdir (or other > >> package directories) should not depend on current date, but rather > >> on version ev. git subversion only }and should be configurable). > >> > >> Thanks, Franta Hanzlik > _______________________________________________ > FreeTDS mailing list > FreeTDS at lists.ibiblio.org > http://lists.ibiblio.org/mailman/listinfo/freetds > From venkatakrishnat1 at gmail.com Sun Jul 13 14:01:48 2014 From: venkatakrishnat1 at gmail.com (venkata krishna Thaluru) Date: Sun, 13 Jul 2014 23:31:48 +0530 Subject: [freetds] Unclosed quotation mark In-Reply-To: References: Message-ID: Thanks for reply Frediano, Syntax is correct only but one of the String having '(single quotes) ,that's reason it is failing . I have another issue with varchar(500) ,if we get the data more than 256 characters for the that coulmn ,then it is failing with invvalid string buffer length . Could you please share the commands for ODBC trace and TDS DUMP.. Thanks Venkata Krishna On Sun, Jul 13, 2014 at 6:05 PM, Frediano Ziglio wrote: > Looks like you sent a query with a wrong syntax. > > Can you enable ODBC tracing or TDSDUMP ? > > Frediano > > > 2014-07-13 6:52 GMT+01:00 venkata krishna Thaluru < > venkatakrishnat1 at gmail.com>: > > > Hi All, > > I am exporting data to MSSQL server and getting below error. > > > > ODBC error (42000). [FreeTDS][SQL Server]Unclosed quotation mark after > the > > character string ' test > > > > Could you please share your thoughts and ideas to resolve it or any know > > issue in freeTDS ,please share it. > > > > > > Thanks > > Venkata Krishna > > 9600185503 > > _______________________________________________ > > 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 > -- *Thanks&RegardsVenkatakrishna.T* *HCL TECHNOLOGIES Ltd.09600185503/09908611807* From freddy77 at gmail.com Mon Jul 14 17:31:56 2014 From: freddy77 at gmail.com (Frediano Ziglio) Date: Mon, 14 Jul 2014 22:31:56 +0100 Subject: [freetds] Unclosed quotation mark In-Reply-To: References: Message-ID: How are you passing this string to the server? 256 characters? I bet you are using the wrong protocol. Frediano 2014-07-13 19:01 GMT+01:00 venkata krishna Thaluru < venkatakrishnat1 at gmail.com>: > Thanks for reply Frediano, > > Syntax is correct only but one of the String having '(single quotes) > ,that's reason it is failing . > I have another issue with varchar(500) ,if we get the data more than 256 > characters for the that coulmn ,then it is failing with invvalid string > buffer length . > Could you please share the commands for ODBC trace and TDS DUMP.. > > Thanks > Venkata Krishna > > > > > On Sun, Jul 13, 2014 at 6:05 PM, Frediano Ziglio > wrote: > > > Looks like you sent a query with a wrong syntax. > > > > Can you enable ODBC tracing or TDSDUMP ? > > > > Frediano > > > > > > 2014-07-13 6:52 GMT+01:00 venkata krishna Thaluru < > > venkatakrishnat1 at gmail.com>: > > > > > Hi All, > > > I am exporting data to MSSQL server and getting below error. > > > > > > ODBC error (42000). [FreeTDS][SQL Server]Unclosed quotation mark after > > the > > > character string ' test > > > > > > Could you please share your thoughts and ideas to resolve it or any > know > > > issue in freeTDS ,please share it. > > > > > > > > > Thanks > > > Venkata Krishna > > > 9600185503 > > > _______________________________________________ > > > 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 > > > > > > -- > > *Thanks&RegardsVenkatakrishna.T* > > *HCL TECHNOLOGIES Ltd.09600185503/09908611807* > _______________________________________________ > FreeTDS mailing list > FreeTDS at lists.ibiblio.org > http://lists.ibiblio.org/mailman/listinfo/freetds > From venkatakrishnat1 at gmail.com Wed Jul 16 13:52:44 2014 From: venkatakrishnat1 at gmail.com (venkata krishna Thaluru) Date: Wed, 16 Jul 2014 23:22:44 +0530 Subject: [freetds] Unclosed quotation mark In-Reply-To: References: Message-ID: Hi Frediano, I am passing sql query to free TDS and we are using free tds driver only .Could you please let know any steps ? After changing data type varchar to long varchar ,it is working fine . whether do we have any bugs in free TDs and addressed in later version .Could you please share it. thanks Venkata Krishna On Tue, Jul 15, 2014 at 3:01 AM, Frediano Ziglio wrote: > How are you passing this string to the server? > 256 characters? I bet you are using the wrong protocol. > > Frediano > > > 2014-07-13 19:01 GMT+01:00 venkata krishna Thaluru < > venkatakrishnat1 at gmail.com>: > > > Thanks for reply Frediano, > > > > Syntax is correct only but one of the String having '(single quotes) > > ,that's reason it is failing . > > I have another issue with varchar(500) ,if we get the data more than 256 > > characters for the that coulmn ,then it is failing with invvalid string > > buffer length . > > Could you please share the commands for ODBC trace and TDS DUMP.. > > > > Thanks > > Venkata Krishna > > > > > > > > > > On Sun, Jul 13, 2014 at 6:05 PM, Frediano Ziglio > > wrote: > > > > > Looks like you sent a query with a wrong syntax. > > > > > > Can you enable ODBC tracing or TDSDUMP ? > > > > > > Frediano > > > > > > > > > 2014-07-13 6:52 GMT+01:00 venkata krishna Thaluru < > > > venkatakrishnat1 at gmail.com>: > > > > > > > Hi All, > > > > I am exporting data to MSSQL server and getting below error. > > > > > > > > ODBC error (42000). [FreeTDS][SQL Server]Unclosed quotation mark > after > > > the > > > > character string ' test > > > > > > > > Could you please share your thoughts and ideas to resolve it or any > > know > > > > issue in freeTDS ,please share it. > > > > > > > > > > > > Thanks > > > > Venkata Krishna > > > > 9600185503 > > > > _______________________________________________ > > > > 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 > > > > > > > > > > > -- > > > > *Thanks&RegardsVenkatakrishna.T* > > > > *HCL TECHNOLOGIES Ltd.09600185503/09908611807* > > _______________________________________________ > > 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 venkatakrishnat1 at gmail.com Thu Jul 24 14:15:21 2014 From: venkatakrishnat1 at gmail.com (venkata krishna Thaluru) Date: Thu, 24 Jul 2014 23:45:21 +0530 Subject: [freetds] Unclosed quotation mark In-Reply-To: References: Message-ID: Hi Frediano, Can you please check and reply . Thanks Venkata krishna On Wed, Jul 16, 2014 at 11:22 PM, venkata krishna Thaluru < venkatakrishnat1 at gmail.com> wrote: > Hi Frediano, > I am passing sql query to free TDS and we are using free tds driver only > .Could you please let know any steps ? > After changing data type varchar to long varchar ,it is working fine . > whether do we have any bugs in free TDs and addressed in later version > .Could you please share it. > > thanks > Venkata Krishna > > > > On Tue, Jul 15, 2014 at 3:01 AM, Frediano Ziglio > wrote: > >> How are you passing this string to the server? >> 256 characters? I bet you are using the wrong protocol. >> >> Frediano >> >> >> 2014-07-13 19:01 GMT+01:00 venkata krishna Thaluru < >> venkatakrishnat1 at gmail.com>: >> >> > Thanks for reply Frediano, >> > >> > Syntax is correct only but one of the String having '(single quotes) >> > ,that's reason it is failing . >> > I have another issue with varchar(500) ,if we get the data more than >> 256 >> > characters for the that coulmn ,then it is failing with invvalid string >> > buffer length . >> > Could you please share the commands for ODBC trace and TDS DUMP.. >> > >> > Thanks >> > Venkata Krishna >> > >> > >> > >> > >> > On Sun, Jul 13, 2014 at 6:05 PM, Frediano Ziglio >> > wrote: >> > >> > > Looks like you sent a query with a wrong syntax. >> > > >> > > Can you enable ODBC tracing or TDSDUMP ? >> > > >> > > Frediano >> > > >> > > >> > > 2014-07-13 6:52 GMT+01:00 venkata krishna Thaluru < >> > > venkatakrishnat1 at gmail.com>: >> > > >> > > > Hi All, >> > > > I am exporting data to MSSQL server and getting below error. >> > > > >> > > > ODBC error (42000). [FreeTDS][SQL Server]Unclosed quotation mark >> after >> > > the >> > > > character string ' test >> > > > >> > > > Could you please share your thoughts and ideas to resolve it or any >> > know >> > > > issue in freeTDS ,please share it. >> > > > >> > > > >> > > > Thanks >> > > > Venkata Krishna >> > > > 9600185503 >> > > > _______________________________________________ >> > > > 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 >> > > >> > >> > >> > >> > -- >> > >> > *Thanks&RegardsVenkatakrishna.T* >> > >> > *HCL TECHNOLOGIES Ltd.09600185503/09908611807* >> > _______________________________________________ >> > 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 >> > > > > > -- *Thanks&RegardsVenkatakrishna.T* *HCL TECHNOLOGIES Ltd.09600185503/09908611807* From craigberry at mac.com Fri Jul 25 10:46:32 2014 From: craigberry at mac.com (Craig A. Berry) Date: Fri, 25 Jul 2014 09:46:32 -0500 Subject: [freetds] Unclosed quotation mark In-Reply-To: References: Message-ID: Please read the User Guide section on logging: On Jul 24, 2014, at 1:15 PM, venkata krishna Thaluru wrote: > Hi Frediano, > Can you please check and reply . > > Thanks > Venkata krishna > > > On Wed, Jul 16, 2014 at 11:22 PM, venkata krishna Thaluru < > venkatakrishnat1 at gmail.com> wrote: > >> Hi Frediano, >> I am passing sql query to free TDS and we are using free tds driver only >> .Could you please let know any steps ? >> After changing data type varchar to long varchar ,it is working fine . >> whether do we have any bugs in free TDs and addressed in later version >> .Could you please share it. >> >> thanks >> Venkata Krishna >> >> >> >> On Tue, Jul 15, 2014 at 3:01 AM, Frediano Ziglio >> wrote: >> >>> How are you passing this string to the server? >>> 256 characters? I bet you are using the wrong protocol. >>> >>> Frediano >>> >>> >>> 2014-07-13 19:01 GMT+01:00 venkata krishna Thaluru < >>> venkatakrishnat1 at gmail.com>: >>> >>>> Thanks for reply Frediano, >>>> >>>> Syntax is correct only but one of the String having '(single quotes) >>>> ,that's reason it is failing . >>>> I have another issue with varchar(500) ,if we get the data more than >>> 256 >>>> characters for the that coulmn ,then it is failing with invvalid string >>>> buffer length . >>>> Could you please share the commands for ODBC trace and TDS DUMP.. >>>> >>>> Thanks >>>> Venkata Krishna >>>> >>>> >>>> >>>> >>>> On Sun, Jul 13, 2014 at 6:05 PM, Frediano Ziglio >>>> wrote: >>>> >>>>> Looks like you sent a query with a wrong syntax. >>>>> >>>>> Can you enable ODBC tracing or TDSDUMP ? >>>>> >>>>> Frediano >>>>> >>>>> >>>>> 2014-07-13 6:52 GMT+01:00 venkata krishna Thaluru < >>>>> venkatakrishnat1 at gmail.com>: >>>>> >>>>>> Hi All, >>>>>> I am exporting data to MSSQL server and getting below error. >>>>>> >>>>>> ODBC error (42000). [FreeTDS][SQL Server]Unclosed quotation mark >>> after >>>>> the >>>>>> character string ' test >>>>>> >>>>>> Could you please share your thoughts and ideas to resolve it or any >>>> know >>>>>> issue in freeTDS ,please share it. >>>>>> >>>>>> >>>>>> Thanks >>>>>> Venkata Krishna >>>>>> 9600185503 >>>>>> _______________________________________________ >>>>>> 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 >>>>> >>>> >>>> >>>> >>>> -- >>>> >>>> *Thanks&RegardsVenkatakrishna.T* >>>> >>>> *HCL TECHNOLOGIES Ltd.09600185503/09908611807* >>>> _______________________________________________ >>>> 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 >>> >> >> >> >> >> > > > -- > > *Thanks&RegardsVenkatakrishna.T* > > *HCL TECHNOLOGIES Ltd.09600185503/09908611807* > _______________________________________________ > FreeTDS mailing list > FreeTDS at lists.ibiblio.org > http://lists.ibiblio.org/mailman/listinfo/freetds ________________________________________ Craig A. Berry mailto:craigberry at mac.com "... getting out of a sonnet is much more difficult than getting in." Brad Leithauser From venkatakrishnat1 at gmail.com Wed Jul 30 14:04:20 2014 From: venkatakrishnat1 at gmail.com (venkata krishna Thaluru) Date: Wed, 30 Jul 2014 23:34:20 +0530 Subject: [freetds] Unclosed quotation mark In-Reply-To: References: Message-ID: Thanks for reply Berry, I am looking below clarifications . 1)If we have date format like '2014-07-28 01:14:00:928563' ,whether freetds allow to insert into MSSQL Server . 2)I have see varchar max size is allowing 256 character ,if we define more than it is failing .. whether is it limitation? 3)One of the coulmn data having junk characters ,while exporting to mssql ,it is unclosed quotation string ' ,failing on that record . Could you please share on your comments above ? If we go for latest version ,whether it is addressed all issues or not ? Thanks Venkata krishna On Fri, Jul 25, 2014 at 8:16 PM, Craig A. Berry wrote: > Please read the User Guide section on logging: > > > > > On Jul 24, 2014, at 1:15 PM, venkata krishna Thaluru < > venkatakrishnat1 at gmail.com> wrote: > > > Hi Frediano, > > Can you please check and reply . > > > > Thanks > > Venkata krishna > > > > > > On Wed, Jul 16, 2014 at 11:22 PM, venkata krishna Thaluru < > > venkatakrishnat1 at gmail.com> wrote: > > > >> Hi Frediano, > >> I am passing sql query to free TDS and we are using free tds driver only > >> .Could you please let know any steps ? > >> After changing data type varchar to long varchar ,it is working fine . > >> whether do we have any bugs in free TDs and addressed in later version > >> .Could you please share it. > >> > >> thanks > >> Venkata Krishna > >> > >> > >> > >> On Tue, Jul 15, 2014 at 3:01 AM, Frediano Ziglio > >> wrote: > >> > >>> How are you passing this string to the server? > >>> 256 characters? I bet you are using the wrong protocol. > >>> > >>> Frediano > >>> > >>> > >>> 2014-07-13 19:01 GMT+01:00 venkata krishna Thaluru < > >>> venkatakrishnat1 at gmail.com>: > >>> > >>>> Thanks for reply Frediano, > >>>> > >>>> Syntax is correct only but one of the String having '(single quotes) > >>>> ,that's reason it is failing . > >>>> I have another issue with varchar(500) ,if we get the data more than > >>> 256 > >>>> characters for the that coulmn ,then it is failing with invvalid > string > >>>> buffer length . > >>>> Could you please share the commands for ODBC trace and TDS DUMP.. > >>>> > >>>> Thanks > >>>> Venkata Krishna > >>>> > >>>> > >>>> > >>>> > >>>> On Sun, Jul 13, 2014 at 6:05 PM, Frediano Ziglio > >>>> wrote: > >>>> > >>>>> Looks like you sent a query with a wrong syntax. > >>>>> > >>>>> Can you enable ODBC tracing or TDSDUMP ? > >>>>> > >>>>> Frediano > >>>>> > >>>>> > >>>>> 2014-07-13 6:52 GMT+01:00 venkata krishna Thaluru < > >>>>> venkatakrishnat1 at gmail.com>: > >>>>> > >>>>>> Hi All, > >>>>>> I am exporting data to MSSQL server and getting below error. > >>>>>> > >>>>>> ODBC error (42000). [FreeTDS][SQL Server]Unclosed quotation mark > >>> after > >>>>> the > >>>>>> character string ' test > >>>>>> > >>>>>> Could you please share your thoughts and ideas to resolve it or any > >>>> know > >>>>>> issue in freeTDS ,please share it. > >>>>>> > >>>>>> > >>>>>> Thanks > >>>>>> Venkata Krishna > >>>>>> 9600185503 > >>>>>> _______________________________________________ > >>>>>> 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 > >>>>> > >>>> > >>>> > >>>> > >>>> -- > >>>> > >>>> *Thanks&RegardsVenkatakrishna.T* > >>>> > >>>> *HCL TECHNOLOGIES Ltd.09600185503/09908611807* > >>>> _______________________________________________ > >>>> 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 > >>> > >> > >> > >> > >> > >> > > > > > > -- > > > > *Thanks&RegardsVenkatakrishna.T* > > > > *HCL TECHNOLOGIES Ltd.09600185503/09908611807* > > _______________________________________________ > > FreeTDS mailing list > > FreeTDS at lists.ibiblio.org > > http://lists.ibiblio.org/mailman/listinfo/freetds > > ________________________________________ > 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 > -- *Thanks&RegardsVenkatakrishna.T* *HCL TECHNOLOGIES Ltd.09600185503/09908611807* From freddy77 at gmail.com Wed Jul 30 15:03:19 2014 From: freddy77 at gmail.com (Frediano Ziglio) Date: Wed, 30 Jul 2014 20:03:19 +0100 Subject: [freetds] Unclosed quotation mark In-Reply-To: References: Message-ID: 1) I think the format is usually yyyy-mm-dd HH:MM:ss.ddddddd 2) check protocol version, see previous mails on how to turn on the dump, protocol version is at the top 3) how are you exporting these data ? data copy ? freebcp ? Frediano 2014-07-30 19:04 GMT+01:00 venkata krishna Thaluru < venkatakrishnat1 at gmail.com>: > Thanks for reply Berry, > I am looking below clarifications . > 1)If we have date format like '2014-07-28 01:14:00:928563' ,whether freetds > allow to insert into MSSQL Server . > 2)I have see varchar max size is allowing 256 character ,if we define more > than it is failing .. whether is it limitation? > 3)One of the coulmn data having junk characters ,while exporting to mssql > ,it is unclosed quotation string ' ,failing on that record . > > > Could you please share on your comments above ? > If we go for latest version ,whether it is addressed all issues or not ? > > Thanks > Venkata krishna > > > > > On Fri, Jul 25, 2014 at 8:16 PM, Craig A. Berry > wrote: > > > Please read the User Guide section on logging: > > > > > > > > > > On Jul 24, 2014, at 1:15 PM, venkata krishna Thaluru < > > venkatakrishnat1 at gmail.com> wrote: > > > > > Hi Frediano, > > > Can you please check and reply . > > > > > > Thanks > > > Venkata krishna > > > > > > > > > On Wed, Jul 16, 2014 at 11:22 PM, venkata krishna Thaluru < > > > venkatakrishnat1 at gmail.com> wrote: > > > > > >> Hi Frediano, > > >> I am passing sql query to free TDS and we are using free tds driver > only > > >> .Could you please let know any steps ? > > >> After changing data type varchar to long varchar ,it is working fine . > > >> whether do we have any bugs in free TDs and addressed in later > version > > >> .Could you please share it. > > >> > > >> thanks > > >> Venkata Krishna > > >> > > >> > > >> > > >> On Tue, Jul 15, 2014 at 3:01 AM, Frediano Ziglio > > >> wrote: > > >> > > >>> How are you passing this string to the server? > > >>> 256 characters? I bet you are using the wrong protocol. > > >>> > > >>> Frediano > > >>> > > >>> > > >>> 2014-07-13 19:01 GMT+01:00 venkata krishna Thaluru < > > >>> venkatakrishnat1 at gmail.com>: > > >>> > > >>>> Thanks for reply Frediano, > > >>>> > > >>>> Syntax is correct only but one of the String having '(single quotes) > > >>>> ,that's reason it is failing . > > >>>> I have another issue with varchar(500) ,if we get the data more > than > > >>> 256 > > >>>> characters for the that coulmn ,then it is failing with invvalid > > string > > >>>> buffer length . > > >>>> Could you please share the commands for ODBC trace and TDS DUMP.. > > >>>> > > >>>> Thanks > > >>>> Venkata Krishna > > >>>> > > >>>> > > >>>> > > >>>> > > >>>> On Sun, Jul 13, 2014 at 6:05 PM, Frediano Ziglio < > freddy77 at gmail.com> > > >>>> wrote: > > >>>> > > >>>>> Looks like you sent a query with a wrong syntax. > > >>>>> > > >>>>> Can you enable ODBC tracing or TDSDUMP ? > > >>>>> > > >>>>> Frediano > > >>>>> > > >>>>> > > >>>>> 2014-07-13 6:52 GMT+01:00 venkata krishna Thaluru < > > >>>>> venkatakrishnat1 at gmail.com>: > > >>>>> > > >>>>>> Hi All, > > >>>>>> I am exporting data to MSSQL server and getting below error. > > >>>>>> > > >>>>>> ODBC error (42000). [FreeTDS][SQL Server]Unclosed quotation mark > > >>> after > > >>>>> the > > >>>>>> character string ' test > > >>>>>> > > >>>>>> Could you please share your thoughts and ideas to resolve it or > any > > >>>> know > > >>>>>> issue in freeTDS ,please share it. > > >>>>>> > > >>>>>> > > >>>>>> Thanks > > >>>>>> Venkata Krishna > > >>>>>> 9600185503 > > >>>>>> _______________________________________________ > > >>>>>> 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 > > >>>>> > > >>>> > > >>>> > > >>>> > > >>>> -- > > >>>> > > >>>> *Thanks&RegardsVenkatakrishna.T* > > >>>> > > >>>> *HCL TECHNOLOGIES Ltd.09600185503/09908611807* > > >>>> _______________________________________________ > > >>>> 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 > > >>> > > >> > > >> > > >> > > >> > > >> > > > > > > > > > -- > > > > > > *Thanks&RegardsVenkatakrishna.T* > > > > > > *HCL TECHNOLOGIES Ltd.09600185503/09908611807* > > > _______________________________________________ > > > FreeTDS mailing list > > > FreeTDS at lists.ibiblio.org > > > http://lists.ibiblio.org/mailman/listinfo/freetds > > > > ________________________________________ > > 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 > > > > > > -- > > *Thanks&RegardsVenkatakrishna.T* > > *HCL TECHNOLOGIES Ltd.09600185503/09908611807* > _______________________________________________ > FreeTDS mailing list > FreeTDS at lists.ibiblio.org > http://lists.ibiblio.org/mailman/listinfo/freetds > From olka at bagheera.se Thu Jul 31 04:44:58 2014 From: olka at bagheera.se (Ola Karlsson) Date: Thu, 31 Jul 2014 08:44:58 +0000 Subject: [freetds] Problem with nvarchar output In-Reply-To: References: Message-ID: <21475157eed847edb7043a81ea7eb893@DBXPR03MB061.eurprd03.prod.outlook.com> Hi, Sorry for the delay. Went on hollidays for a few weeks :) As far as I can see my error message is stated in the log exactly as it should be and it also states two returned results. The integer value is returned correctly but not the nvarchar. I have attached a portion of the log containing the procedure call and my error message. I don't notice any error messages or so but then again theres a lot of information in the logs. No errors in the php logs either. Any ideas? BR Ola -----Ursprungligt meddelande----- Fr?n: FreeTDS [mailto:freetds-bounces at lists.ibiblio.org] F?r Frediano Ziglio Skickat: den 12 juli 2014 09:06 Till: FreeTDS Development Group ?mne: Re: [freetds] Problem with nvarchar output Hi, did you check TDSDUMP ? Frediano 2014-07-06 14:32 GMT+01:00 Ola Karlsson : > Hi > I'm using Freetds with PHP5 to access a SQL server but I'm having > trouble with the output parameters. > I have two parameters, one SQLINT4 and one SQLVARCHAR. The int is > working but I don't get any returns from the varchar. > > Is there anything special that needs to be done when outputting nvarchar? > > PHP binds, > mssql_bind($stmt, '@ErrorMsg',$ErrorMsg,SQLVARCHAR,true,false,4000); > mssql_bind($stmt, '@OrderNr',$OrderNr,SQLINT4,true,true,8); > > SQL parameters, > @ErrorMsg nvarchar(4000) output > @OrderNr Jeeves_OrderNo output > > > Sql server, > SQL Server 2008 R2 > > Freetds server, > Ubuntu 12.04 3.5.0-51-generic > > Tsql -C > Version: freetds v0.91 > freetds.conf directory: /etc/freetds > MS db-lib source compatibility: no > Sybase binary compatibility: yes > Thread safety: yes > iconv library: yes > TDS version: 4.2 > iODBC: no > unixodbc: yes > SSPI "trusted" logins: no > Kerberos: no > > Freetds conf, > [global] > text size = 64512 > [Sqlserver] > host = xxx.xxx.xxx.xxx > port = xxxx > tds version = 8.0 > > PHP5 > PHP 5.3.10-1ubuntu3.12 > > > BR > Ola > _______________________________________________ > 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 -------------- An embedded and charset-unspecified text was scrubbed... Name: freetds.txt URL: From freddy77 at gmail.com Thu Jul 31 09:41:20 2014 From: freddy77 at gmail.com (Frediano Ziglio) Date: Thu, 31 Jul 2014 14:41:20 +0100 Subject: [freetds] Problem with nvarchar output In-Reply-To: <21475157eed847edb7043a81ea7eb893@DBXPR03MB061.eurprd03.prod.outlook.com> References: <21475157eed847edb7043a81ea7eb893@DBXPR03MB061.eurprd03.prod.outlook.com> Message-ID: The upper layer decided to cancel the query. The reason could be previously in the log. Looks like you are using an encoding which cannot support your charset (there are some question marks in the output string possibly result of a wrong conversion). Frediano 2014-07-31 9:44 GMT+01:00 Ola Karlsson : > Hi, > Sorry for the delay. Went on hollidays for a few weeks :) > > As far as I can see my error message is stated in the log exactly as it > should be and it also states two returned results. > The integer value is returned correctly but not the nvarchar. > > I have attached a portion of the log containing the procedure call and my > error message. > I don't notice any error messages or so but then again theres a lot of > information in the logs. > > No errors in the php logs either. > > Any ideas? > > > BR > Ola > > -----Ursprungligt meddelande----- > Fr?n: FreeTDS [mailto:freetds-bounces at lists.ibiblio.org] F?r Frediano > Ziglio > Skickat: den 12 juli 2014 09:06 > Till: FreeTDS Development Group > ?mne: Re: [freetds] Problem with nvarchar output > > Hi, > did you check TDSDUMP ? > > Frediano > > > 2014-07-06 14:32 GMT+01:00 Ola Karlsson : > > > Hi > > I'm using Freetds with PHP5 to access a SQL server but I'm having > > trouble with the output parameters. > > I have two parameters, one SQLINT4 and one SQLVARCHAR. The int is > > working but I don't get any returns from the varchar. > > > > Is there anything special that needs to be done when outputting nvarchar? > > > > PHP binds, > > mssql_bind($stmt, '@ErrorMsg',$ErrorMsg,SQLVARCHAR,true,false,4000); > > mssql_bind($stmt, '@OrderNr',$OrderNr,SQLINT4,true,true,8); > > > > SQL parameters, > > @ErrorMsg nvarchar(4000) output > > @OrderNr Jeeves_OrderNo output > > > > > > Sql server, > > SQL Server 2008 R2 > > > > Freetds server, > > Ubuntu 12.04 3.5.0-51-generic > > > > Tsql -C > > Version: freetds v0.91 > > freetds.conf directory: /etc/freetds > > MS db-lib source compatibility: no > > Sybase binary compatibility: yes > > Thread safety: yes > > iconv library: yes > > TDS version: 4.2 > > iODBC: no > > unixodbc: yes > > SSPI "trusted" logins: no > > Kerberos: no > > > > Freetds conf, > > [global] > > text size = 64512 > > [Sqlserver] > > host = xxx.xxx.xxx.xxx > > port = xxxx > > tds version = 8.0 > > > > PHP5 > > PHP 5.3.10-1ubuntu3.12 > > > > > > BR > > Ola > > _______________________________________________ > > 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 olka at bagheera.se Thu Jul 31 10:01:21 2014 From: olka at bagheera.se (Ola Karlsson) Date: Thu, 31 Jul 2014 14:01:21 +0000 Subject: [freetds] Problem with nvarchar output In-Reply-To: References: <21475157eed847edb7043a81ea7eb893@DBXPR03MB061.eurprd03.prod.outlook.com> Message-ID: <623592d172b34d3e8786db0861de38c7@DBXPR03MB061.eurprd03.prod.outlook.com> I?ve attached a bigger log but I find it difficult to see what is exactly related to this query so perhaps I?ve still missed something. Will adding logg details for a specific instance in freetds.conf cause only logging for that instance, in my case [ap1Dev], or will it still logg for all instances? If it?s the encoding is it a PHP problem or FreeTDS setting that needs to change? BR Ola -----Ursprungligt meddelande----- Fr?n: FreeTDS [mailto:freetds-bounces at lists.ibiblio.org] F?r Frediano Ziglio Skickat: den 31 juli 2014 15:41 Till: FreeTDS Development Group ?mne: Re: [freetds] Problem with nvarchar output The upper layer decided to cancel the query. The reason could be previously in the log. Looks like you are using an encoding which cannot support your charset (there are some question marks in the output string possibly result of a wrong conversion). Frediano 2014-07-31 9:44 GMT+01:00 Ola Karlsson : > Hi, > Sorry for the delay. Went on hollidays for a few weeks :) > > As far as I can see my error message is stated in the log exactly as > it should be and it also states two returned results. > The integer value is returned correctly but not the nvarchar. > > I have attached a portion of the log containing the procedure call and > my error message. > I don't notice any error messages or so but then again theres a lot of > information in the logs. > > No errors in the php logs either. > > Any ideas? > > > BR > Ola > > -----Ursprungligt meddelande----- > Fr?n: FreeTDS [mailto:freetds-bounces at lists.ibiblio.org] F?r Frediano > Ziglio > Skickat: den 12 juli 2014 09:06 > Till: FreeTDS Development Group > ?mne: Re: [freetds] Problem with nvarchar output > > Hi, > did you check TDSDUMP ? > > Frediano > > > 2014-07-06 14:32 GMT+01:00 Ola Karlsson : > > > Hi > > I'm using Freetds with PHP5 to access a SQL server but I'm having > > trouble with the output parameters. > > I have two parameters, one SQLINT4 and one SQLVARCHAR. The int is > > working but I don't get any returns from the varchar. > > > > Is there anything special that needs to be done when outputting nvarchar? > > > > PHP binds, > > mssql_bind($stmt, '@ErrorMsg',$ErrorMsg,SQLVARCHAR,true,false,4000); > > mssql_bind($stmt, '@OrderNr',$OrderNr,SQLINT4,true,true,8); > > > > SQL parameters, > > @ErrorMsg nvarchar(4000) output > > @OrderNr Jeeves_OrderNo output > > > > > > Sql server, > > SQL Server 2008 R2 > > > > Freetds server, > > Ubuntu 12.04 3.5.0-51-generic > > > > Tsql -C > > Version: freetds v0.91 > > freetds.conf directory: /etc/freetds MS db-lib source compatibility: > > no Sybase binary compatibility: yes Thread safety: yes iconv > > library: yes TDS version: 4.2 > > iODBC: no > > unixodbc: yes > > SSPI "trusted" logins: no > > Kerberos: no > > > > Freetds conf, > > [global] > > text size = 64512 > > [Sqlserver] > > host = xxx.xxx.xxx.xxx > > port = xxxx > > tds version = 8.0 > > > > PHP5 > > PHP 5.3.10-1ubuntu3.12 > > > > > > BR > > Ola > > _______________________________________________ > > 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 -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: freetds.txt URL: From freddy77 at gmail.com Fri Aug 1 12:06:29 2014 From: freddy77 at gmail.com (Frediano Ziglio) Date: Fri, 1 Aug 2014 17:06:29 +0100 Subject: [freetds] Problem with nvarchar output In-Reply-To: <623592d172b34d3e8786db0861de38c7@DBXPR03MB061.eurprd03.prod.outlook.com> References: <21475157eed847edb7043a81ea7eb893@DBXPR03MB061.eurprd03.prod.outlook.com> <623592d172b34d3e8786db0861de38c7@DBXPR03MB061.eurprd03.prod.outlook.com> Message-ID: Looks like something upset PHP code. Are you using mssql module, right? Which PHP version? Which PHP function are you calling, mssql_query ? Frediano 2014-07-31 15:01 GMT+01:00 Ola Karlsson : > I?ve attached a bigger log but I find it difficult to see what is exactly > related to this query so perhaps I?ve still missed something. > Will adding logg details for a specific instance in freetds.conf cause > only logging for that instance, in my case [ap1Dev], or will it still logg > for all instances? > > If it?s the encoding is it a PHP problem or FreeTDS setting that needs to > change? > > BR > Ola > > -----Ursprungligt meddelande----- > Fr?n: FreeTDS [mailto:freetds-bounces at lists.ibiblio.org] F?r Frediano > Ziglio > Skickat: den 31 juli 2014 15:41 > Till: FreeTDS Development Group > ?mne: Re: [freetds] Problem with nvarchar output > > The upper layer decided to cancel the query. The reason could be > previously in the log. > Looks like you are using an encoding which cannot support your charset > (there are some question marks in the output string possibly result of a > wrong conversion). > > Frediano > > > 2014-07-31 9:44 GMT+01:00 Ola Karlsson : > > > Hi, > > Sorry for the delay. Went on hollidays for a few weeks :) > > > > As far as I can see my error message is stated in the log exactly as > > it should be and it also states two returned results. > > The integer value is returned correctly but not the nvarchar. > > > > I have attached a portion of the log containing the procedure call and > > my error message. > > I don't notice any error messages or so but then again theres a lot of > > information in the logs. > > > > No errors in the php logs either. > > > > Any ideas? > > > > > > BR > > Ola > > > > -----Ursprungligt meddelande----- > > Fr?n: FreeTDS [mailto:freetds-bounces at lists.ibiblio.org] F?r Frediano > > Ziglio > > Skickat: den 12 juli 2014 09:06 > > Till: FreeTDS Development Group > > ?mne: Re: [freetds] Problem with nvarchar output > > > > Hi, > > did you check TDSDUMP ? > > > > Frediano > > > > > > 2014-07-06 14:32 GMT+01:00 Ola Karlsson : > > > > > Hi > > > I'm using Freetds with PHP5 to access a SQL server but I'm having > > > trouble with the output parameters. > > > I have two parameters, one SQLINT4 and one SQLVARCHAR. The int is > > > working but I don't get any returns from the varchar. > > > > > > Is there anything special that needs to be done when outputting > nvarchar? > > > > > > PHP binds, > > > mssql_bind($stmt, '@ErrorMsg',$ErrorMsg,SQLVARCHAR,true,false,4000); > > > mssql_bind($stmt, '@OrderNr',$OrderNr,SQLINT4,true,true,8); > > > > > > SQL parameters, > > > @ErrorMsg nvarchar(4000) output > > > @OrderNr Jeeves_OrderNo output > > > > > > > > > Sql server, > > > SQL Server 2008 R2 > > > > > > Freetds server, > > > Ubuntu 12.04 3.5.0-51-generic > > > > > > Tsql -C > > > Version: freetds v0.91 > > > freetds.conf directory: /etc/freetds MS db-lib source compatibility: > > > no Sybase binary compatibility: yes Thread safety: yes iconv > > > library: yes TDS version: 4.2 > > > iODBC: no > > > unixodbc: yes > > > SSPI "trusted" logins: no > > > Kerberos: no > > > > > > Freetds conf, > > > [global] > > > text size = 64512 > > > [Sqlserver] > > > host = xxx.xxx.xxx.xxx > > > port = xxxx > > > tds version = 8.0 > > > > > > PHP5 > > > PHP 5.3.10-1ubuntu3.12 > > > > > > > > > BR > > > Ola > > > _______________________________________________ > > > 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 Fri Aug 1 13:32:13 2014 From: freddy77 at gmail.com (Frediano Ziglio) Date: Fri, 1 Aug 2014 18:32:13 +0100 Subject: [freetds] Problem with nvarchar output In-Reply-To: References: <21475157eed847edb7043a81ea7eb893@DBXPR03MB061.eurprd03.prod.outlook.com> <623592d172b34d3e8786db0861de38c7@DBXPR03MB061.eurprd03.prod.outlook.com> Message-ID: I just realised you posted most of information in the first mail you sent Frediano 2014-08-01 17:06 GMT+01:00 Frediano Ziglio : > Looks like something upset PHP code. Are you using mssql module, right? > Which PHP version? Which PHP function are you calling, mssql_query ? > > > Frediano > > > 2014-07-31 15:01 GMT+01:00 Ola Karlsson : > > I?ve attached a bigger log but I find it difficult to see what is exactly >> related to this query so perhaps I?ve still missed something. >> Will adding logg details for a specific instance in freetds.conf cause >> only logging for that instance, in my case [ap1Dev], or will it still logg >> for all instances? >> >> If it?s the encoding is it a PHP problem or FreeTDS setting that needs to >> change? >> >> BR >> Ola >> >> -----Ursprungligt meddelande----- >> Fr?n: FreeTDS [mailto:freetds-bounces at lists.ibiblio.org] F?r Frediano >> Ziglio >> Skickat: den 31 juli 2014 15:41 >> Till: FreeTDS Development Group >> ?mne: Re: [freetds] Problem with nvarchar output >> >> The upper layer decided to cancel the query. The reason could be >> previously in the log. >> Looks like you are using an encoding which cannot support your charset >> (there are some question marks in the output string possibly result of a >> wrong conversion). >> >> Frediano >> >> >> 2014-07-31 9:44 GMT+01:00 Ola Karlsson : >> >> > Hi, >> > Sorry for the delay. Went on hollidays for a few weeks :) >> > >> > As far as I can see my error message is stated in the log exactly as >> > it should be and it also states two returned results. >> > The integer value is returned correctly but not the nvarchar. >> > >> > I have attached a portion of the log containing the procedure call and >> > my error message. >> > I don't notice any error messages or so but then again theres a lot of >> > information in the logs. >> > >> > No errors in the php logs either. >> > >> > Any ideas? >> > >> > >> > BR >> > Ola >> > >> > -----Ursprungligt meddelande----- >> > Fr?n: FreeTDS [mailto:freetds-bounces at lists.ibiblio.org] F?r Frediano >> > Ziglio >> > Skickat: den 12 juli 2014 09:06 >> > Till: FreeTDS Development Group >> > ?mne: Re: [freetds] Problem with nvarchar output >> > >> > Hi, >> > did you check TDSDUMP ? >> > >> > Frediano >> > >> > >> > 2014-07-06 14:32 GMT+01:00 Ola Karlsson : >> > >> > > Hi >> > > I'm using Freetds with PHP5 to access a SQL server but I'm having >> > > trouble with the output parameters. >> > > I have two parameters, one SQLINT4 and one SQLVARCHAR. The int is >> > > working but I don't get any returns from the varchar. >> > > >> > > Is there anything special that needs to be done when outputting >> nvarchar? >> > > >> > > PHP binds, >> > > mssql_bind($stmt, '@ErrorMsg',$ErrorMsg,SQLVARCHAR,true,false,4000); >> > > mssql_bind($stmt, '@OrderNr',$OrderNr,SQLINT4,true,true,8); >> > > >> > > SQL parameters, >> > > @ErrorMsg nvarchar(4000) output >> > > @OrderNr Jeeves_OrderNo output >> > > >> > > >> > > Sql server, >> > > SQL Server 2008 R2 >> > > >> > > Freetds server, >> > > Ubuntu 12.04 3.5.0-51-generic >> > > >> > > Tsql -C >> > > Version: freetds v0.91 >> > > freetds.conf directory: /etc/freetds MS db-lib source compatibility: >> > > no Sybase binary compatibility: yes Thread safety: yes iconv >> > > library: yes TDS version: 4.2 >> > > iODBC: no >> > > unixodbc: yes >> > > SSPI "trusted" logins: no >> > > Kerberos: no >> > > >> > > Freetds conf, >> > > [global] >> > > text size = 64512 >> > > [Sqlserver] >> > > host = xxx.xxx.xxx.xxx >> > > port = xxxx >> > > tds version = 8.0 >> > > >> > > PHP5 >> > > PHP 5.3.10-1ubuntu3.12 >> > > >> > > >> > > BR >> > > Ola >> > > _______________________________________________ >> > > 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 Mon Aug 4 12:27:12 2014 From: freddy77 at gmail.com (Frediano Ziglio) Date: Mon, 4 Aug 2014 17:27:12 +0100 Subject: [freetds] Problem with nvarchar output In-Reply-To: References: <21475157eed847edb7043a81ea7eb893@DBXPR03MB061.eurprd03.prod.outlook.com> <623592d172b34d3e8786db0861de38c7@DBXPR03MB061.eurprd03.prod.outlook.com> Message-ID: Hi, sorry for late reply. I looked at PHP code to try to understand the sequence. It seems to me that you called mssql_execute (which is ok) and the procedure got the right result but then instead of calling mssql_next_result you just freed the statement which cause the store procedure parameters to be discarded. Is it right? Frediano Frediano 2014-08-01 18:32 GMT+01:00 Frediano Ziglio : > I just realised you posted most of information in the first mail you sent > > Frediano > > > 2014-08-01 17:06 GMT+01:00 Frediano Ziglio : > > Looks like something upset PHP code. Are you using mssql module, right? >> Which PHP version? Which PHP function are you calling, mssql_query ? >> >> >> Frediano >> >> >> 2014-07-31 15:01 GMT+01:00 Ola Karlsson : >> >> I?ve attached a bigger log but I find it difficult to see what is exactly >>> related to this query so perhaps I?ve still missed something. >>> Will adding logg details for a specific instance in freetds.conf cause >>> only logging for that instance, in my case [ap1Dev], or will it still logg >>> for all instances? >>> >>> If it?s the encoding is it a PHP problem or FreeTDS setting that needs >>> to change? >>> >>> BR >>> Ola >>> >>> -----Ursprungligt meddelande----- >>> Fr?n: FreeTDS [mailto:freetds-bounces at lists.ibiblio.org] F?r Frediano >>> Ziglio >>> Skickat: den 31 juli 2014 15:41 >>> Till: FreeTDS Development Group >>> ?mne: Re: [freetds] Problem with nvarchar output >>> >>> The upper layer decided to cancel the query. The reason could be >>> previously in the log. >>> Looks like you are using an encoding which cannot support your charset >>> (there are some question marks in the output string possibly result of a >>> wrong conversion). >>> >>> Frediano >>> >>> >>> 2014-07-31 9:44 GMT+01:00 Ola Karlsson : >>> >>> > Hi, >>> > Sorry for the delay. Went on hollidays for a few weeks :) >>> > >>> > As far as I can see my error message is stated in the log exactly as >>> > it should be and it also states two returned results. >>> > The integer value is returned correctly but not the nvarchar. >>> > >>> > I have attached a portion of the log containing the procedure call and >>> > my error message. >>> > I don't notice any error messages or so but then again theres a lot of >>> > information in the logs. >>> > >>> > No errors in the php logs either. >>> > >>> > Any ideas? >>> > >>> > >>> > BR >>> > Ola >>> > >>> > -----Ursprungligt meddelande----- >>> > Fr?n: FreeTDS [mailto:freetds-bounces at lists.ibiblio.org] F?r Frediano >>> > Ziglio >>> > Skickat: den 12 juli 2014 09:06 >>> > Till: FreeTDS Development Group >>> > ?mne: Re: [freetds] Problem with nvarchar output >>> > >>> > Hi, >>> > did you check TDSDUMP ? >>> > >>> > Frediano >>> > >>> > >>> > 2014-07-06 14:32 GMT+01:00 Ola Karlsson : >>> > >>> > > Hi >>> > > I'm using Freetds with PHP5 to access a SQL server but I'm having >>> > > trouble with the output parameters. >>> > > I have two parameters, one SQLINT4 and one SQLVARCHAR. The int is >>> > > working but I don't get any returns from the varchar. >>> > > >>> > > Is there anything special that needs to be done when outputting >>> nvarchar? >>> > > >>> > > PHP binds, >>> > > mssql_bind($stmt, '@ErrorMsg',$ErrorMsg,SQLVARCHAR,true,false,4000); >>> > > mssql_bind($stmt, '@OrderNr',$OrderNr,SQLINT4,true,true,8); >>> > > >>> > > SQL parameters, >>> > > @ErrorMsg nvarchar(4000) output >>> > > @OrderNr Jeeves_OrderNo output >>> > > >>> > > >>> > > Sql server, >>> > > SQL Server 2008 R2 >>> > > >>> > > Freetds server, >>> > > Ubuntu 12.04 3.5.0-51-generic >>> > > >>> > > Tsql -C >>> > > Version: freetds v0.91 >>> > > freetds.conf directory: /etc/freetds MS db-lib source compatibility: >>> > > no Sybase binary compatibility: yes Thread safety: yes iconv >>> > > library: yes TDS version: 4.2 >>> > > iODBC: no >>> > > unixodbc: yes >>> > > SSPI "trusted" logins: no >>> > > Kerberos: no >>> > > >>> > > Freetds conf, >>> > > [global] >>> > > text size = 64512 >>> > > [Sqlserver] >>> > > host = xxx.xxx.xxx.xxx >>> > > port = xxxx >>> > > tds version = 8.0 >>> > > >>> > > PHP5 >>> > > PHP 5.3.10-1ubuntu3.12 >>> > > >>> > > >>> > > BR >>> > > Ola >>> > > _______________________________________________ >>> > > 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 venkatakrishnat1 at gmail.com Mon Aug 4 14:01:43 2014 From: venkatakrishnat1 at gmail.com (venkata krishna Thaluru) Date: Mon, 4 Aug 2014 23:31:43 +0530 Subject: [freetds] Unclosed quotation mark In-Reply-To: References: Message-ID: Thank you reply Frediano, We are using TDs 8.0. We are sql query to bulk insert . Could you please let me know ,if you required any details. Thanks Venkata Krishna On Thu, Jul 31, 2014 at 12:33 AM, Frediano Ziglio wrote: > 1) I think the format is usually yyyy-mm-dd HH:MM:ss.ddddddd > > 2) check protocol version, see previous mails on how to turn on the dump, > protocol version is at the top > > 3) how are you exporting these data ? data copy ? freebcp ? > > Frediano > > > 2014-07-30 19:04 GMT+01:00 venkata krishna Thaluru < > venkatakrishnat1 at gmail.com>: > > > Thanks for reply Berry, > > I am looking below clarifications . > > 1)If we have date format like '2014-07-28 01:14:00:928563' ,whether > freetds > > allow to insert into MSSQL Server . > > 2)I have see varchar max size is allowing 256 character ,if we define > more > > than it is failing .. whether is it limitation? > > 3)One of the coulmn data having junk characters ,while exporting to mssql > > ,it is unclosed quotation string ' ,failing on that record . > > > > > > Could you please share on your comments above ? > > If we go for latest version ,whether it is addressed all issues or not ? > > > > Thanks > > Venkata krishna > > > > > > > > > > On Fri, Jul 25, 2014 at 8:16 PM, Craig A. Berry > > wrote: > > > > > Please read the User Guide section on logging: > > > > > > > > > > > > > > > On Jul 24, 2014, at 1:15 PM, venkata krishna Thaluru < > > > venkatakrishnat1 at gmail.com> wrote: > > > > > > > Hi Frediano, > > > > Can you please check and reply . > > > > > > > > Thanks > > > > Venkata krishna > > > > > > > > > > > > On Wed, Jul 16, 2014 at 11:22 PM, venkata krishna Thaluru < > > > > venkatakrishnat1 at gmail.com> wrote: > > > > > > > >> Hi Frediano, > > > >> I am passing sql query to free TDS and we are using free tds driver > > only > > > >> .Could you please let know any steps ? > > > >> After changing data type varchar to long varchar ,it is working > fine . > > > >> whether do we have any bugs in free TDs and addressed in later > > version > > > >> .Could you please share it. > > > >> > > > >> thanks > > > >> Venkata Krishna > > > >> > > > >> > > > >> > > > >> On Tue, Jul 15, 2014 at 3:01 AM, Frediano Ziglio < > freddy77 at gmail.com> > > > >> wrote: > > > >> > > > >>> How are you passing this string to the server? > > > >>> 256 characters? I bet you are using the wrong protocol. > > > >>> > > > >>> Frediano > > > >>> > > > >>> > > > >>> 2014-07-13 19:01 GMT+01:00 venkata krishna Thaluru < > > > >>> venkatakrishnat1 at gmail.com>: > > > >>> > > > >>>> Thanks for reply Frediano, > > > >>>> > > > >>>> Syntax is correct only but one of the String having '(single > quotes) > > > >>>> ,that's reason it is failing . > > > >>>> I have another issue with varchar(500) ,if we get the data more > > than > > > >>> 256 > > > >>>> characters for the that coulmn ,then it is failing with invvalid > > > string > > > >>>> buffer length . > > > >>>> Could you please share the commands for ODBC trace and TDS DUMP.. > > > >>>> > > > >>>> Thanks > > > >>>> Venkata Krishna > > > >>>> > > > >>>> > > > >>>> > > > >>>> > > > >>>> On Sun, Jul 13, 2014 at 6:05 PM, Frediano Ziglio < > > freddy77 at gmail.com> > > > >>>> wrote: > > > >>>> > > > >>>>> Looks like you sent a query with a wrong syntax. > > > >>>>> > > > >>>>> Can you enable ODBC tracing or TDSDUMP ? > > > >>>>> > > > >>>>> Frediano > > > >>>>> > > > >>>>> > > > >>>>> 2014-07-13 6:52 GMT+01:00 venkata krishna Thaluru < > > > >>>>> venkatakrishnat1 at gmail.com>: > > > >>>>> > > > >>>>>> Hi All, > > > >>>>>> I am exporting data to MSSQL server and getting below error. > > > >>>>>> > > > >>>>>> ODBC error (42000). [FreeTDS][SQL Server]Unclosed quotation mark > > > >>> after > > > >>>>> the > > > >>>>>> character string ' test > > > >>>>>> > > > >>>>>> Could you please share your thoughts and ideas to resolve it or > > any > > > >>>> know > > > >>>>>> issue in freeTDS ,please share it. > > > >>>>>> > > > >>>>>> > > > >>>>>> Thanks > > > >>>>>> Venkata Krishna > > > >>>>>> 9600185503 > > > >>>>>> _______________________________________________ > > > >>>>>> 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 > > > >>>>> > > > >>>> > > > >>>> > > > >>>> > > > >>>> -- > > > >>>> > > > >>>> *Thanks&RegardsVenkatakrishna.T* > > > >>>> > > > >>>> *HCL TECHNOLOGIES Ltd.09600185503/09908611807* > > > >>>> _______________________________________________ > > > >>>> 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 > > > >>> > > > >> > > > >> > > > >> > > > >> > > > >> > > > > > > > > > > > > -- > > > > > > > > *Thanks&RegardsVenkatakrishna.T* > > > > > > > > *HCL TECHNOLOGIES Ltd.09600185503/09908611807* > > > > _______________________________________________ > > > > FreeTDS mailing list > > > > FreeTDS at lists.ibiblio.org > > > > http://lists.ibiblio.org/mailman/listinfo/freetds > > > > > > ________________________________________ > > > 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 > > > > > > > > > > > -- > > > > *Thanks&RegardsVenkatakrishna.T* > > > > *HCL TECHNOLOGIES Ltd.09600185503/09908611807* > > _______________________________________________ > > 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 > -- *Thanks&RegardsVenkatakrishna.T* *HCL TECHNOLOGIES Ltd.09600185503/09908611807* From freddy77 at gmail.com Mon Aug 4 14:51:32 2014 From: freddy77 at gmail.com (Frediano Ziglio) Date: Mon, 4 Aug 2014 19:51:32 +0100 Subject: [freetds] Unclosed quotation mark In-Reply-To: References: Message-ID: Bulk insert ?? >From the log seems a RPC call ! Could be I miss some log. Frediano Frediano 2014-08-04 19:01 GMT+01:00 venkata krishna Thaluru < venkatakrishnat1 at gmail.com>: > Thank you reply Frediano, > > We are using TDs 8.0. > We are sql query to bulk insert . > > Could you please let me know ,if you required any details. > > Thanks > Venkata Krishna > > > > On Thu, Jul 31, 2014 at 12:33 AM, Frediano Ziglio > wrote: > > > 1) I think the format is usually yyyy-mm-dd HH:MM:ss.ddddddd > > > > 2) check protocol version, see previous mails on how to turn on the dump, > > protocol version is at the top > > > > 3) how are you exporting these data ? data copy ? freebcp ? > > > > Frediano > > > > > > 2014-07-30 19:04 GMT+01:00 venkata krishna Thaluru < > > venkatakrishnat1 at gmail.com>: > > > > > Thanks for reply Berry, > > > I am looking below clarifications . > > > 1)If we have date format like '2014-07-28 01:14:00:928563' ,whether > > freetds > > > allow to insert into MSSQL Server . > > > 2)I have see varchar max size is allowing 256 character ,if we define > > more > > > than it is failing .. whether is it limitation? > > > 3)One of the coulmn data having junk characters ,while exporting to > mssql > > > ,it is unclosed quotation string ' ,failing on that record . > > > > > > > > > Could you please share on your comments above ? > > > If we go for latest version ,whether it is addressed all issues or not > ? > > > > > > Thanks > > > Venkata krishna > > > > > > > > > > > > > > > On Fri, Jul 25, 2014 at 8:16 PM, Craig A. Berry > > > wrote: > > > > > > > Please read the User Guide section on logging: > > > > > > > > > > > > > > > > > > > > On Jul 24, 2014, at 1:15 PM, venkata krishna Thaluru < > > > > venkatakrishnat1 at gmail.com> wrote: > > > > > > > > > Hi Frediano, > > > > > Can you please check and reply . > > > > > > > > > > Thanks > > > > > Venkata krishna > > > > > > > > > > > > > > > On Wed, Jul 16, 2014 at 11:22 PM, venkata krishna Thaluru < > > > > > venkatakrishnat1 at gmail.com> wrote: > > > > > > > > > >> Hi Frediano, > > > > >> I am passing sql query to free TDS and we are using free tds > driver > > > only > > > > >> .Could you please let know any steps ? > > > > >> After changing data type varchar to long varchar ,it is working > > fine . > > > > >> whether do we have any bugs in free TDs and addressed in later > > > version > > > > >> .Could you please share it. > > > > >> > > > > >> thanks > > > > >> Venkata Krishna > > > > >> > > > > >> > > > > >> > > > > >> On Tue, Jul 15, 2014 at 3:01 AM, Frediano Ziglio < > > freddy77 at gmail.com> > > > > >> wrote: > > > > >> > > > > >>> How are you passing this string to the server? > > > > >>> 256 characters? I bet you are using the wrong protocol. > > > > >>> > > > > >>> Frediano > > > > >>> > > > > >>> > > > > >>> 2014-07-13 19:01 GMT+01:00 venkata krishna Thaluru < > > > > >>> venkatakrishnat1 at gmail.com>: > > > > >>> > > > > >>>> Thanks for reply Frediano, > > > > >>>> > > > > >>>> Syntax is correct only but one of the String having '(single > > quotes) > > > > >>>> ,that's reason it is failing . > > > > >>>> I have another issue with varchar(500) ,if we get the data more > > > than > > > > >>> 256 > > > > >>>> characters for the that coulmn ,then it is failing with invvalid > > > > string > > > > >>>> buffer length . > > > > >>>> Could you please share the commands for ODBC trace and TDS > DUMP.. > > > > >>>> > > > > >>>> Thanks > > > > >>>> Venkata Krishna > > > > >>>> > > > > >>>> > > > > >>>> > > > > >>>> > > > > >>>> On Sun, Jul 13, 2014 at 6:05 PM, Frediano Ziglio < > > > freddy77 at gmail.com> > > > > >>>> wrote: > > > > >>>> > > > > >>>>> Looks like you sent a query with a wrong syntax. > > > > >>>>> > > > > >>>>> Can you enable ODBC tracing or TDSDUMP ? > > > > >>>>> > > > > >>>>> Frediano > > > > >>>>> > > > > >>>>> > > > > >>>>> 2014-07-13 6:52 GMT+01:00 venkata krishna Thaluru < > > > > >>>>> venkatakrishnat1 at gmail.com>: > > > > >>>>> > > > > >>>>>> Hi All, > > > > >>>>>> I am exporting data to MSSQL server and getting below error. > > > > >>>>>> > > > > >>>>>> ODBC error (42000). [FreeTDS][SQL Server]Unclosed quotation > mark > > > > >>> after > > > > >>>>> the > > > > >>>>>> character string ' test > > > > >>>>>> > > > > >>>>>> Could you please share your thoughts and ideas to resolve it > or > > > any > > > > >>>> know > > > > >>>>>> issue in freeTDS ,please share it. > > > > >>>>>> > > > > >>>>>> > > > > >>>>>> Thanks > > > > >>>>>> Venkata Krishna > > > > >>>>>> 9600185503 > > > > >>>>>> _______________________________________________ > > > > >>>>>> 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 > > > > >>>>> > > > > >>>> > > > > >>>> > > > > >>>> > > > > >>>> -- > > > > >>>> > > > > >>>> *Thanks&RegardsVenkatakrishna.T* > > > > >>>> > > > > >>>> *HCL TECHNOLOGIES Ltd.09600185503/09908611807* > > > > >>>> _______________________________________________ > > > > >>>> 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 > > > > >>> > > > > >> > > > > >> > > > > >> > > > > >> > > > > >> > > > > > > > > > > > > > > > -- > > > > > > > > > > *Thanks&RegardsVenkatakrishna.T* > > > > > > > > > > *HCL TECHNOLOGIES Ltd.09600185503/09908611807* > > > > > _______________________________________________ > > > > > FreeTDS mailing list > > > > > FreeTDS at lists.ibiblio.org > > > > > http://lists.ibiblio.org/mailman/listinfo/freetds > > > > > > > > ________________________________________ > > > > 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 > > > > > > > > > > > > > > > > -- > > > > > > *Thanks&RegardsVenkatakrishna.T* > > > > > > *HCL TECHNOLOGIES Ltd.09600185503/09908611807* > > > _______________________________________________ > > > 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 > > > > > > -- > > *Thanks&RegardsVenkatakrishna.T* > > *HCL TECHNOLOGIES Ltd.09600185503/09908611807* > _______________________________________________ > FreeTDS mailing list > FreeTDS at lists.ibiblio.org > http://lists.ibiblio.org/mailman/listinfo/freetds > From olka at bagheera.se Tue Aug 5 03:28:19 2014 From: olka at bagheera.se (Ola Karlsson) Date: Tue, 5 Aug 2014 07:28:19 +0000 Subject: [freetds] Problem with nvarchar output In-Reply-To: References: <21475157eed847edb7043a81ea7eb893@DBXPR03MB061.eurprd03.prod.outlook.com> <623592d172b34d3e8786db0861de38c7@DBXPR03MB061.eurprd03.prod.outlook.com> Message-ID: Hi, No problem :) Just to be clear I?ll post a more complete part of the PHP code below. I?m not sure how result sets work but as there are no results from this procedure, it just inputs a line, and two returns are specified in differen variables could this really be the case? Function PlaceOrder($xxx,$xxx....){ //CONNECT $db_conn = db_connect(); $stmt = mssql_init('ic_PlaceOrder',$db_conn); //BIND if($OrderNr) mssql_bind($stmt, '@OrderNr',$OrderNr, SQLINT4,true,false,8); else mssql_bind($stmt, '@OrderNr',$OrderNr, SQLINT4,true,true,8); mssql_bind($stmt, '@ErrorMsg',$ErrorMsg, SQLVARCHAR,true,false,4000); //EXECUTE $rs = mssql_execute($stmt); //RESULTS $return['OrderNr'] = $OrderNr; $return['ErrorMsg'] = $ErrorMsg; //DEBUGG print_r($return); //CLEAN mssql_free_statement($stmt); return $return; } I also tried iterating with mssql_next_result($rs) but there is only 1 set. BR Ola -----Ursprungligt meddelande----- Fr?n: FreeTDS [mailto:freetds-bounces at lists.ibiblio.org] F?r Frediano Ziglio Skickat: den 4 augusti 2014 18:27 Till: FreeTDS Development Group ?mne: Re: [freetds] Problem with nvarchar output Hi, sorry for late reply. I looked at PHP code to try to understand the sequence. It seems to me that you called mssql_execute (which is ok) and the procedure got the right result but then instead of calling mssql_next_result you just freed the statement which cause the store procedure parameters to be discarded. Is it right? Frediano Frediano 2014-08-01 18:32 GMT+01:00 Frediano Ziglio : > I just realised you posted most of information in the first mail you > sent > > Frediano > > > 2014-08-01 17:06 GMT+01:00 Frediano Ziglio : > > Looks like something upset PHP code. Are you using mssql module, right? >> Which PHP version? Which PHP function are you calling, mssql_query ? >> >> >> Frediano >> >> >> 2014-07-31 15:01 GMT+01:00 Ola Karlsson : >> >> I?ve attached a bigger log but I find it difficult to see what is >> exactly >>> related to this query so perhaps I?ve still missed something. >>> Will adding logg details for a specific instance in freetds.conf >>> cause only logging for that instance, in my case [ap1Dev], or will >>> it still logg for all instances? >>> >>> If it?s the encoding is it a PHP problem or FreeTDS setting that >>> needs to change? >>> >>> BR >>> Ola >>> >>> -----Ursprungligt meddelande----- >>> Fr?n: FreeTDS [mailto:freetds-bounces at lists.ibiblio.org] F?r >>> Frediano Ziglio >>> Skickat: den 31 juli 2014 15:41 >>> Till: FreeTDS Development Group >>> ?mne: Re: [freetds] Problem with nvarchar output >>> >>> The upper layer decided to cancel the query. The reason could be >>> previously in the log. >>> Looks like you are using an encoding which cannot support your >>> charset (there are some question marks in the output string possibly >>> result of a wrong conversion). >>> >>> Frediano >>> >>> >>> 2014-07-31 9:44 GMT+01:00 Ola Karlsson : >>> >>> > Hi, >>> > Sorry for the delay. Went on hollidays for a few weeks :) >>> > >>> > As far as I can see my error message is stated in the log exactly >>> > as it should be and it also states two returned results. >>> > The integer value is returned correctly but not the nvarchar. >>> > >>> > I have attached a portion of the log containing the procedure call >>> > and my error message. >>> > I don't notice any error messages or so but then again theres a >>> > lot of information in the logs. >>> > >>> > No errors in the php logs either. >>> > >>> > Any ideas? >>> > >>> > >>> > BR >>> > Ola >>> > >>> > -----Ursprungligt meddelande----- >>> > Fr?n: FreeTDS [mailto:freetds-bounces at lists.ibiblio.org] F?r >>> > Frediano Ziglio >>> > Skickat: den 12 juli 2014 09:06 >>> > Till: FreeTDS Development Group >>> > ?mne: Re: [freetds] Problem with nvarchar output >>> > >>> > Hi, >>> > did you check TDSDUMP ? >>> > >>> > Frediano >>> > >>> > >>> > 2014-07-06 14:32 GMT+01:00 Ola Karlsson : >>> > >>> > > Hi >>> > > I'm using Freetds with PHP5 to access a SQL server but I'm >>> > > having trouble with the output parameters. >>> > > I have two parameters, one SQLINT4 and one SQLVARCHAR. The int >>> > > is working but I don't get any returns from the varchar. >>> > > >>> > > Is there anything special that needs to be done when outputting >>> nvarchar? >>> > > >>> > > PHP binds, >>> > > mssql_bind($stmt, >>> > > '@ErrorMsg',$ErrorMsg,SQLVARCHAR,true,false,4000); >>> > > mssql_bind($stmt, '@OrderNr',$OrderNr,SQLINT4,true,true,8); >>> > > >>> > > SQL parameters, >>> > > @ErrorMsg nvarchar(4000) output >>> > > @OrderNr Jeeves_OrderNo output >>> > > >>> > > >>> > > Sql server, >>> > > SQL Server 2008 R2 >>> > > >>> > > Freetds server, >>> > > Ubuntu 12.04 3.5.0-51-generic >>> > > >>> > > Tsql -C >>> > > Version: freetds v0.91 >>> > > freetds.conf directory: /etc/freetds MS db-lib source compatibility: >>> > > no Sybase binary compatibility: yes Thread safety: yes iconv >>> > > library: yes TDS version: 4.2 >>> > > iODBC: no >>> > > unixodbc: yes >>> > > SSPI "trusted" logins: no >>> > > Kerberos: no >>> > > >>> > > Freetds conf, >>> > > [global] >>> > > text size = 64512 >>> > > [Sqlserver] >>> > > host = xxx.xxx.xxx.xxx >>> > > port = xxxx >>> > > tds version = 8.0 >>> > > >>> > > PHP5 >>> > > PHP 5.3.10-1ubuntu3.12 >>> > > >>> > > >>> > > BR >>> > > Ola >>> > > _______________________________________________ >>> > > 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 Aug 5 17:22:49 2014 From: freddy77 at gmail.com (Frediano Ziglio) Date: Tue, 5 Aug 2014 22:22:49 +0100 Subject: [freetds] Problem with nvarchar output In-Reply-To: References: <21475157eed847edb7043a81ea7eb893@DBXPR03MB061.eurprd03.prod.outlook.com> <623592d172b34d3e8786db0861de38c7@DBXPR03MB061.eurprd03.prod.outlook.com> Message-ID: Hi Ola, log show clearly that there are two recordset before returning and from PHP code you clearly did not handle these results. These results usually came from any select statement but can also came from some bad designed trigger. Frediano Frediano 2014-08-05 8:28 GMT+01:00 Ola Karlsson : > Hi, > No problem :) > > Just to be clear I?ll post a more complete part of the PHP code below. > I?m not sure how result sets work but as there are no results from this > procedure, it just inputs a line, and two returns are specified in differen > variables could this really be the case? > > Function PlaceOrder($xxx,$xxx....){ > > //CONNECT > $db_conn = db_connect(); > $stmt = mssql_init('ic_PlaceOrder',$db_conn); > > //BIND > if($OrderNr) > mssql_bind($stmt, '@OrderNr',$OrderNr, SQLINT4,true,false,8); > else > mssql_bind($stmt, '@OrderNr',$OrderNr, SQLINT4,true,true,8); > > mssql_bind($stmt, '@ErrorMsg',$ErrorMsg, SQLVARCHAR,true,false,4000); > > //EXECUTE > $rs = mssql_execute($stmt); > > //RESULTS > $return['OrderNr'] = $OrderNr; > $return['ErrorMsg'] = $ErrorMsg; > > //DEBUGG > print_r($return); > > //CLEAN > mssql_free_statement($stmt); > > return $return; > } > > > I also tried iterating with mssql_next_result($rs) but there is only 1 set. > > BR > Ola > > > -----Ursprungligt meddelande----- > Fr?n: FreeTDS [mailto:freetds-bounces at lists.ibiblio.org] F?r Frediano > Ziglio > Skickat: den 4 augusti 2014 18:27 > Till: FreeTDS Development Group > ?mne: Re: [freetds] Problem with nvarchar output > > Hi, > sorry for late reply. > > I looked at PHP code to try to understand the sequence. It seems to me > that you called mssql_execute (which is ok) and the procedure got the right > result but then instead of calling mssql_next_result you just freed the > statement which cause the store procedure parameters to be discarded. Is it > right? > > Frediano > > > Frediano > > > 2014-08-01 18:32 GMT+01:00 Frediano Ziglio : > > > I just realised you posted most of information in the first mail you > > sent > > > > Frediano > > > > > > 2014-08-01 17:06 GMT+01:00 Frediano Ziglio : > > > > Looks like something upset PHP code. Are you using mssql module, right? > >> Which PHP version? Which PHP function are you calling, mssql_query ? > >> > >> > >> Frediano > >> > >> > >> 2014-07-31 15:01 GMT+01:00 Ola Karlsson : > >> > >> I?ve attached a bigger log but I find it difficult to see what is > >> exactly > >>> related to this query so perhaps I?ve still missed something. > >>> Will adding logg details for a specific instance in freetds.conf > >>> cause only logging for that instance, in my case [ap1Dev], or will > >>> it still logg for all instances? > >>> > >>> If it?s the encoding is it a PHP problem or FreeTDS setting that > >>> needs to change? > >>> > >>> BR > >>> Ola > >>> > >>> -----Ursprungligt meddelande----- > >>> Fr?n: FreeTDS [mailto:freetds-bounces at lists.ibiblio.org] F?r > >>> Frediano Ziglio > >>> Skickat: den 31 juli 2014 15:41 > >>> Till: FreeTDS Development Group > >>> ?mne: Re: [freetds] Problem with nvarchar output > >>> > >>> The upper layer decided to cancel the query. The reason could be > >>> previously in the log. > >>> Looks like you are using an encoding which cannot support your > >>> charset (there are some question marks in the output string possibly > >>> result of a wrong conversion). > >>> > >>> Frediano > >>> > >>> > >>> 2014-07-31 9:44 GMT+01:00 Ola Karlsson : > >>> > >>> > Hi, > >>> > Sorry for the delay. Went on hollidays for a few weeks :) > >>> > > >>> > As far as I can see my error message is stated in the log exactly > >>> > as it should be and it also states two returned results. > >>> > The integer value is returned correctly but not the nvarchar. > >>> > > >>> > I have attached a portion of the log containing the procedure call > >>> > and my error message. > >>> > I don't notice any error messages or so but then again theres a > >>> > lot of information in the logs. > >>> > > >>> > No errors in the php logs either. > >>> > > >>> > Any ideas? > >>> > > >>> > > >>> > BR > >>> > Ola > >>> > > >>> > -----Ursprungligt meddelande----- > >>> > Fr?n: FreeTDS [mailto:freetds-bounces at lists.ibiblio.org] F?r > >>> > Frediano Ziglio > >>> > Skickat: den 12 juli 2014 09:06 > >>> > Till: FreeTDS Development Group > >>> > ?mne: Re: [freetds] Problem with nvarchar output > >>> > > >>> > Hi, > >>> > did you check TDSDUMP ? > >>> > > >>> > Frediano > >>> > > >>> > > >>> > 2014-07-06 14:32 GMT+01:00 Ola Karlsson : > >>> > > >>> > > Hi > >>> > > I'm using Freetds with PHP5 to access a SQL server but I'm > >>> > > having trouble with the output parameters. > >>> > > I have two parameters, one SQLINT4 and one SQLVARCHAR. The int > >>> > > is working but I don't get any returns from the varchar. > >>> > > > >>> > > Is there anything special that needs to be done when outputting > >>> nvarchar? > >>> > > > >>> > > PHP binds, > >>> > > mssql_bind($stmt, > >>> > > '@ErrorMsg',$ErrorMsg,SQLVARCHAR,true,false,4000); > >>> > > mssql_bind($stmt, '@OrderNr',$OrderNr,SQLINT4,true,true,8); > >>> > > > >>> > > SQL parameters, > >>> > > @ErrorMsg nvarchar(4000) output > >>> > > @OrderNr Jeeves_OrderNo output > >>> > > > >>> > > > >>> > > Sql server, > >>> > > SQL Server 2008 R2 > >>> > > > >>> > > Freetds server, > >>> > > Ubuntu 12.04 3.5.0-51-generic > >>> > > > >>> > > Tsql -C > >>> > > Version: freetds v0.91 > >>> > > freetds.conf directory: /etc/freetds MS db-lib source > compatibility: > >>> > > no Sybase binary compatibility: yes Thread safety: yes iconv > >>> > > library: yes TDS version: 4.2 > >>> > > iODBC: no > >>> > > unixodbc: yes > >>> > > SSPI "trusted" logins: no > >>> > > Kerberos: no > >>> > > > >>> > > Freetds conf, > >>> > > [global] > >>> > > text size = 64512 > >>> > > [Sqlserver] > >>> > > host = xxx.xxx.xxx.xxx > >>> > > port = xxxx > >>> > > tds version = 8.0 > >>> > > > >>> > > PHP5 > >>> > > PHP 5.3.10-1ubuntu3.12 > >>> > > > >>> > > > >>> > > BR > >>> > > Ola > >>> > > _______________________________________________ > >>> > > 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 craigberry at mac.com Thu Aug 7 13:46:51 2014 From: craigberry at mac.com (Craig A. Berry) Date: Thu, 07 Aug 2014 12:46:51 -0500 Subject: [freetds] [PATCH] Preserve enough digits when converting float to char. Message-ID: <6B702EAA-AD3B-4543-A687-679973C25E2F@mac.com> Patch inline for easy review and also attached for easy application. From 3bbd7d18bef4469f52c14053c8370529a6e7ec15 Mon Sep 17 00:00:00 2001 From: "Craig A. Berry" Date: Thu, 7 Aug 2014 12:12:22 -0500 Subject: [PATCH] Preserve enough digits when converting float to char. The floating point standard (IEEE 754) says that in order to make a round trip conversion from binary floating point values to character and back again, you need to preserve 9 digits for 32-bit floats and 17 digits for 64-bit floats in order avoid loss of precision. We were only preserving 7 digits for singles and 16 for doubles, so we could experience loss of precision when making such round-trip conversions, such as bulking out and bulking back in again. --- src/tds/convert.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tds/convert.c b/src/tds/convert.c index 5b49118..2d27856 100644 --- a/src/tds/convert.c +++ b/src/tds/convert.c @@ -1525,7 +1525,7 @@ tds_convert_real(const TDS_REAL* src, int desttype, CONV_RESULT * cr) switch (desttype) { case TDS_CONVERT_CHAR: case CASE_ALL_CHAR: - sprintf(tmp_str, "%.7g", the_value); + sprintf(tmp_str, "%.9g", the_value); return string_to_result(tmp_str, cr); break; @@ -1638,7 +1638,7 @@ tds_convert_flt8(const TDS_FLOAT* src, int desttype, CONV_RESULT * cr) switch (desttype) { case TDS_CONVERT_CHAR: case CASE_ALL_CHAR: - sprintf(tmp_str, "%.16g", the_value); + sprintf(tmp_str, "%.17g", the_value); return string_to_result(tmp_str, cr); break; -- 1.8.4.2 The round-trip conversion problem can be illustrated by creating and populating a table like so: create table tempdb.dbo.test_float ( [my_single] [float](24) NULL, [my_double] [float](53) NULL ) insert into tempdb.dbo.test_float values ('4.149999', '4.1499999999999995'); If you bulk out that table in character format before my change you get: $ cat tf.bcp 4.149999 4.149999999999999 but after my change you get: $ cat tf2.bcp 4.14999914 4.1499999999999995 If you bulk both of those files back in and examine them you get: 1> select cast(my_single as varbinary), cast(my_double as varbinary) 2> from tempdb.dbo.test_float 3> go 4084cccb 4010999999999999 4084cccb 4010999999999998 4084cccb 4010999999999999 (3 rows affected) The change appears not to be significant for single precision with my chosen example. But for double precision, the middle record (ending in '8' in binary) shows that there was a loss of precision before my change. I also tested with the Microsoft bcp client and it does not lose precision as ours does before this change. I thought about a proper place to add a test for this. It appears src/tds/unittests/convert.c only tests the return values from conversion routines and not the contents of the converted data. I wasn't up to changing that at the moment. ________________________________________ 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-Preserve-enough-digits-when-converting-float-to-char.patch Type: application/octet-stream Size: 1501 bytes Desc: not available URL: From freddy77 at gmail.com Fri Aug 8 07:09:49 2014 From: freddy77 at gmail.com (Frediano Ziglio) Date: Fri, 08 Aug 2014 12:09:49 +0100 Subject: [freetds] R: [PATCH] Preserve enough digits when converting float to char. Message-ID: Commited. I had to update dataread test. -------- Messaggio originale -------- Da: "Craig A. Berry" Data: 2014/08/07 6:46 PM (GMT+00:00) A: FreeTDS Development Group Oggetto: [freetds] [PATCH] Preserve enough digits when converting float to char. Patch inline for easy review and also attached for easy application. From 3bbd7d18bef4469f52c14053c8370529a6e7ec15 Mon Sep 17 00:00:00 2001 From: "Craig A. Berry" Date: Thu, 7 Aug 2014 12:12:22 -0500 Subject: [PATCH] Preserve enough digits when converting float to char. The floating point standard (IEEE 754) says that in order to make a round trip conversion from binary floating point values to character and back again, you need to preserve 9 digits for 32-bit floats and 17 digits for 64-bit floats in order avoid loss of precision. We were only preserving 7 digits for singles and 16 for doubles, so we could experience loss of precision when making such round-trip conversions, such as bulking out and bulking back in again. --- src/tds/convert.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tds/convert.c b/src/tds/convert.c index 5b49118..2d27856 100644 --- a/src/tds/convert.c +++ b/src/tds/convert.c @@ -1525,7 +1525,7 @@ tds_convert_real(const TDS_REAL* src, int desttype, CONV_RESULT * cr) switch (desttype) { case TDS_CONVERT_CHAR: case CASE_ALL_CHAR: - sprintf(tmp_str, "%.7g", the_value); + sprintf(tmp_str, "%.9g", the_value); return string_to_result(tmp_str, cr); break; @@ -1638,7 +1638,7 @@ tds_convert_flt8(const TDS_FLOAT* src, int desttype, CONV_RESULT * cr) switch (desttype) { case TDS_CONVERT_CHAR: case CASE_ALL_CHAR: - sprintf(tmp_str, "%.16g", the_value); + sprintf(tmp_str, "%.17g", the_value); return string_to_result(tmp_str, cr); break; -- 1.8.4.2 The round-trip conversion problem can be illustrated by creating and populating a table like so: create table tempdb.dbo.test_float ( ? [my_single] [float](24) NULL, ? [my_double] [float](53) NULL ) insert into tempdb.dbo.test_float values ('4.149999', '4.1499999999999995'); If you bulk out that table in character format before my change you get: $ cat tf.bcp 4.149999 4.149999999999999 but after my change you get: $ cat tf2.bcp 4.14999914 4.1499999999999995 If you bulk both of those files back in and examine them you get: 1> select cast(my_single as varbinary), cast(my_double as varbinary) 2> from tempdb.dbo.test_float 3> go 4084cccb 4010999999999999 4084cccb 4010999999999998 4084cccb 4010999999999999 (3 rows affected) The change appears not to be significant for single precision with my chosen example.? But for double precision, the middle record (ending in '8' in binary) shows that there was a loss of precision before my change.? I also tested with the Microsoft bcp client and it does not lose precision as ours does before this change. I thought about a proper place to add a test for this.? It appears src/tds/unittests/convert.c only tests the return values from conversion routines and not the contents of the converted data.? I wasn't up to changing that at the moment. ________________________________________ 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 craigberry at mac.com Fri Aug 8 10:38:03 2014 From: craigberry at mac.com (Craig A. Berry) Date: Fri, 08 Aug 2014 09:38:03 -0500 Subject: [freetds] [PATCH] Preserve enough digits when converting float to char. In-Reply-To: References: Message-ID: <4AD9B566-858D-4AF5-BFA7-420ED6A6871C@mac.com> On Aug 8, 2014, at 6:09 AM, Frediano Ziglio wrote: > Commited. I had to update dataread test. Thank you! I'm sure I would've found that test if I'd looked harder :-). ________________________________________ Craig A. Berry mailto:craigberry at mac.com "... getting out of a sonnet is much more difficult than getting in." Brad Leithauser From cyreve at gmail.com Thu Aug 7 14:58:04 2014 From: cyreve at gmail.com (Richard Hughes) Date: Thu, 7 Aug 2014 19:58:04 +0100 Subject: [freetds] Mangled SQL due to mis-tracking of quotes and ODBC escapes Message-ID: <814013151.20140807195804@rhughes.net> Hi there, I wrote a stored procedure using some of SQL Server's XML functions and discovered that, upon trying to run the create proc statement through a FreeTDS/unixodbc connection, the content was getting mangled and hence rejected. Here's a reduced test case in Python: import pyodbc db = pyodbc.connect('DRIVER={FreeTDS};SERVER=198.51.100.1;PORT=1433;DATABASE=master;UID=sa;PWD=password;QuotedID=Yes;AnsiNPW=Yes', autocommit=True) cur = db.cursor() cur.execute(''' set quoted_identifier on set ansi_warnings on set ansi_padding on set ansi_nulls on set concat_null_yields_null on -- This doesn't work declare @x xml = ''; declare @d datetime; set @x.modify('insert attribute d {sql:variable("@d")} into (/e)[1]'); ''') It looks like src/odbc/native.c:to_native() is not caring about the comment "--" so is losing track of whether we're in a string or not. It then concludes that {sql:variable("@d")} is an ODBC escape and transforms it into just :variable("@d"), which SQL Server rejects. This means that you can make the above test case work by simply removing the comment (or, indeed, adding another quote to it). Is this right? Richard. From freddy77 at gmail.com Fri Aug 8 13:16:55 2014 From: freddy77 at gmail.com (Frediano Ziglio) Date: Fri, 8 Aug 2014 18:16:55 +0100 Subject: [freetds] Mangled SQL due to mis-tracking of quotes and ODBC escapes In-Reply-To: <814013151.20140807195804@rhughes.net> References: <814013151.20140807195804@rhughes.net> Message-ID: 2014-08-07 19:58 GMT+01:00 Richard Hughes : > Hi there, > > I wrote a stored procedure using some of SQL Server's XML functions > and discovered that, upon trying to run the create proc statement > through a FreeTDS/unixodbc connection, the content was getting mangled > and hence rejected. > > Here's a reduced test case in Python: > > import pyodbc > db = > pyodbc.connect('DRIVER={FreeTDS};SERVER=198.51.100.1;PORT=1433;DATABASE=master;UID=sa;PWD=password;QuotedID=Yes;AnsiNPW=Yes', > autocommit=True) > cur = db.cursor() > cur.execute(''' > set quoted_identifier on > set ansi_warnings on > set ansi_padding on > set ansi_nulls on > set concat_null_yields_null on > -- This doesn't work > declare @x xml = ''; > declare @d datetime; > set @x.modify('insert attribute d {sql:variable("@d")} into (/e)[1]'); > ''') > > It looks like src/odbc/native.c:to_native() is not caring about the > comment "--" so is losing track of whether we're in a string or not. > It then concludes that {sql:variable("@d")} is an ODBC escape and > transforms it into just :variable("@d"), which SQL Server rejects. > This means that you can make the above test case work by simply > removing the comment (or, indeed, adding another quote to it). > > Is this right? > > Richard. > > Surely is not right. Committed a patch in git master, see https://gitorious.org/freetds/freetds/. Frediano From freddy77 at gmail.com Sun Aug 10 07:57:18 2014 From: freddy77 at gmail.com (Frediano Ziglio) Date: Sun, 10 Aug 2014 12:57:18 +0100 Subject: [freetds] Mangled SQL due to mis-tracking of quotes and ODBC escapes In-Reply-To: <814013151.20140807195804@rhughes.net> References: <814013151.20140807195804@rhughes.net> Message-ID: Backport patch in 0.91 branch. Frediano Frediano 2014-08-07 19:58 GMT+01:00 Richard Hughes : > Hi there, > > I wrote a stored procedure using some of SQL Server's XML functions > and discovered that, upon trying to run the create proc statement > through a FreeTDS/unixodbc connection, the content was getting mangled > and hence rejected. > > Here's a reduced test case in Python: > > import pyodbc > db = > pyodbc.connect('DRIVER={FreeTDS};SERVER=198.51.100.1;PORT=1433;DATABASE=master;UID=sa;PWD=password;QuotedID=Yes;AnsiNPW=Yes', > autocommit=True) > cur = db.cursor() > cur.execute(''' > set quoted_identifier on > set ansi_warnings on > set ansi_padding on > set ansi_nulls on > set concat_null_yields_null on > -- This doesn't work > declare @x xml = ''; > declare @d datetime; > set @x.modify('insert attribute d {sql:variable("@d")} into (/e)[1]'); > ''') > > It looks like src/odbc/native.c:to_native() is not caring about the > comment "--" so is losing track of whether we're in a string or not. > It then concludes that {sql:variable("@d")} is an ODBC escape and > transforms it into just :variable("@d"), which SQL Server rejects. > This means that you can make the above test case work by simply > removing the comment (or, indeed, adding another quote to it). > > Is this right? > > Richard. > > _______________________________________________ > FreeTDS mailing list > FreeTDS at lists.ibiblio.org > http://lists.ibiblio.org/mailman/listinfo/freetds > From olka at bagheera.se Tue Aug 12 06:53:51 2014 From: olka at bagheera.se (Ola Karlsson) Date: Tue, 12 Aug 2014 10:53:51 +0000 Subject: [freetds] Problem with nvarchar output In-Reply-To: References: <21475157eed847edb7043a81ea7eb893@DBXPR03MB061.eurprd03.prod.outlook.com> <623592d172b34d3e8786db0861de38c7@DBXPR03MB061.eurprd03.prod.outlook.com> Message-ID: <9a41947c3ba34441b75862d660318c96@DBXPR03MB061.eurprd03.prod.outlook.com> Hi Frediano, Its weird as I receive the integer result without issue. And from my tests using mssql_next_result I only receive one result set but then again I might have been using it wrong. I?ll investigate this further on the PHP side. Thanks a lot for all your effort. BR Ola -----Ursprungligt meddelande----- Fr?n: FreeTDS [mailto:freetds-bounces at lists.ibiblio.org] F?r Frediano Ziglio Skickat: den 5 augusti 2014 23:23 Till: FreeTDS Development Group ?mne: Re: [freetds] Problem with nvarchar output Hi Ola, log show clearly that there are two recordset before returning and from PHP code you clearly did not handle these results. These results usually came from any select statement but can also came from some bad designed trigger. Frediano Frediano 2014-08-05 8:28 GMT+01:00 Ola Karlsson : > Hi, > No problem :) > > Just to be clear I?ll post a more complete part of the PHP code below. > I?m not sure how result sets work but as there are no results from > this procedure, it just inputs a line, and two returns are specified > in differen variables could this really be the case? > > Function PlaceOrder($xxx,$xxx....){ > > //CONNECT > $db_conn = db_connect(); > $stmt = mssql_init('ic_PlaceOrder',$db_conn); > > //BIND > if($OrderNr) > mssql_bind($stmt, '@OrderNr',$OrderNr, SQLINT4,true,false,8); else > mssql_bind($stmt, '@OrderNr',$OrderNr, SQLINT4,true,true,8); > > mssql_bind($stmt, '@ErrorMsg',$ErrorMsg, SQLVARCHAR,true,false,4000); > > //EXECUTE > $rs = mssql_execute($stmt); > > //RESULTS > $return['OrderNr'] = $OrderNr; > $return['ErrorMsg'] = $ErrorMsg; > > //DEBUGG > print_r($return); > > //CLEAN > mssql_free_statement($stmt); > > return $return; > } > > > I also tried iterating with mssql_next_result($rs) but there is only 1 set. > > BR > Ola > > > -----Ursprungligt meddelande----- > Fr?n: FreeTDS [mailto:freetds-bounces at lists.ibiblio.org] F?r Frediano > Ziglio > Skickat: den 4 augusti 2014 18:27 > Till: FreeTDS Development Group > ?mne: Re: [freetds] Problem with nvarchar output > > Hi, > sorry for late reply. > > I looked at PHP code to try to understand the sequence. It seems to me > that you called mssql_execute (which is ok) and the procedure got the > right result but then instead of calling mssql_next_result you just > freed the statement which cause the store procedure parameters to be > discarded. Is it right? > > Frediano > > > Frediano > > > 2014-08-01 18:32 GMT+01:00 Frediano Ziglio : > > > I just realised you posted most of information in the first mail you > > sent > > > > Frediano > > > > > > 2014-08-01 17:06 GMT+01:00 Frediano Ziglio : > > > > Looks like something upset PHP code. Are you using mssql module, right? > >> Which PHP version? Which PHP function are you calling, mssql_query ? > >> > >> > >> Frediano > >> > >> > >> 2014-07-31 15:01 GMT+01:00 Ola Karlsson : > >> > >> I?ve attached a bigger log but I find it difficult to see what is > >> exactly > >>> related to this query so perhaps I?ve still missed something. > >>> Will adding logg details for a specific instance in freetds.conf > >>> cause only logging for that instance, in my case [ap1Dev], or will > >>> it still logg for all instances? > >>> > >>> If it?s the encoding is it a PHP problem or FreeTDS setting that > >>> needs to change? > >>> > >>> BR > >>> Ola > >>> > >>> -----Ursprungligt meddelande----- > >>> Fr?n: FreeTDS [mailto:freetds-bounces at lists.ibiblio.org] F?r > >>> Frediano Ziglio > >>> Skickat: den 31 juli 2014 15:41 > >>> Till: FreeTDS Development Group > >>> ?mne: Re: [freetds] Problem with nvarchar output > >>> > >>> The upper layer decided to cancel the query. The reason could be > >>> previously in the log. > >>> Looks like you are using an encoding which cannot support your > >>> charset (there are some question marks in the output string > >>> possibly result of a wrong conversion). > >>> > >>> Frediano > >>> > >>> > >>> 2014-07-31 9:44 GMT+01:00 Ola Karlsson : > >>> > >>> > Hi, > >>> > Sorry for the delay. Went on hollidays for a few weeks :) > >>> > > >>> > As far as I can see my error message is stated in the log > >>> > exactly as it should be and it also states two returned results. > >>> > The integer value is returned correctly but not the nvarchar. > >>> > > >>> > I have attached a portion of the log containing the procedure > >>> > call and my error message. > >>> > I don't notice any error messages or so but then again theres a > >>> > lot of information in the logs. > >>> > > >>> > No errors in the php logs either. > >>> > > >>> > Any ideas? > >>> > > >>> > > >>> > BR > >>> > Ola > >>> > > >>> > -----Ursprungligt meddelande----- > >>> > Fr?n: FreeTDS [mailto:freetds-bounces at lists.ibiblio.org] F?r > >>> > Frediano Ziglio > >>> > Skickat: den 12 juli 2014 09:06 > >>> > Till: FreeTDS Development Group > >>> > ?mne: Re: [freetds] Problem with nvarchar output > >>> > > >>> > Hi, > >>> > did you check TDSDUMP ? > >>> > > >>> > Frediano > >>> > > >>> > > >>> > 2014-07-06 14:32 GMT+01:00 Ola Karlsson : > >>> > > >>> > > Hi > >>> > > I'm using Freetds with PHP5 to access a SQL server but I'm > >>> > > having trouble with the output parameters. > >>> > > I have two parameters, one SQLINT4 and one SQLVARCHAR. The int > >>> > > is working but I don't get any returns from the varchar. > >>> > > > >>> > > Is there anything special that needs to be done when > >>> > > outputting > >>> nvarchar? > >>> > > > >>> > > PHP binds, > >>> > > mssql_bind($stmt, > >>> > > '@ErrorMsg',$ErrorMsg,SQLVARCHAR,true,false,4000); > >>> > > mssql_bind($stmt, '@OrderNr',$OrderNr,SQLINT4,true,true,8); > >>> > > > >>> > > SQL parameters, > >>> > > @ErrorMsg nvarchar(4000) output @OrderNr Jeeves_OrderNo output > >>> > > > >>> > > > >>> > > Sql server, > >>> > > SQL Server 2008 R2 > >>> > > > >>> > > Freetds server, > >>> > > Ubuntu 12.04 3.5.0-51-generic > >>> > > > >>> > > Tsql -C > >>> > > Version: freetds v0.91 > >>> > > freetds.conf directory: /etc/freetds MS db-lib source > compatibility: > >>> > > no Sybase binary compatibility: yes Thread safety: yes iconv > >>> > > library: yes TDS version: 4.2 > >>> > > iODBC: no > >>> > > unixodbc: yes > >>> > > SSPI "trusted" logins: no > >>> > > Kerberos: no > >>> > > > >>> > > Freetds conf, > >>> > > [global] > >>> > > text size = 64512 > >>> > > [Sqlserver] > >>> > > host = xxx.xxx.xxx.xxx > >>> > > port = xxxx > >>> > > tds version = 8.0 > >>> > > > >>> > > PHP5 > >>> > > PHP 5.3.10-1ubuntu3.12 > >>> > > > >>> > > > >>> > > BR > >>> > > Ola > >>> > > _______________________________________________ > >>> > > 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 nem at emptec.com Thu Aug 14 11:45:05 2014 From: nem at emptec.com (Nem W Schlecht) Date: Thu, 14 Aug 2014 10:45:05 -0500 Subject: [freetds] ntext 8000 char limit - still there? Message-ID: Hello all, I'm using FreeTDS with Perl and I'm trying to insert large chunks of text into a table with an NTEXT field. My script runs and produces no errors, but I'm only getting 8000 chars when I call DATALENGTH(ntextfieldname) on the SQL side. I found a discussion on this back from 2004 in the FreeTDS list where it said this was a limitation of the protocol. Is this still a limit? What is the accepted way of getting around this limitation and inserting large-sized values into NTEXT fields? My test code: #!/usr/bin/perl #CREATE TABLE testinsert ( # querytext NTEXT #); use DBI; my @srvopts; push(@srvopts, "server=MyServer"); push(@srvopts, "database=MyDatabase"); my $srv_opts_joined=join(';', @srvopts); my $dbh = DBI->connect("dbi:Sybase:$srv_opts_joined", 'user', 'secret'); my $sth = $dbh->prepare(" INSERT INTO testinsert (querytext) VALUES (?) "); my @words; open(WORDS, "/usr/share/dict/words"); while () { push(@words, $_); } my $big = join('', @words); print "L: ", length($big), "\n"; $sth->execute($big); $sth->finish(); $dbh->disconnect(); # # SELECT DATALENGTH(querytext) FROM testinsert; # -- Nem W Schlecht From randy at thesyrings.us Thu Aug 14 11:50:31 2014 From: randy at thesyrings.us (Randy Syring) Date: Thu, 14 Aug 2014 11:50:31 -0400 Subject: [freetds] ntext 8000 char limit - still there? In-Reply-To: References: Message-ID: <53ECDAC7.2070408@thesyrings.us> Have you seen this: http://www.freetds.org/userguide/troubleshooting.htm#KNOWNISSUES There is some info there about lengths for both varchar and text. *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 08/14/2014 11:45 AM, Nem W Schlecht wrote: > Hello all, > I'm using FreeTDS with Perl and I'm trying to insert large chunks of > text into a table with an NTEXT field. My script runs and produces no > errors, but I'm only getting 8000 chars when I call > DATALENGTH(ntextfieldname) on the SQL side. I found a discussion on this > back from 2004 in the FreeTDS list where it said this was a limitation of > the protocol. > > Is this still a limit? What is the accepted way of getting around this > limitation and inserting large-sized values into NTEXT fields? > > > My test code: > #!/usr/bin/perl > > #CREATE TABLE testinsert ( > # querytext NTEXT > #); > > use DBI; > > my @srvopts; > push(@srvopts, "server=MyServer"); > push(@srvopts, "database=MyDatabase"); > my $srv_opts_joined=join(';', @srvopts); > > my $dbh = DBI->connect("dbi:Sybase:$srv_opts_joined", 'user', 'secret'); > > my $sth = $dbh->prepare(" > INSERT INTO testinsert > (querytext) > VALUES (?) > "); > > my @words; > open(WORDS, "/usr/share/dict/words"); > while () { > push(@words, $_); > } > > my $big = join('', @words); > print "L: ", length($big), "\n"; > $sth->execute($big); > > $sth->finish(); > $dbh->disconnect(); > > # > # SELECT DATALENGTH(querytext) FROM testinsert; > # > > From freddy77 at gmail.com Thu Aug 14 11:57:26 2014 From: freddy77 at gmail.com (Frediano Ziglio) Date: Thu, 14 Aug 2014 16:57:26 +0100 Subject: [freetds] ntext 8000 char limit - still there? In-Reply-To: References: Message-ID: 2014-08-14 16:45 GMT+01:00 Nem W Schlecht : > Hello all, > I'm using FreeTDS with Perl and I'm trying to insert large chunks of > text into a table with an NTEXT field. My script runs and produces no > errors, but I'm only getting 8000 chars when I call > DATALENGTH(ntextfieldname) on the SQL side. I found a discussion on this > back from 2004 in the FreeTDS list where it said this was a limitation of > the protocol. > > Is this still a limit? What is the accepted way of getting around this > limitation and inserting large-sized values into NTEXT fields? > > The protocol limitation apply to nvarchar, not to ntext. Could be however that Perl say to FreeTDS to send data using nvarchar, in this case you hit the limit. You should use TDSDUMP to discover which type is Perl using. > My test code: > #!/usr/bin/perl > > #CREATE TABLE testinsert ( > # querytext NTEXT > #); > > use DBI; > > my @srvopts; > push(@srvopts, "server=MyServer"); > push(@srvopts, "database=MyDatabase"); > my $srv_opts_joined=join(';', @srvopts); > > my $dbh = DBI->connect("dbi:Sybase:$srv_opts_joined", 'user', 'secret'); > > my $sth = $dbh->prepare(" > INSERT INTO testinsert > (querytext) > VALUES (?) > "); > > my @words; > open(WORDS, "/usr/share/dict/words"); > while () { > push(@words, $_); > } > > my $big = join('', @words); > print "L: ", length($big), "\n"; > $sth->execute($big); > > $sth->finish(); > $dbh->disconnect(); > > # > # SELECT DATALENGTH(querytext) FROM testinsert; > # > > > -- > Nem W Schlecht > Frediano From nem at emptec.com Thu Aug 14 14:13:26 2014 From: nem at emptec.com (Nem W Schlecht) Date: Thu, 14 Aug 2014 13:13:26 -0500 Subject: [freetds] ntext 8000 char limit - still there? In-Reply-To: <53ECDAC7.2070408@thesyrings.us> References: <53ECDAC7.2070408@thesyrings.us> Message-ID: Thanks for the replies, Randy and Frediano! Yes, I did read that document and attempted setting TEXTSIZE to various values in my freetds.conf file to no avail - I keep getting just 8000 chars (of course, wide chars since its NTEXT). Frediano, I'll take a look at the DBD::Sybase code and see if that's the case (and try TDSDUMP as well). Thanks for the pointers. On Thu, Aug 14, 2014 at 10:50 AM, Randy Syring wrote: > Have you seen this: > > http://www.freetds.org/userguide/troubleshooting.htm#KNOWNISSUES > > There is some info there about lengths for both varchar and text. > > *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 08/14/2014 11:45 AM, Nem W Schlecht wrote: > > Hello all, > I'm using FreeTDS with Perl and I'm trying to insert large chunks of > text into a table with an NTEXT field. My script runs and produces no > errors, but I'm only getting 8000 chars when I call > DATALENGTH(ntextfieldname) on the SQL side. I found a discussion on this > back from 2004 in the FreeTDS list where it said this was a limitation of > the protocol. > > Is this still a limit? What is the accepted way of getting around this > limitation and inserting large-sized values into NTEXT fields? > > > My test code: > #!/usr/bin/perl > > #CREATE TABLE testinsert ( > # querytext NTEXT > #); > > use DBI; > > my @srvopts; > push(@srvopts, "server=MyServer"); > push(@srvopts, "database=MyDatabase"); > my $srv_opts_joined=join(';', @srvopts); > > my $dbh = DBI->connect("dbi:Sybase:$srv_opts_joined", 'user', 'secret'); > > my $sth = $dbh->prepare(" > INSERT INTO testinsert > (querytext) > VALUES (?) > "); > > my @words; > open(WORDS, "/usr/share/dict/words"); > while () { > push(@words, $_); > } > > my $big = join('', @words); > print "L: ", length($big), "\n"; > $sth->execute($big); > > $sth->finish(); > $dbh->disconnect(); > > # > # SELECT DATALENGTH(querytext) FROM testinsert; > # > > > > > -- Nem W Schlecht nem at emptec.com Empyreal Technologies http://www.emptec.com/ "Perl did the magic. I just waved the wand." From npuleio at gmail.com Sun Aug 17 16:06:49 2014 From: npuleio at gmail.com (Nunzio Luigi Puleio) Date: Sun, 17 Aug 2014 22:06:49 +0200 Subject: [freetds] latest FreeTDS on Centos 6.4 and latest SQL Server DB Message-ID: Hello everyone! I have CentOS 6.4 64bit webserver and a SQL Server 2008 DB. I communicate with SQL Server with unixODBC but looks like it's not really performant. So I tried to set in odbc.ini TDS_Version = 9.0 and it started to be a bit more performant. BUT since doing tsql -C I see TDS Version as 4.2 so I guess it isn't really performant so I am here asking you if to be more performant shall I have to do makefile with latest freetds sources with patrameter --with-tdsver= *VER *settled as 7.2 ? Thanks in advance. Cheers, Luigi From freddy77 at gmail.com Mon Aug 18 03:39:28 2014 From: freddy77 at gmail.com (Frediano Ziglio) Date: Mon, 18 Aug 2014 09:39:28 +0200 Subject: [freetds] latest FreeTDS on Centos 6.4 and latest SQL Server DB In-Reply-To: References: Message-ID: 2014-08-17 22:06 GMT+02:00 Nunzio Luigi Puleio : > Hello everyone! > > I have CentOS 6.4 64bit webserver and a SQL Server 2008 DB. > I communicate with SQL Server with unixODBC but looks like it's not really > performant. > So I tried to set in odbc.ini TDS_Version = 9.0 and it started to be a bit > more performant. > 9.0 ?? See http://www.freetds.org/userguide/choosingtdsprotocol.htm, you are using really old documentation. Performant doing what? Do you have many connection? Usually is the problem of web servers. Many web servers have support for connection caching. See unixODBC documentation too. > BUT since doing tsql -C I see TDS Version as 4.2 so I guess it isn't really > performant so I am here asking you if to be more performant shall I have to > do makefile with latest freetds sources with patrameter --with-tdsver= > *VER *settled as 7.2 ? > > There are many way to override default protocol version. For ODBC you can use connection string, if you are using a DSN configuration set the right attribute. > Thanks in advance. > Cheers, > Luigi > Frediano From npuleio at gmail.com Mon Aug 18 06:09:37 2014 From: npuleio at gmail.com (Nunzio Luigi Puleio) Date: Mon, 18 Aug 2014 12:09:37 +0200 Subject: [freetds] latest FreeTDS on Centos 6.4 and latest SQL Server DB In-Reply-To: References: Message-ID: Hello Frediano, thanks for your answer. Well, first I have Centos 6.4 Final x86_64, Freetds x86_64 installed version 0.91-2.el6, unixODBC 2.2.14-12.el6_3, php 5.3.3 and settled for my purpose: in freetds.conf [global] tds version = 9.0 [MSSQLDBGateway] host = X.X.X.X port = 1433 tds version = 9.0 and in odbc.ini [MSSQLDBGateway] Driver = FreeTDS #Server = X.X.X.X Servername = MSSQLDBGateway Port = 1433 Database = xxxx TDS_Version = 9.0 and in odbcinst.ini this: [FreeTDS] Description = ODBC for SQL Server Driver = /usr/lib64/libtdsodbc.so.0 Setup = /usr/lib64/libtdsS.so.0 UsageCount = 1 FileUsage = 1 when I settled tds version 7.2 or 8.0, performance with SQL Server 2008 communication was poor then I tried to set 9.0 as it said here: TDS 7.2 Microsoft, *was* 9.0 Introduced for SQL Server 2005. Includes support for varchar(max), varbinary(max), xml datatypes and MARS. then it improved a bit. Maybe I missed something? Thanks Cheers Luigi On Mon, Aug 18, 2014 at 9:39 AM, Frediano Ziglio wrote: > 2014-08-17 22:06 GMT+02:00 Nunzio Luigi Puleio : > > > Hello everyone! > > > > I have CentOS 6.4 64bit webserver and a SQL Server 2008 DB. > > I communicate with SQL Server with unixODBC but looks like it's not > really > > performant. > > So I tried to set in odbc.ini TDS_Version = 9.0 and it started to be a > bit > > more performant. > > > > 9.0 ?? See http://www.freetds.org/userguide/choosingtdsprotocol.htm, you > are using really old documentation. > Performant doing what? Do you have many connection? Usually is the problem > of web servers. Many web servers have support for connection caching. See > unixODBC documentation too. > > > > BUT since doing tsql -C I see TDS Version as 4.2 so I guess it isn't > really > > performant so I am here asking you if to be more performant shall I have > to > > do makefile with latest freetds sources with patrameter --with-tdsver= > > *VER *settled as 7.2 ? > > > > > There are many way to override default protocol version. For ODBC you can > use connection string, if you are using a DSN configuration set the right > attribute. > > > > Thanks in advance. > > Cheers, > > Luigi > > > > Frediano > _______________________________________________ > FreeTDS mailing list > FreeTDS at lists.ibiblio.org > http://lists.ibiblio.org/mailman/listinfo/freetds > From jklowden at freetds.org Tue Aug 19 07:53:54 2014 From: jklowden at freetds.org (James K. Lowden) Date: Tue, 19 Aug 2014 07:53:54 -0400 Subject: [freetds] latest FreeTDS on Centos 6.4 and latest SQL Server DB In-Reply-To: References: Message-ID: <20140819075354.f6c521b0.jklowden@freetds.org> On Mon, 18 Aug 2014 12:09:37 +0200 Nunzio Luigi Puleio wrote: > when I settled tds version 7.2 or 8.0, performance with SQL Server > 2008 communication was poor then I tried to set 9.0 as it said here: I suspect any performance changes you observed by changing the version of the TDS protocol were by chance. As Frediano mentioned, you can use TDSVER to control what version is used, http://www.freetds.org/userguide/envvar.htm. No need to recompile. --jkl From npuleio at gmail.com Tue Aug 19 08:42:53 2014 From: npuleio at gmail.com (Nunzio Luigi Puleio) Date: Tue, 19 Aug 2014 14:42:53 +0200 Subject: [freetds] latest FreeTDS on Centos 6.4 and latest SQL Server DB In-Reply-To: <20140819075354.f6c521b0.jklowden@freetds.org> References: <20140819075354.f6c521b0.jklowden@freetds.org> Message-ID: hello everyone! TDSVER was ok settled as 8.0. At the end we've found the problem: corrupted network card drivers which made bottlenecks during packet trasmission and receiving and now the problem disappeared with a new virtual machine with latest network card drivers compiled and installed. Thanks anyway to all! Cheers, Luigi On Tue, Aug 19, 2014 at 1:53 PM, James K. Lowden wrote: > On Mon, 18 Aug 2014 12:09:37 +0200 > Nunzio Luigi Puleio wrote: > > > when I settled tds version 7.2 or 8.0, performance with SQL Server > > 2008 communication was poor then I tried to set 9.0 as it said here: > > I suspect any performance changes you observed by changing the version > of the TDS protocol were by chance. > > As Frediano mentioned, you can use TDSVER to control what version is > used, http://www.freetds.org/userguide/envvar.htm. No need to > recompile. > > --jkl > > _______________________________________________ > FreeTDS mailing list > FreeTDS at lists.ibiblio.org > http://lists.ibiblio.org/mailman/listinfo/freetds > From venkatakrishnat1 at gmail.com Tue Aug 19 11:40:54 2014 From: venkatakrishnat1 at gmail.com (venkata krishna Thaluru) Date: Tue, 19 Aug 2014 21:10:54 +0530 Subject: [freetds] Unable to load the driver libtdsodbc.so Message-ID: Hi All, I am connecting to MSSQL from sybase using freetds .I m getting the below error. like unable to load the driver libtdsodbc.so. i have configured the odbc.ini Driver=/abc/libtdsodbc.so Servername =RemoteSQLServer freetds.conf host = 10.20.30.40 port = 1433 tds version = 8.0 Can you please share if i am missing any configuration details . Thanks Venkata krishna From freddy77 at gmail.com Tue Aug 19 13:35:34 2014 From: freddy77 at gmail.com (Frediano Ziglio) Date: Tue, 19 Aug 2014 19:35:34 +0200 Subject: [freetds] Unable to load the driver libtdsodbc.so In-Reply-To: References: Message-ID: 2014-08-19 17:40 GMT+02:00 venkata krishna Thaluru < venkatakrishnat1 at gmail.com>: > Hi All, > > I am connecting to MSSQL from sybase using freetds .I m getting the below > error. > like unable to load the driver libtdsodbc.so. > > i have configured the odbc.ini > Driver=/abc/libtdsodbc.so > Servername =RemoteSQLServer > > This is quite partial configuration. Depending on DM type specifying a file directly could be fine or not. Also you should make sure that the file type match your program and DM. They should be all 32 or 64 bit, you cannot mix. See http://www.freetds.org/userguide/odbcconnattr.htm. > freetds.conf > host = 10.20.30.40 > port = 1433 > tds version = 8.0 > > 8.0 is an old configuration 7.1 or 7.2 should be used. http://www.freetds.org/userguide/choosingtdsprotocol.htm and http://www.freetds.org/userguide/freetdsconf.htm. > > Can you please share if i am missing any configuration details . > > Thanks > Venkata krishna > Frediano From venkatakrishnat1 at gmail.com Thu Aug 21 14:46:07 2014 From: venkatakrishnat1 at gmail.com (venkata krishna Thaluru) Date: Fri, 22 Aug 2014 00:16:07 +0530 Subject: [freetds] Unable to load the driver libtdsodbc.so In-Reply-To: References: Message-ID: Thanks for reply Frediano, I could see still getting the same issue like unable to load the driver. If i am to use TDS 7.2 ,whethr i need to download once again binaries. Could you please share me link for it. Thanks Venkata Krishna On Tue, Aug 19, 2014 at 11:05 PM, Frediano Ziglio wrote: > 2014-08-19 17:40 GMT+02:00 venkata krishna Thaluru < > venkatakrishnat1 at gmail.com>: > > > Hi All, > > > > I am connecting to MSSQL from sybase using freetds .I m getting the below > > error. > > like unable to load the driver libtdsodbc.so. > > > > i have configured the odbc.ini > > Driver=/abc/libtdsodbc.so > > Servername =RemoteSQLServer > > > > > This is quite partial configuration. Depending on DM type specifying a file > directly could be fine or not. Also you should make sure that the file type > match your program and DM. They should be all 32 or 64 bit, you cannot mix. > See http://www.freetds.org/userguide/odbcconnattr.htm. > > > > freetds.conf > > host = 10.20.30.40 > > port = 1433 > > tds version = 8.0 > > > > > 8.0 is an old configuration 7.1 or 7.2 should be used. > http://www.freetds.org/userguide/choosingtdsprotocol.htm and > http://www.freetds.org/userguide/freetdsconf.htm. > > > > > > Can you please share if i am missing any configuration details . > > > > Thanks > > Venkata krishna > > > > Frediano > _______________________________________________ > FreeTDS mailing list > FreeTDS at lists.ibiblio.org > http://lists.ibiblio.org/mailman/listinfo/freetds > -- *Thanks&RegardsVenkatakrishna.T* *HCL TECHNOLOGIES Ltd.09600185503/09908611807* From freddy77 at gmail.com Mon Aug 25 14:58:43 2014 From: freddy77 at gmail.com (Frediano Ziglio) Date: Mon, 25 Aug 2014 20:58:43 +0200 Subject: [freetds] Unable to load the driver libtdsodbc.so In-Reply-To: References: Message-ID: Please check the file type with the file command. Specifically the driver and the executable. Frediano Frediano 2014-08-21 20:46 GMT+02:00 venkata krishna Thaluru < venkatakrishnat1 at gmail.com>: > Thanks for reply Frediano, > I could see still getting the same issue like unable to load the driver. > If i am to use TDS 7.2 ,whethr i need to download once again binaries. > Could you please share me link for it. > > Thanks > Venkata Krishna > > On Tue, Aug 19, 2014 at 11:05 PM, Frediano Ziglio > wrote: > > > 2014-08-19 17:40 GMT+02:00 venkata krishna Thaluru < > > venkatakrishnat1 at gmail.com>: > > > > > Hi All, > > > > > > I am connecting to MSSQL from sybase using freetds .I m getting the > below > > > error. > > > like unable to load the driver libtdsodbc.so. > > > > > > i have configured the odbc.ini > > > Driver=/abc/libtdsodbc.so > > > Servername =RemoteSQLServer > > > > > > > > This is quite partial configuration. Depending on DM type specifying a > file > > directly could be fine or not. Also you should make sure that the file > type > > match your program and DM. They should be all 32 or 64 bit, you cannot > mix. > > See http://www.freetds.org/userguide/odbcconnattr.htm. > > > > > > > freetds.conf > > > host = 10.20.30.40 > > > port = 1433 > > > tds version = 8.0 > > > > > > > > 8.0 is an old configuration 7.1 or 7.2 should be used. > > http://www.freetds.org/userguide/choosingtdsprotocol.htm and > > http://www.freetds.org/userguide/freetdsconf.htm. > > > > > > > > > > Can you please share if i am missing any configuration details . > > > > > > Thanks > > > Venkata krishna > > > > > > > Frediano > > _______________________________________________ > > FreeTDS mailing list > > FreeTDS at lists.ibiblio.org > > http://lists.ibiblio.org/mailman/listinfo/freetds > > > > > > -- > > *Thanks&RegardsVenkatakrishna.T* > > *HCL TECHNOLOGIES Ltd.09600185503/09908611807* > _______________________________________________ > FreeTDS mailing list > FreeTDS at lists.ibiblio.org > http://lists.ibiblio.org/mailman/listinfo/freetds > From frot at gmx.de Wed Aug 27 13:04:14 2014 From: frot at gmx.de (Falk Morgenroth) Date: Wed, 27 Aug 2014 19:04:14 +0200 Subject: [freetds] Additional freetds.config parameter available to start Sybase ASA personal server / DB? Message-ID: From frot at gmx.de Thu Aug 28 03:28:37 2014 From: frot at gmx.de (Falk Morgenroth) Date: Thu, 28 Aug 2014 09:28:37 +0200 Subject: [freetds] Config parameter to start DB on Sybase ASA personal server Message-ID: DB: Sybase ASA 10 (Adaptive Server Anywhere) on Windows 7 Client: Debian Wheezy, freetds, php (odbc_connect() ) ODBC: unixodbc I can connect to the database by using unixodbc / freetds driver as long it is running. (started by a ERP windows client app) I get all data I need with php - everything is working fine. Unfortunately I can not connect to the database when it was stopped by the client app. (on close of the app) The Sybase personal server (EngineName) is still running and is waiting to receive DatabaseName and DatabaseFilePath to start the DB again. - Sybase ASA is configured for AUTOSTART. - Firewall does not block - Tests with a windows machine, ODBC and Sybase driver work - its possible to start the DB by using the ODBC only I figured out that I need to submit following parameter (which are available in Windows ODBC confiuration) when connecting: EngineName=MyPersonalDBServer --> Name of the personal server (Sybase calls it personal) DatabaseName=MyDatabase --> Name of the database to start DatabaseFile=D:\mydatabasefile.db --> Windows Path where database file is located on the hosting machine Unfortunately I can not find a solution to do this by unixodb / freetds. I tried to add above parameter to odbc.ini but freetds.log shows that it does not know / use these parameter odbc.ini ---------------- [mydatabase] Description = FreeTDS Driver Driver = FreeTDS Servername = mydatabase UID = user PWD = password Port = 2638 freetds.config ---------------- [mydatabase] host = svrname port = 2638 tds version = 5.0 ASA database = mydatabase connect timeout = 10 ---> I would like to add somehow ;EngineName=MyPersonalDBServer ;DatabaseFile=D:\mydatabase.db Do you have any idea / suggestion? Thanks for having a look into. Falk From freddy77 at gmail.com Thu Aug 28 05:44:09 2014 From: freddy77 at gmail.com (Frediano Ziglio) Date: Thu, 28 Aug 2014 11:44:09 +0200 Subject: [freetds] Config parameter to start DB on Sybase ASA personal server In-Reply-To: References: Message-ID: 2014-08-28 9:28 GMT+02:00 Falk Morgenroth : > DB: Sybase ASA 10 (Adaptive Server Anywhere) on Windows 7 > Client: Debian Wheezy, freetds, php (odbc_connect() ) > ODBC: unixodbc > > I can connect to the database by using unixodbc / freetds driver as long > it is running. (started by a ERP windows client app) I get all data I need > with php - everything is working fine. > > Unfortunately I can not connect to the database when it was stopped by the > client app. (on close of the app) > > The Sybase personal server (EngineName) is still running and is waiting to > receive DatabaseName and DatabaseFilePath to start the DB again. > - Sybase ASA is configured for AUTOSTART. > - Firewall does not block > - Tests with a windows machine, ODBC and Sybase driver work - its possible > to start the DB by using the ODBC only > > I figured out that I need to submit following parameter (which are > available in Windows ODBC confiuration) when connecting: > EngineName=MyPersonalDBServer --> Name of the personal server (Sybase > calls it personal) > DatabaseName=MyDatabase --> Name of the database to start > DatabaseFile=D:\mydatabasefile.db --> Windows Path where database file > is located on the hosting machine > > Unfortunately I can not find a solution to do this by unixodb / freetds. I > tried to add above parameter to odbc.ini but freetds.log shows that it does > not know / use these parameter > > Cfr http://www.freetds.org/userguide/odbcconnattr.htm > > odbc.ini > ---------------- > > [mydatabase] > Description = FreeTDS Driver > Driver = FreeTDS > Servername = mydatabase > UID = user > PWD = password > Port = 2638 > > > freetds.config > ---------------- > [mydatabase] > host = svrname > port = 2638 > tds version = 5.0 > ASA database = mydatabase > connect timeout = 10 > > ---> I would like to add somehow > ;EngineName=MyPersonalDBServer > ;DatabaseFile=D:\mydatabase.db > > Do you have any idea / suggestion? > > A network dump from the Windows machine which start the db would be really helpful. I don't know the protocol Sybase use to communicate file/engine to the server. > Thanks for having a look into. > Falk > Regards, Frediano From sontek at gmail.com Fri Aug 29 12:50:20 2014 From: sontek at gmail.com (John Anderson) Date: Fri, 29 Aug 2014 09:50:20 -0700 Subject: [freetds] FreeTDS + SQL Server 2012 + UTF-16LE Message-ID: Hello! I'm wondering if you had any tips on how to work with characters larger than 0xFFFF? We currently have the problem where we try to insert/update a row in the database and it gets truncated at the character and creates an invalid syntax: For example this character: \U0001f44d We've tracked this down to the fact that FreeTDS is trying to convert this to UCS-2 rather than UTF16-LE, which is what SQL Server 2012 uses. For example if we say: INSERT INTO table(name) VALUES(N' Hello \U0001f44d') We get the error: Unclosed quotation mark after the character string 'Hello ' because it stops processing the rest of the query. Is there a freetds.conf or environment setting we can use to tell it to use UTF-16LE instead of UCS2 so that we can accept these larger character sets? As a temporary solution we've started sending the raw UTF-16LE bytes to FreeTDS but we prefer not having to do this. Thanks, John From freddy77 at gmail.com Fri Aug 29 12:56:19 2014 From: freddy77 at gmail.com (Frediano Ziglio) Date: Fri, 29 Aug 2014 17:56:19 +0100 Subject: [freetds] FreeTDS + SQL Server 2012 + UTF-16LE In-Reply-To: References: Message-ID: 2014-08-29 17:50 GMT+01:00 John Anderson : > Hello! I'm wondering if you had any tips on how to work with characters > larger than 0xFFFF? We currently have the problem where we try to > insert/update a row in the database and it gets truncated at the character > and creates an invalid syntax: > > For example this character: \U0001f44d > > We've tracked this down to the fact that FreeTDS is trying to convert this > to UCS-2 rather than UTF16-LE, which is what SQL Server 2012 uses. > > For example if we say: > > INSERT INTO table(name) VALUES(N' Hello \U0001f44d') > > How are you using this string? > We get the error: > > Unclosed quotation mark after the character string 'Hello ' because it > stops processing the rest of the query. > > Is there a freetds.conf or environment setting we can use to tell it to use > UTF-16LE instead of UCS2 so that we can accept these larger character sets? > > As a temporary solution we've started sending the raw UTF-16LE bytes to > FreeTDS but we prefer not having to do this. > > Thanks, > John > Frediano From sontek at gmail.com Fri Aug 29 13:07:16 2014 From: sontek at gmail.com (John Anderson) Date: Fri, 29 Aug 2014 10:07:16 -0700 Subject: [freetds] FreeTDS + SQL Server 2012 + UTF-16LE In-Reply-To: References: Message-ID: On Fri, Aug 29, 2014 at 9:56 AM, Frediano Ziglio wrote: > 2014-08-29 17:50 GMT+01:00 John Anderson : > > > Hello! I'm wondering if you had any tips on how to work with characters > > larger than 0xFFFF? We currently have the problem where we try to > > insert/update a row in the database and it gets truncated at the > character > > and creates an invalid syntax: > > > > For example this character: \U0001f44d > > > > We've tracked this down to the fact that FreeTDS is trying to convert > this > > to UCS-2 rather than UTF16-LE, which is what SQL Server 2012 uses. > > > > For example if we say: > > > > INSERT INTO table(name) VALUES(N' Hello \U0001f44d') > > > > > How are you using this string? > > Sorry, this is the python representation of the string which is a "Thumbs Up", It's UTF-8 hex representation is 0xf09f918d and what needs to be stored in the database is UTF-16LE hex 0x3dd84ddc. This is the character: http://www.fileformat.info/info/unicode/char/1F44D/index.htm But it is any character above 0xFFFF will cause the issue. So the actually query ends up looking like N'Hello ' > > > We get the error: > > > > Unclosed quotation mark after the character string 'Hello ' because it > > stops processing the rest of the query. > > > > Is there a freetds.conf or environment setting we can use to tell it to > use > > UTF-16LE instead of UCS2 so that we can accept these larger character > sets? > > > > As a temporary solution we've started sending the raw UTF-16LE bytes to > > FreeTDS but we prefer not having to do this. > > > > Thanks, > > John > > > > Frediano > _______________________________________________ > FreeTDS mailing list > FreeTDS at lists.ibiblio.org > http://lists.ibiblio.org/mailman/listinfo/freetds > From msabramo at gmail.com Sat Aug 30 17:16:37 2014 From: msabramo at gmail.com (Marc Abramowitz) Date: Sat, 30 Aug 2014 11:16:37 -1000 Subject: [freetds] FreeTDS + SQL Server 2012 + UTF-16LE In-Reply-To: References: Message-ID: <636339A3-D5FD-449E-BC57-8C87112A6B67@gmail.com> Interesting. John, I wonder if you can write a little C program that illustrates the bug? I think that the FreeTDS authors are most comfortable in C, so this will probably illustrate the problem best for them and show beyond a shadow of a doubt that there's nothing happening in pymssql. -Marc http://marc-abramowitz.com Sent from my iPhone 4S > On Aug 29, 2014, at 7:07 AM, John Anderson wrote: > >> On Fri, Aug 29, 2014 at 9:56 AM, Frediano Ziglio wrote: >> >> 2014-08-29 17:50 GMT+01:00 John Anderson : >> >>> Hello! I'm wondering if you had any tips on how to work with characters >>> larger than 0xFFFF? We currently have the problem where we try to >>> insert/update a row in the database and it gets truncated at the >> character >>> and creates an invalid syntax: >>> >>> For example this character: \U0001f44d >>> >>> We've tracked this down to the fact that FreeTDS is trying to convert >> this >>> to UCS-2 rather than UTF16-LE, which is what SQL Server 2012 uses. >>> >>> For example if we say: >>> >>> INSERT INTO table(name) VALUES(N' Hello \U0001f44d') >> How are you using this string? > Sorry, this is the python representation of the string which is a "Thumbs > Up", It's UTF-8 hex representation is 0xf09f918d and what needs to be > stored in the database is UTF-16LE hex 0x3dd84ddc. > > This is the character: > > http://www.fileformat.info/info/unicode/char/1F44D/index.htm > > But it is any character above 0xFFFF will cause the issue. > > So the actually query ends up looking like N'Hello ' > > > >> >>> We get the error: >>> >>> Unclosed quotation mark after the character string 'Hello ' because it >>> stops processing the rest of the query. >>> >>> Is there a freetds.conf or environment setting we can use to tell it to >> use >>> UTF-16LE instead of UCS2 so that we can accept these larger character >> sets? >>> >>> As a temporary solution we've started sending the raw UTF-16LE bytes to >>> FreeTDS but we prefer not having to do this. >>> >>> Thanks, >>> John >> >> 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 vasilyev at ncbi.nlm.nih.gov Thu Sep 4 14:28:51 2014 From: vasilyev at ncbi.nlm.nih.gov (Constantin Vasilyev) Date: Thu, 4 Sep 2014 14:28:51 -0400 Subject: [freetds] freebcp - problems with blobs >8K In-Reply-To: References: <20140516174204.GG3089@ncbi.nlm.nih.gov> Message-ID: <5408AF63.8020600@ncbi.nlm.nih.gov> I'm trying this again with freshly compiled nightly snapshot of FreeTDS and still getting errors: > src/apps/freebcp foo.dbo.blobs out /tmp/blobs.bcp -c -S MSSQL0 -U *** -P *** Starting copy... *** glibc detected *** /tmp/freetds-dev.0.92.377/src/apps/.libs/lt-freebcp: double free or corruption (!prev): 0x000000000196a5c0 *** Segmentation fault Am I doing something wrong? Constantin Frediano Ziglio wrote on 5/19/2014 6:32 PM: > 2014-05-16 18:42 GMT+01:00 Constantin Vasilyev : >> Hi FreeTDS team, >> >> >> I ran into a problem trying to freebcp some larger blobs in and out of MS SQL 2008 server. >> The host table may look like: >> >> create table blobs (id int not null, data image) >> >> >> >> Smaller blobs load in and out just fine: >> >>> cat /tmp/blobs.bcp >> 1 0123456780 >>> freebcp foo.dbo.blobs in /tmp/blobs.bcp -S MSSQL0 -c -U **** -P **** >> >> Starting copy... >> 1 rows copied. >>> >> >> but once the blob gets larger than 8K the command fails with errors like: >> >> >> Starting copy... >> *** glibc detected *** freebcp: free(): corrupted unsorted chunks: 0x0000000002241a90 *** >> *** glibc detected *** freebcp: malloc(): memory corruption: 0x0000000002243d10 *** >> >> I tried 0.91 stable and 0.92.377 with the same result. >> >> Any clue? >> >> >> >> Constantin >> > > > Fixed in both 0.91 and master. > > Frediano > _______________________________________________ > FreeTDS mailing list > FreeTDS at lists.ibiblio.org > http://lists.ibiblio.org/mailman/listinfo/freetds > > From Alinga.Yeung at nrc-cnrc.gc.ca Wed Sep 10 13:16:29 2014 From: Alinga.Yeung at nrc-cnrc.gc.ca (Yeung, Alinga) Date: Wed, 10 Sep 2014 10:16:29 -0700 Subject: [freetds] Request to map Sybase status code '3604' to SQLSTATE '01000' Message-ID: <4E52262B71749242AFB45D617BA3A8A0C09E853818@NRCWSTHCM1.NRC.CA> Hi, We use Sybase. We are porting our software to use Freetds. We come across a status code mapping from Sybase to Freetds that results in a behavioural discrepancy in our software. In src/tds/mem.c, the Sybase status code '3604' is mapped to SQLSTATUS '23000'. This is causing our software to fail. Sybase status code '3604' does not require any action to be taken. Our software treats the status code as informational/warning and does not take any action. SQLSTATE '23000' indicates an error instead. Locally we have changed mem.c to map the Sybase status code '3604' to '01000' which is a general warning, and our software works fine. We would like to request that Sybase status code '3604' be mapped to an informational SQLSTATUS, e.g. '01000'. Thank you. Alinga From venkatakrishnat1 at gmail.com Wed Sep 10 14:12:30 2014 From: venkatakrishnat1 at gmail.com (venkata krishna Thaluru) Date: Wed, 10 Sep 2014 23:42:30 +0530 Subject: [freetds] share me 64 bit latest code and TDS version Message-ID: Hi All, Could you please share me the exact link for downloading the latest source code for 64 bit and share steps also. Thanks in advance . Thanks Venkata Krishna From andrew at bluehousegroup.com Sun Sep 14 21:44:48 2014 From: andrew at bluehousegroup.com (Andrew Rousseau) Date: Sun, 14 Sep 2014 21:44:48 -0400 Subject: [freetds] MAMP, FreeTDS, ODBC, and ssh tunnel port forwarding almost working... Message-ID: I am attempting to connect with php to a remote mssql server. Since the mssql server is behind a firewall, I am using ssh tunnel with port forwarding to access it from my Macbook. $ ssh -N -L 1433::1433 username at www.example.com The tunnel works fine as I am able to use Navicat to connect to the mssql server and I am able to telnet to it. I think I have freetds and odbc installed correctly and running under MAMP locally. It is only php that is unable to connect to the server. Which leads me to believe that there is some small piece of my configuration that is causing it to fail. I also am thinking that the tunnel and port forwarding may be an issue for freetds. >From php I am attempting to connect the same way I am successfully connecting on my linux production server: $db = new PDO('odbc:Driver=FreeTDS; Server=127.0.0.1; Port=1433; Database=db_name; UID=user; PWD=password;'); Here is the output of a tdsdump: $ TDSDUMP=/tmp/freetds.log TDSVER=7.1 tsql -H 127.0.0.1 -p 1433 locale is "en_US.UTF-8" locale charset is "UTF-8" using default charset "UTF-8" Error 20009 (severity 9): Unable to connect: Adaptive Server is unavailable or does not exist OS error 61, "Connection refused" There was a problem connecting to the server $ tail -f /tmp/freetds.log log.c:196:Starting log file for FreeTDS 0.91 on 2014-09-14 21:36:55 with debug flags 0x4fff. iconv.c:330:tds_iconv_open(0x7fb50bc04250, UTF-8) iconv.c:187:local name for ISO-8859-1 is ISO-8859-1 iconv.c:187:local name for UTF-8 is UTF-8 iconv.c:187:local name for UCS-2LE is UCS-2LE iconv.c:187:local name for UCS-2BE is UCS-2BE iconv.c:349:setting up conversions for client charset "UTF-8" iconv.c:351:preparing iconv for "UTF-8" <-> "UCS-2LE" conversion iconv.c:391:preparing iconv for "ISO-8859-1" <-> "UCS-2LE" conversion iconv.c:394:tds_iconv_open: done net.c:205:Connecting to 127.0.0.1 port 1433 (TDS version 7.1) net.c:270:tds_open_socket: connect(2) returned "Operation now in progress" net.c:306:getsockopt(2) reported: Connection refused net.c:316:tds_open_socket() failed util.c:331:tdserror(0x7fb50bc04150, 0x7fb50bc04250, 20009, 61) util.c:361:tdserror: client library returned TDS_INT_CANCEL(2) util.c:384:tdserror: returning TDS_INT_CANCEL(2) mem.c:615:tds_free_all_results() Any help would be greatly appreciated! From randy at thesyrings.us Mon Sep 15 10:27:10 2014 From: randy at thesyrings.us (Randy Syring) Date: Mon, 15 Sep 2014 10:27:10 -0400 Subject: [freetds] MAMP, FreeTDS, ODBC, and ssh tunnel port forwarding almost working... In-Reply-To: References: Message-ID: <5416F73E.2030105@thesyrings.us> Andrew, This isn't really a FreeTDS issue. The error you posted shows the problem, the client can't connect to the server, probably due to the network hoops you are having to jump through. You will likely get more timely help from something like stackoverflow.com or serverfault.com. P.S. I find it surprising that you would create an SSH tunnel directly to the MSSQL server IP given that the server must be running windows. Maybe I'm naive, I just didn't realize you could do that. *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 09/14/2014 09:44 PM, Andrew Rousseau wrote: > I am attempting to connect with php to a remote mssql server. Since the > mssql server is behind a firewall, I am using ssh tunnel with port > forwarding to access it from my Macbook. > > $ ssh -N -L 1433::1433 username at www.example.com > > The tunnel works fine as I am able to use Navicat to connect to the mssql > server and I am able to telnet to it. I think I have freetds and odbc > installed correctly and running under MAMP locally. It is only php that is > unable to connect to the server. Which leads me to believe that there is > some small piece of my configuration that is causing it to fail. I also am > thinking that the tunnel and port forwarding may be an issue for freetds. > > >From php I am attempting to connect the same way I am successfully > connecting on my linux production server: > > $db = new PDO('odbc:Driver=FreeTDS; Server=127.0.0.1; Port=1433; > Database=db_name; UID=user; PWD=password;'); > > Here is the output of a tdsdump: > > $ TDSDUMP=/tmp/freetds.log TDSVER=7.1 tsql -H 127.0.0.1 -p 1433 > locale is "en_US.UTF-8" > locale charset is "UTF-8" > using default charset "UTF-8" > Error 20009 (severity 9): > Unable to connect: Adaptive Server is unavailable or does not exist > OS error 61, "Connection refused" > There was a problem connecting to the server > > $ tail -f /tmp/freetds.log > log.c:196:Starting log file for FreeTDS 0.91 > on 2014-09-14 21:36:55 with debug flags 0x4fff. > iconv.c:330:tds_iconv_open(0x7fb50bc04250, UTF-8) > iconv.c:187:local name for ISO-8859-1 is ISO-8859-1 > iconv.c:187:local name for UTF-8 is UTF-8 > iconv.c:187:local name for UCS-2LE is UCS-2LE > iconv.c:187:local name for UCS-2BE is UCS-2BE > iconv.c:349:setting up conversions for client charset "UTF-8" > iconv.c:351:preparing iconv for "UTF-8" <-> "UCS-2LE" conversion > iconv.c:391:preparing iconv for "ISO-8859-1" <-> "UCS-2LE" conversion > iconv.c:394:tds_iconv_open: done > net.c:205:Connecting to 127.0.0.1 port 1433 (TDS version 7.1) > net.c:270:tds_open_socket: connect(2) returned "Operation now in progress" > net.c:306:getsockopt(2) reported: Connection refused > net.c:316:tds_open_socket() failed > util.c:331:tdserror(0x7fb50bc04150, 0x7fb50bc04250, 20009, 61) > util.c:361:tdserror: client library returned TDS_INT_CANCEL(2) > util.c:384:tdserror: returning TDS_INT_CANCEL(2) > mem.c:615:tds_free_all_results() > > > Any help would be greatly appreciated! > _______________________________________________ > FreeTDS mailing list > FreeTDS at lists.ibiblio.org > http://lists.ibiblio.org/mailman/listinfo/freetds > From Raila.Wayne at mgh.harvard.edu Tue Sep 16 10:31:17 2014 From: Raila.Wayne at mgh.harvard.edu (Raila, Wayne F.) Date: Tue, 16 Sep 2014 14:31:17 +0000 Subject: [freetds] kerberos credentials not detected by FreeTDS Message-ID: <9F2CB01D8C30DD4E903CAFDFBFD71EC233BD0763@PHSX10MB11.partners.org> I am having trouble getting FreeTDS to pick up my kerberos credentials when connecting to MS SQL Server. Client is a VirtualBox running CentOS. I have joined my virtual machine to the Windows domain, and I have logged in to the virtual machine with a domain account. I am able to connect to the sql server using my windows credentials, provided I specify username and password. What I am not able to do is have FreeTDS detect my current kerberos credentials and use those automatically. I am also not able to get FreeTDS to use a kerberos context that was loaded from a keytab file. I am able to connect using tsql as long as I supply the username. Using this command, I am prompted for my password, after which the connection succeeds. tsql -S ftdsdsn -U 'MYDOMAIN\myusername' Password: locale is "en_US.UTF-8" locale charset is "UTF-8" using default charset "UTF-8" 1> I would like to connect using just the dsn name, and have FreeTDS detect the existing kerberos credentials. When I try this I get Error 20002 (severity 9) Adaptive Server connection failed. tsql -S ftdsdsn 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 I can verify credentials using klist. klist Ticket cache: FILE:/tmp/krb5cc_16777216_A8R0lC Default principal: myusername at MYDOMAIN.ORG Valid starting Expires Service principal 09/12/14 15:51:59 09/13/14 01:51:58 krbtgt/MYDOMAIN.ORG at MYDOMAIN.ORG renew until 09/19/14 15:51:59 I have also tried using kinit to load a user context from a keytab file. kinit succeeds, and klist shows the default principal, but tsql fails in same way. Ultimately I will be using kinit and a keytab file to provide credentials in pyodbc, but I presume I should get tsql working before I delve into pyodbc. Because I am able to login and execute queries, I believe the configuration of FreeTDS and unixODBC is correct as far as parameters for the SQL Server are concerned. The problem appears to be that tsql is not finding or sending the credentials to sql server. I've really hammered on this a lot. I could use some help. Wayne Raila MGH Lab of Computer Science Configuration info below. CentOS release 6.5 (Final) (i686) unixODBC-2.2.14-12.el6_3.i686 unixODBC-devel-2.2.14-12.el6_3.i686 freetds-0.91-2.el6.i686 krb5-libs-1.10.3-15.el6_5.1.i686 pam_krb5-2.3.11-9.el6.i686 krb5-devel-1.10.3-15.el6_5.1.i686 krb5-workstation-1.10.3-15.el6_5.1.i686 samba-common-3.6.9-169.el6_5.i686 samba-client-3.6.9-169.el6_5.i686 samba-winbind-clients-3.6.9-169.el6_5.i686 samba-3.6.9-169.el6_5.i686 samba-winbind-3.6.9-169.el6_5.i686 tsql -C Compile-time settings (established with the "configure" script) 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 /etc/odbcinst.ini [ODBC] Trace = Yes TraceFile = /tmp/odbc.log [FreeTDS] Description = ODBC for SQL Server Driver = /usr/lib/libtdsodbc.so.0 Setup = /usr/lib/libtdsS.so FileUsage = 1 TDS Version = 7.1 /etc/odbc.ini [odbcdsn] Driver = FreeTDS Servername = ftdsdsn TDS_Version = 7.1 Trusted_Connection = Yes ~/.freetds.conf [global] tds version = 8.0 dump file = /tmp/freetds.log text size = 64512 [ftdsdsn] host = mysqlserver.mydomain.org port = 1433 tds version = 7.1 a portion of tdsdumpconfig config.c:301:Success: [ftdsdsn] defined in /home/MYDOMAIN/myusername/.freetds.conf. config.c:224:Final connection parameters: config.c:225: server_name = ftdsdsn config.c:226: server_host_name = mysqlserver.mydomain.org config.c:227: ip_addr = xxx.xxx.xxx.x config.c:228: instance_name = config.c:229: port = 1433 config.c:230: major_version = 7 config.c:231: minor_version = 1 config.c:232: block_size = 0 config.c:233: language = us_english config.c:234: server_charset = iso_1 config.c:235: connect_timeout = 0 config.c:236: client_host_name = xxxx.xxx.xxx.xxx config.c:237: client_charset = UTF-8 config.c:238: app_name = TSQL config.c:239: user_name = config.c:242: library = TDS-Library config.c:243: bulk_copy = 0 config.c:244: suppress_language = 0 config.c:245: encrypt level = 0 config.c:246: query_timeout = 0 config.c:249: database = config.c:250: dump_file = /tmp/freetds.log config.c:251: debug_flags = 0 config.c:252: text_size = 64512 config.c:253: broken_dates = 0 config.c:254: emul_little_endian = 0 config.c:255: server_realm_name = Microsoft SQL Server 2005 - 9.00.5000.00 (X64) Dec 10 2010 10:38:40 Copyright (c) 1988-2005 Microsoft Corporation Enterprise Edition (64-bit) on Windows NT 5.2 (Build 3790: Service Pack 2) The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail. From andrew at bluehousegroup.com Tue Sep 16 15:07:40 2014 From: andrew at bluehousegroup.com (Andrew Rousseau) Date: Tue, 16 Sep 2014 15:07:40 -0400 Subject: [freetds] ODBC, MSSQL, FreeTDS inner join not returning data from second table Message-ID: I have FreeTDS installed on an Ubuntu 14.04 server. I am connecting to the MSSQL database as follows: $db = new PDO('odbc:Driver=FreeTDS; Server=; Port=1433; Database=db_name; UID=user; PWD=password;'); I am running the following query: SELECT c.*, ct.* FROM Committee AS c INNER JOIN CommitteeType as ct on c.CommitteeTypeID=ct.CommitteeTypeID WHERE CommitteeID=$committee_id Then I am running: $statement = $db->prepare($query); $statement->execute(); $result = $statement->fetchAll(PDO::FETCH_NAMED); The resulting array is very much what would be expected except that the values from the CommitteeType table are all empty. When I run the exact same query in Navicat on the database I get values for everything from the second table. Is there something buggy about this driver? I have tried many variations on the query syntax without any difference in output. It appears that I can never get values from an inner joined table regardless of which tables I am querying. Anyone see anything I am missing or have experienced anything similar? From andrew at bluehousegroup.com Tue Sep 16 22:31:26 2014 From: andrew at bluehousegroup.com (Andrew Rousseau) Date: Tue, 16 Sep 2014 22:31:26 -0400 Subject: [freetds] ODBC, MSSQL, FreeTDS inner join not returning data from second table In-Reply-To: References: Message-ID: So it turns out there are issues with odbc. I am now successfully using dblib instead. Here is the full recipe for anyone that wants to know what I did to get this fully working on Ubuntu 14.04: These were the original directions I followed 1. Install the packages freetds-bin, freetds-common, tdsodbc, odbcinst, php5-odbc and unixodbc. This provides the libraries you need. 2. Copy the contents of /usr/share/doc/freetds-common/examples/odbcinst.ini into /etc/odbcinst.ini. This registers the FreeTDS driver with the ODBC layer. 3. Restart your webserver to load the ODBC module into PHP. Then connected with: Error message:

$exception."); } echo '

Successfully connected!

'; $query = 'SELECT * FROM table_name'; $statement = $db->prepare($query); $statement->execute(); $result = $statement->fetchAll(PDO::FETCH_ASSOC); ?> To correct the issue I was having with inner joins on returning data from secondary tables I installed: php5-sybase (ie sudo apt-get install php5-sybase) Then connected as such: Error message:

$exception."); } echo '

Successfully connected!

'; $query = 'SELECT * FROM table_name'; $statement = $db->prepare($query); $statement->execute(); $result = $statement->fetchAll(PDO::FETCH_ASSOC); ?> Andrew Rousseau Technical Director bluehouse*group*.com 65 Millet Street, Suite 101 Richmond, VT 05477 Phone: 802.434.7488 Fax: 802.434.7490 On Tue, Sep 16, 2014 at 3:07 PM, Andrew Rousseau wrote: > I have FreeTDS installed on an Ubuntu 14.04 server. I am connecting to the > MSSQL database as follows: > > $db = new PDO('odbc:Driver=FreeTDS; Server=; Port=1433; > Database=db_name; UID=user; PWD=password;'); > > I am running the following query: > > SELECT c.*, ct.* > FROM Committee AS c > INNER JOIN CommitteeType as ct on c.CommitteeTypeID=ct.CommitteeTypeID > WHERE CommitteeID=$committee_id > > Then I am running: > > $statement = $db->prepare($query); > $statement->execute(); > $result = $statement->fetchAll(PDO::FETCH_NAMED); > > The resulting array is very much what would be expected except that the > values from the CommitteeType table are all empty. When I run the exact > same query in Navicat on the database I get values for everything from the > second table. > > Is there something buggy about this driver? > > I have tried many variations on the query syntax without any difference in > output. It appears that I can never get values from an inner joined table > regardless of which tables I am querying. > > Anyone see anything I am missing or have experienced anything similar? > From freddy77 at gmail.com Fri Sep 19 04:26:59 2014 From: freddy77 at gmail.com (Frediano Ziglio) Date: Fri, 19 Sep 2014 09:26:59 +0100 Subject: [freetds] ODBC, MSSQL, FreeTDS inner join not returning data from second table In-Reply-To: References: Message-ID: There must be something strange in the interaction between PHP and ODBC. Our ODBC surely can retrieve data from multiple tables. Which version of PHP and FreeTDS did you use? I think everything from Ubuntu 14.04. Can you send a TDSDUMP ? Frediano 2014-09-17 3:31 GMT+01:00 Andrew Rousseau : > So it turns out there are issues with odbc. I am now successfully using > dblib instead. > > Here is the full recipe for anyone that wants to know what I did to get > this fully working on Ubuntu 14.04: > > These were the original directions I followed > > 1. Install the packages freetds-bin, freetds-common, tdsodbc, odbcinst, > php5-odbc and unixodbc. This provides the libraries you need. > 2. Copy the contents of /usr/share/doc/freetds-common/examples/odbcinst.ini > into /etc/odbcinst.ini. This registers the FreeTDS driver with the ODBC > layer. > 3. Restart your webserver to load the ODBC module into PHP. > > Then connected with: > > try > { > $db = new PDO('odbc:Driver=FreeTDS; Server=hostname_or_ip; Port=port; > Database=database_name; UID=username; PWD=password;'); > } > catch(PDOException $exception) > { > die("Unable to open database.
Error message:

/>$exception."); > } > echo '

Successfully connected!

'; > $query = 'SELECT * FROM table_name'; > $statement = $db->prepare($query); > $statement->execute(); > $result = $statement->fetchAll(PDO::FETCH_ASSOC); > ?> > > To correct the issue I was having with inner joins on returning data from > secondary tables I installed: > > php5-sybase (ie sudo apt-get install php5-sybase) > > Then connected as such: > > try { > $hostname = "myhost"; > $port = 10060; > $dbname = "tempdb"; > $username = "dbuser"; > $pw = "password"; > $db = new PDO > ("dblib:host=$hostname:$port;dbname=$dbname","$username","$pw"); > } > catch(PDOException $exception) > { > die("Unable to open database.
Error message:

/>$exception."); > } > echo '

Successfully connected!

'; > $query = 'SELECT * FROM table_name'; > $statement = $db->prepare($query); > $statement->execute(); > $result = $statement->fetchAll(PDO::FETCH_ASSOC); > ?> > > Andrew Rousseau > Technical Director > > bluehouse*group*.com > 65 Millet Street, Suite 101 > Richmond, VT 05477 > Phone: 802.434.7488 > Fax: 802.434.7490 > > On Tue, Sep 16, 2014 at 3:07 PM, Andrew Rousseau < > andrew at bluehousegroup.com> > wrote: > > > I have FreeTDS installed on an Ubuntu 14.04 server. I am connecting to > the > > MSSQL database as follows: > > > > $db = new PDO('odbc:Driver=FreeTDS; Server=; Port=1433; > > Database=db_name; UID=user; PWD=password;'); > > > > I am running the following query: > > > > SELECT c.*, ct.* > > FROM Committee AS c > > INNER JOIN CommitteeType as ct on c.CommitteeTypeID=ct.CommitteeTypeID > > WHERE CommitteeID=$committee_id > > > > Then I am running: > > > > $statement = $db->prepare($query); > > $statement->execute(); > > $result = $statement->fetchAll(PDO::FETCH_NAMED); > > > > The resulting array is very much what would be expected except that the > > values from the CommitteeType table are all empty. When I run the exact > > same query in Navicat on the database I get values for everything from > the > > second table. > > > > Is there something buggy about this driver? > > > > I have tried many variations on the query syntax without any difference > in > > output. It appears that I can never get values from an inner joined table > > regardless of which tables I am querying. > > > > Anyone see anything I am missing or have experienced anything similar? > > > _______________________________________________ > FreeTDS mailing list > FreeTDS at lists.ibiblio.org > http://lists.ibiblio.org/mailman/listinfo/freetds > From venkatakrishnat1 at gmail.com Fri Sep 19 14:00:19 2014 From: venkatakrishnat1 at gmail.com (venkata krishna Thaluru) Date: Fri, 19 Sep 2014 23:30:19 +0530 Subject: [freetds] [unixODBC][FreeTDS][SQL Server]Only one between SERVER, SERVERNAME and DSN can be specified Message-ID: Hi All, I am getting below error and while connecting to mssql. [unixODBC][FreeTDS][SQL Server]Only one between SERVER, SERVERNAME and DSN can be specified I have checked the code in freeTDs ,We are checking whether we have configured one ,then we are throwing this error. Could you please let me know ,if i missed any configuration in any file. Thanks in advance Thanks Venkata Krishna From freddy77 at gmail.com Fri Sep 19 14:18:55 2014 From: freddy77 at gmail.com (Frediano Ziglio) Date: Fri, 19 Sep 2014 19:18:55 +0100 Subject: [freetds] [unixODBC][FreeTDS][SQL Server]Only one between SERVER, SERVERNAME and DSN can be specified In-Reply-To: References: Message-ID: 2014-09-19 19:00 GMT+01:00 venkata krishna Thaluru < venkatakrishnat1 at gmail.com>: > Hi All, > I am getting below error and while connecting to mssql. > > [unixODBC][FreeTDS][SQL Server]Only one between SERVER, SERVERNAME and DSN > can be specified > > I have checked the code in freeTDs ,We are checking whether we have > configured one ,then we are throwing this error. > > Could you please let me know ,if i missed any configuration in any file. > > Thanks in advance > > > Thanks > Venkata Krishna > > No missing configuration, only there are conflicting options. Frediano From freddy77 at gmail.com Sat Sep 20 08:18:45 2014 From: freddy77 at gmail.com (Frediano Ziglio) Date: Sat, 20 Sep 2014 13:18:45 +0100 Subject: [freetds] kerberos credentials not detected by FreeTDS In-Reply-To: <9F2CB01D8C30DD4E903CAFDFBFD71EC233BD0763@PHSX10MB11.partners.org> References: <9F2CB01D8C30DD4E903CAFDFBFD71EC233BD0763@PHSX10MB11.partners.org> Message-ID: 2014-09-16 15:31 GMT+01:00 Raila, Wayne F. : > I am having trouble getting FreeTDS to pick up my kerberos credentials > when connecting to MS SQL Server. Client is a VirtualBox running CentOS. I > have joined my virtual machine to the Windows domain, and I have logged in > to the virtual machine with a domain account. I am able to connect to the > sql server using my windows credentials, provided I specify username and > password. > > What I am not able to do is have FreeTDS detect my current kerberos > credentials and use those automatically. I am also not able to get FreeTDS > to use a kerberos context that was loaded from a keytab file. > > I am able to connect using tsql as long as I supply the username. Using > this command, I am prompted for my password, after which the connection > succeeds. > tsql -S ftdsdsn -U 'MYDOMAIN\myusername' > Password: > locale is "en_US.UTF-8" > locale charset is "UTF-8" > using default charset "UTF-8" > 1> > > I would like to connect using just the dsn name, and have FreeTDS detect > the existing kerberos credentials. When I try this I get Error 20002 > (severity 9) Adaptive Server connection failed. > tsql -S ftdsdsn > 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 > > I can verify credentials using klist. > klist > Ticket cache: FILE:/tmp/krb5cc_16777216_A8R0lC > Default principal: myusername at MYDOMAIN.ORG > Valid starting Expires Service principal > 09/12/14 15:51:59 09/13/14 01:51:58 krbtgt/MYDOMAIN.ORG at MYDOMAIN.ORG > renew until 09/19/14 15:51:59 > > Try to use tsql -S ftdsdsn -U '' -P '' Also try to enable TDSDUMP and TDSDUMPCONFIG and see if this helps Frediano > I have also tried using kinit to load a user context from a keytab file. > kinit succeeds, and klist shows the default principal, but tsql fails in > same way. > > Ultimately I will be using kinit and a keytab file to provide credentials > in pyodbc, but I presume I should get tsql working before I delve into > pyodbc. > > Because I am able to login and execute queries, I believe the > configuration of FreeTDS and unixODBC is correct as far as parameters for > the SQL Server are concerned. The problem appears to be that tsql is not > finding or sending the credentials to sql server. > > I've really hammered on this a lot. I could use some help. > > Wayne Raila > MGH Lab of Computer Science > > > Configuration info below. > > CentOS release 6.5 (Final) (i686) > unixODBC-2.2.14-12.el6_3.i686 > unixODBC-devel-2.2.14-12.el6_3.i686 > freetds-0.91-2.el6.i686 > krb5-libs-1.10.3-15.el6_5.1.i686 > pam_krb5-2.3.11-9.el6.i686 > krb5-devel-1.10.3-15.el6_5.1.i686 > krb5-workstation-1.10.3-15.el6_5.1.i686 > samba-common-3.6.9-169.el6_5.i686 > samba-client-3.6.9-169.el6_5.i686 > samba-winbind-clients-3.6.9-169.el6_5.i686 > samba-3.6.9-169.el6_5.i686 > samba-winbind-3.6.9-169.el6_5.i686 > > tsql -C > Compile-time settings (established with the "configure" script) > 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 > > /etc/odbcinst.ini > [ODBC] > Trace = Yes > TraceFile = /tmp/odbc.log > > [FreeTDS] > Description = ODBC for SQL Server > Driver = /usr/lib/libtdsodbc.so.0 > Setup = /usr/lib/libtdsS.so > FileUsage = 1 > TDS Version = 7.1 > > /etc/odbc.ini > [odbcdsn] > Driver = FreeTDS > Servername = ftdsdsn > TDS_Version = 7.1 > Trusted_Connection = Yes > > ~/.freetds.conf > [global] > tds version = 8.0 > dump file = /tmp/freetds.log > text size = 64512 > > [ftdsdsn] > host = mysqlserver.mydomain.org > port = 1433 > tds version = 7.1 > > a portion of tdsdumpconfig > config.c:301:Success: [ftdsdsn] defined in > /home/MYDOMAIN/myusername/.freetds.conf. > config.c:224:Final connection parameters: > config.c:225: server_name = ftdsdsn > config.c:226: server_host_name = mysqlserver.mydomain.org > config.c:227: ip_addr = xxx.xxx.xxx.x > config.c:228: instance_name = > config.c:229: port = 1433 > config.c:230: major_version = 7 > config.c:231: minor_version = 1 > config.c:232: block_size = 0 > config.c:233: language = us_english > config.c:234: server_charset = iso_1 > config.c:235: connect_timeout = 0 > config.c:236: client_host_name = xxxx.xxx.xxx.xxx > config.c:237: client_charset = UTF-8 > config.c:238: app_name = TSQL > config.c:239: user_name = > config.c:242: library = TDS-Library > config.c:243: bulk_copy = 0 > config.c:244: suppress_language = 0 > config.c:245: encrypt level = 0 > config.c:246: query_timeout = 0 > config.c:249: database = > config.c:250: dump_file = /tmp/freetds.log > config.c:251: debug_flags = 0 > config.c:252: text_size = 64512 > config.c:253: broken_dates = 0 > config.c:254: emul_little_endian = 0 > config.c:255: server_realm_name = > > Microsoft SQL Server 2005 - 9.00.5000.00 (X64) > Dec 10 2010 10:38:40 > Copyright (c) 1988-2005 Microsoft Corporation > Enterprise Edition (64-bit) on Windows NT 5.2 (Build 3790: Service > Pack 2) > > > > > The information in this e-mail is intended only for the person to whom it > is > addressed. If you believe this e-mail was sent to you in error and the > e-mail > contains patient information, please contact the Partners Compliance > HelpLine at > http://www.partners.org/complianceline . If the e-mail was sent to you in > error > but does not contain patient information, please contact the sender and > properly > dispose of the e-mail. > > From venkatakrishnat1 at gmail.com Sat Sep 20 08:23:20 2014 From: venkatakrishnat1 at gmail.com (venkata krishna Thaluru) Date: Sat, 20 Sep 2014 17:53:20 +0530 Subject: [freetds] [unixODBC][FreeTDS][SQL Server]Only one between SERVER, SERVERNAME and DSN can be specified In-Reply-To: References: Message-ID: Thanks for reply Frediano, Could you please let me know ,what are the conflicting options. Thanks in advance . Thanks Venkata Krishna On Fri, Sep 19, 2014 at 11:48 PM, Frediano Ziglio wrote: > 2014-09-19 19:00 GMT+01:00 venkata krishna Thaluru < > venkatakrishnat1 at gmail.com>: > > > Hi All, > > I am getting below error and while connecting to mssql. > > > > [unixODBC][FreeTDS][SQL Server]Only one between SERVER, SERVERNAME and > DSN > > can be specified > > > > I have checked the code in freeTDs ,We are checking whether we have > > configured one ,then we are throwing this error. > > > > Could you please let me know ,if i missed any configuration in any file. > > > > Thanks in advance > > > > > > Thanks > > Venkata Krishna > > > > > No missing configuration, only there are conflicting options. > > Frediano > _______________________________________________ > FreeTDS mailing list > FreeTDS at lists.ibiblio.org > http://lists.ibiblio.org/mailman/listinfo/freetds > -- *Thanks&RegardsVenkatakrishna.T* *HCL TECHNOLOGIES Ltd.09600185503/09908611807* From freddy77 at gmail.com Sat Sep 20 08:30:28 2014 From: freddy77 at gmail.com (Frediano Ziglio) Date: Sat, 20 Sep 2014 13:30:28 +0100 Subject: [freetds] [unixODBC][FreeTDS][SQL Server]Only one between SERVER, SERVERNAME and DSN can be specified In-Reply-To: References: Message-ID: You can have only one between SERVERNAME, SERVER and DSN. If you post your configurations files surely the configuration you are trying to use has such mistake. Frediano Frediano 2014-09-20 13:23 GMT+01:00 venkata krishna Thaluru < venkatakrishnat1 at gmail.com>: > Thanks for reply Frediano, > Could you please let me know ,what are the conflicting options. > > Thanks in advance . > > Thanks > Venkata Krishna > > On Fri, Sep 19, 2014 at 11:48 PM, Frediano Ziglio > wrote: > > > 2014-09-19 19:00 GMT+01:00 venkata krishna Thaluru < > > venkatakrishnat1 at gmail.com>: > > > > > Hi All, > > > I am getting below error and while connecting to mssql. > > > > > > [unixODBC][FreeTDS][SQL Server]Only one between SERVER, SERVERNAME and > > DSN > > > can be specified > > > > > > I have checked the code in freeTDs ,We are checking whether we have > > > configured one ,then we are throwing this error. > > > > > > Could you please let me know ,if i missed any configuration in any > file. > > > > > > Thanks in advance > > > > > > > > > Thanks > > > Venkata Krishna > > > > > > > > No missing configuration, only there are conflicting options. > > > > Frediano > > _______________________________________________ > > FreeTDS mailing list > > FreeTDS at lists.ibiblio.org > > http://lists.ibiblio.org/mailman/listinfo/freetds > > > > > > -- > > *Thanks&RegardsVenkatakrishna.T* > > *HCL TECHNOLOGIES Ltd.09600185503/09908611807* > _______________________________________________ > FreeTDS mailing list > FreeTDS at lists.ibiblio.org > http://lists.ibiblio.org/mailman/listinfo/freetds > From venkatakrishnat1 at gmail.com Sat Sep 20 10:16:18 2014 From: venkatakrishnat1 at gmail.com (venkata krishna Thaluru) Date: Sat, 20 Sep 2014 19:46:18 +0530 Subject: [freetds] [unixODBC][FreeTDS][SQL Server]Only one between SERVER, SERVERNAME and DSN can be specified In-Reply-To: References: Message-ID: Thanks for reply Frediano, I am done below steps.if i missed or done wrong please correct me . 1)I have downloaded 0.91 from freetds location. 2)copied to 64 bit dev machine OS is linux 3)i have the run following commands ./configure ,make ,make install 4)then copied following binaries. ./src/odbc/.libs/libtdsodbc.so ./src/dblib/.libs/libsybdb.so ./src/ctlib/.libs/libct.so 5)odbc.ini [DSNNAME] driver = ServerName = RemoteServer 6)freetds.conf host=IP address port =1433 tds version =8.0 Could you please let me know if i missed any thing . Thanks in advance. Thanks Venkata Krishna On Sat, Sep 20, 2014 at 6:00 PM, Frediano Ziglio wrote: > You can have only one between SERVERNAME, SERVER and DSN. > > If you post your configurations files surely the configuration you are > trying to use has such mistake. > > Frediano > > Frediano > > 2014-09-20 13:23 GMT+01:00 venkata krishna Thaluru < > venkatakrishnat1 at gmail.com>: > > > Thanks for reply Frediano, > > Could you please let me know ,what are the conflicting options. > > > > Thanks in advance . > > > > Thanks > > Venkata Krishna > > > > On Fri, Sep 19, 2014 at 11:48 PM, Frediano Ziglio > > wrote: > > > > > 2014-09-19 19:00 GMT+01:00 venkata krishna Thaluru < > > > venkatakrishnat1 at gmail.com>: > > > > > > > Hi All, > > > > I am getting below error and while connecting to mssql. > > > > > > > > [unixODBC][FreeTDS][SQL Server]Only one between SERVER, SERVERNAME > and > > > DSN > > > > can be specified > > > > > > > > I have checked the code in freeTDs ,We are checking whether we have > > > > configured one ,then we are throwing this error. > > > > > > > > Could you please let me know ,if i missed any configuration in any > > file. > > > > > > > > Thanks in advance > > > > > > > > > > > > Thanks > > > > Venkata Krishna > > > > > > > > > > > No missing configuration, only there are conflicting options. > > > > > > Frediano > > > _______________________________________________ > > > FreeTDS mailing list > > > FreeTDS at lists.ibiblio.org > > > http://lists.ibiblio.org/mailman/listinfo/freetds > > > > > > > > > > > -- > > > > *Thanks&RegardsVenkatakrishna.T* > > > > *HCL TECHNOLOGIES Ltd.09600185503/09908611807* > > _______________________________________________ > > 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 > -- *Thanks&RegardsVenkatakrishna.T* *HCL TECHNOLOGIES Ltd.09600185503/09908611807* From Raila.Wayne at mgh.harvard.edu Sun Sep 21 17:19:16 2014 From: Raila.Wayne at mgh.harvard.edu (Raila, Wayne F.) Date: Sun, 21 Sep 2014 21:19:16 +0000 Subject: [freetds] kerberos credentials not detected by FreeTDS In-Reply-To: References: <9F2CB01D8C30DD4E903CAFDFBFD71EC233BD0763@PHSX10MB11.partners.org>, Message-ID: <3577DB6D-232A-4441-93A5-F6617E4EECE9@PARTNERS.ORG> Thanks for the tip, Frediano. At the moment I am working on the theory that the problem lies not with the Linux client but with the Service Principle Name, SPN, of the SQL Server. Our SQL Servers do not have the requisite SPNs configured in Active Directory. The Kerberos logs on the Linux client indicate this is where the failure happens. Now I am waiting for the domain admins to update Active Directory. I will post a follow-up once I've confirmed this works. Wayne > On Sep 20, 2014, at 8:19 AM, Frediano Ziglio wrote: > > 2014-09-16 15:31 GMT+01:00 Raila, Wayne F. : > >> I am having trouble getting FreeTDS to pick up my kerberos credentials >> when connecting to MS SQL Server. Client is a VirtualBox running CentOS. I >> have joined my virtual machine to the Windows domain, and I have logged in >> to the virtual machine with a domain account. I am able to connect to the >> sql server using my windows credentials, provided I specify username and >> password. >> >> What I am not able to do is have FreeTDS detect my current kerberos >> credentials and use those automatically. I am also not able to get FreeTDS >> to use a kerberos context that was loaded from a keytab file. >> >> I am able to connect using tsql as long as I supply the username. Using >> this command, I am prompted for my password, after which the connection >> succeeds. >> tsql -S ftdsdsn -U 'MYDOMAIN\myusername' >> Password: >> locale is "en_US.UTF-8" >> locale charset is "UTF-8" >> using default charset "UTF-8" >> 1> >> >> I would like to connect using just the dsn name, and have FreeTDS detect >> the existing kerberos credentials. When I try this I get Error 20002 >> (severity 9) Adaptive Server connection failed. >> tsql -S ftdsdsn >> 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 >> >> I can verify credentials using klist. >> klist >> Ticket cache: FILE:/tmp/krb5cc_16777216_A8R0lC >> Default principal: myusername at MYDOMAIN.ORG >> Valid starting Expires Service principal >> 09/12/14 15:51:59 09/13/14 01:51:58 krbtgt/MYDOMAIN.ORG at MYDOMAIN.ORG >> renew until 09/19/14 15:51:59 > Try to use > > tsql -S ftdsdsn -U '' -P '' > > Also try to enable TDSDUMP and TDSDUMPCONFIG and see if this helps > > Frediano > > >> I have also tried using kinit to load a user context from a keytab file. >> kinit succeeds, and klist shows the default principal, but tsql fails in >> same way. >> >> Ultimately I will be using kinit and a keytab file to provide credentials >> in pyodbc, but I presume I should get tsql working before I delve into >> pyodbc. >> >> Because I am able to login and execute queries, I believe the >> configuration of FreeTDS and unixODBC is correct as far as parameters for >> the SQL Server are concerned. The problem appears to be that tsql is not >> finding or sending the credentials to sql server. >> >> I've really hammered on this a lot. I could use some help. >> >> Wayne Raila >> MGH Lab of Computer Science >> >> >> Configuration info below. >> >> CentOS release 6.5 (Final) (i686) >> unixODBC-2.2.14-12.el6_3.i686 >> unixODBC-devel-2.2.14-12.el6_3.i686 >> freetds-0.91-2.el6.i686 >> krb5-libs-1.10.3-15.el6_5.1.i686 >> pam_krb5-2.3.11-9.el6.i686 >> krb5-devel-1.10.3-15.el6_5.1.i686 >> krb5-workstation-1.10.3-15.el6_5.1.i686 >> samba-common-3.6.9-169.el6_5.i686 >> samba-client-3.6.9-169.el6_5.i686 >> samba-winbind-clients-3.6.9-169.el6_5.i686 >> samba-3.6.9-169.el6_5.i686 >> samba-winbind-3.6.9-169.el6_5.i686 >> >> tsql -C >> Compile-time settings (established with the "configure" script) >> 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 >> >> /etc/odbcinst.ini >> [ODBC] >> Trace = Yes >> TraceFile = /tmp/odbc.log >> >> [FreeTDS] >> Description = ODBC for SQL Server >> Driver = /usr/lib/libtdsodbc.so.0 >> Setup = /usr/lib/libtdsS.so >> FileUsage = 1 >> TDS Version = 7.1 >> >> /etc/odbc.ini >> [odbcdsn] >> Driver = FreeTDS >> Servername = ftdsdsn >> TDS_Version = 7.1 >> Trusted_Connection = Yes >> >> ~/.freetds.conf >> [global] >> tds version = 8.0 >> dump file = /tmp/freetds.log >> text size = 64512 >> >> [ftdsdsn] >> host = mysqlserver.mydomain.org >> port = 1433 >> tds version = 7.1 >> >> a portion of tdsdumpconfig >> config.c:301:Success: [ftdsdsn] defined in >> /home/MYDOMAIN/myusername/.freetds.conf. >> config.c:224:Final connection parameters: >> config.c:225: server_name = ftdsdsn >> config.c:226: server_host_name = mysqlserver.mydomain.org >> config.c:227: ip_addr = xxx.xxx.xxx.x >> config.c:228: instance_name = >> config.c:229: port = 1433 >> config.c:230: major_version = 7 >> config.c:231: minor_version = 1 >> config.c:232: block_size = 0 >> config.c:233: language = us_english >> config.c:234: server_charset = iso_1 >> config.c:235: connect_timeout = 0 >> config.c:236: client_host_name = xxxx.xxx.xxx.xxx >> config.c:237: client_charset = UTF-8 >> config.c:238: app_name = TSQL >> config.c:239: user_name = >> config.c:242: library = TDS-Library >> config.c:243: bulk_copy = 0 >> config.c:244: suppress_language = 0 >> config.c:245: encrypt level = 0 >> config.c:246: query_timeout = 0 >> config.c:249: database = >> config.c:250: dump_file = /tmp/freetds.log >> config.c:251: debug_flags = 0 >> config.c:252: text_size = 64512 >> config.c:253: broken_dates = 0 >> config.c:254: emul_little_endian = 0 >> config.c:255: server_realm_name = >> >> Microsoft SQL Server 2005 - 9.00.5000.00 (X64) >> Dec 10 2010 10:38:40 >> Copyright (c) 1988-2005 Microsoft Corporation >> Enterprise Edition (64-bit) on Windows NT 5.2 (Build 3790: Service >> Pack 2) >> >> >> >> >> The information in this e-mail is intended only for the person to whom it >> is >> addressed. If you believe this e-mail was sent to you in error and the >> e-mail >> contains patient information, please contact the Partners Compliance >> HelpLine at >> http://www.partners.org/complianceline . If the e-mail was sent to you in >> error >> but does not contain patient information, please contact the sender and >> properly >> dispose of the e-mail. > _______________________________________________ > FreeTDS mailing list > FreeTDS at lists.ibiblio.org > http://lists.ibiblio.org/mailman/listinfo/freetds From venkatakrishnat1 at gmail.com Mon Sep 22 13:07:58 2014 From: venkatakrishnat1 at gmail.com (venkata krishna Thaluru) Date: Mon, 22 Sep 2014 22:37:58 +0530 Subject: [freetds] [unixODBC][FreeTDS][SQL Server]Only one between SERVER, SERVERNAME and DSN can be specified In-Reply-To: References: Message-ID: Hi Frediano, Could you please check my configurations and update me ,i was struck on it . I m not able to proceed further. Thanks Venkata Krishna On Sat, Sep 20, 2014 at 7:46 PM, venkata krishna Thaluru < venkatakrishnat1 at gmail.com> wrote: > Thanks for reply Frediano, > I am done below steps.if i missed or done wrong please correct me . > 1)I have downloaded 0.91 from freetds location. > 2)copied to 64 bit dev machine OS is linux > 3)i have the run following commands ./configure ,make ,make install > 4)then copied following binaries. > ./src/odbc/.libs/libtdsodbc.so > ./src/dblib/.libs/libsybdb.so > ./src/ctlib/.libs/libct.so > > 5)odbc.ini > [DSNNAME] > driver = > ServerName = RemoteServer > > 6)freetds.conf > > host=IP address > port =1433 > tds version =8.0 > > Could you please let me know if i missed any thing . > Thanks in advance. > > Thanks > Venkata Krishna > > On Sat, Sep 20, 2014 at 6:00 PM, Frediano Ziglio > wrote: > >> You can have only one between SERVERNAME, SERVER and DSN. >> >> If you post your configurations files surely the configuration you are >> trying to use has such mistake. >> >> Frediano >> >> Frediano >> >> 2014-09-20 13:23 GMT+01:00 venkata krishna Thaluru < >> venkatakrishnat1 at gmail.com>: >> >> > Thanks for reply Frediano, >> > Could you please let me know ,what are the conflicting options. >> > >> > Thanks in advance . >> > >> > Thanks >> > Venkata Krishna >> > >> > On Fri, Sep 19, 2014 at 11:48 PM, Frediano Ziglio >> > wrote: >> > >> > > 2014-09-19 19:00 GMT+01:00 venkata krishna Thaluru < >> > > venkatakrishnat1 at gmail.com>: >> > > >> > > > Hi All, >> > > > I am getting below error and while connecting to mssql. >> > > > >> > > > [unixODBC][FreeTDS][SQL Server]Only one between SERVER, SERVERNAME >> and >> > > DSN >> > > > can be specified >> > > > >> > > > I have checked the code in freeTDs ,We are checking whether we have >> > > > configured one ,then we are throwing this error. >> > > > >> > > > Could you please let me know ,if i missed any configuration in any >> > file. >> > > > >> > > > Thanks in advance >> > > > >> > > > >> > > > Thanks >> > > > Venkata Krishna >> > > > >> > > > >> > > No missing configuration, only there are conflicting options. >> > > >> > > Frediano >> > > _______________________________________________ >> > > FreeTDS mailing list >> > > FreeTDS at lists.ibiblio.org >> > > http://lists.ibiblio.org/mailman/listinfo/freetds >> > > >> > >> > >> > >> > -- >> > >> > *Thanks&RegardsVenkatakrishna.T* >> > >> > *HCL TECHNOLOGIES Ltd.09600185503/09908611807* >> > _______________________________________________ >> > 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 >> > > > > -- > > *Thanks&RegardsVenkatakrishna.T* > > *HCL TECHNOLOGIES Ltd.09600185503/09908611807* > -- *Thanks&RegardsVenkatakrishna.T* *HCL TECHNOLOGIES Ltd.09600185503/09908611807* From matt.t.grimm+freetds at gmail.com Wed Sep 24 16:28:42 2014 From: matt.t.grimm+freetds at gmail.com (Matt Grimm) Date: Wed, 24 Sep 2014 14:28:42 -0600 Subject: [freetds] nvarchar(max) field in result set identified as WVARCHAR, not WLONGVARCHAR Message-ID: Hi, When I use SQLColAttributeW(... SQL_DESC_CONCISE_TYPE ...) to ask FreeTDS for the type of an nvarchar(max) column in my result set, it calls it a SQL_WVARCHAR (-9). However, when I ask it for the type of an ntext field, it calls it a SQL_WLONGVARCHAR. Since nvarchar(max) is the replacement for ntext[1], shouldn't FreeTDS return -10 as the type of nvarchar(max) too? Thanks, m. [1] http://msdn.microsoft.com/en-us/library/ms178158.aspx; http://msdn.microsoft.com/en-us/library/ms187993.aspx From freddy77 at gmail.com Thu Sep 25 18:41:48 2014 From: freddy77 at gmail.com (Frediano Ziglio) Date: Thu, 25 Sep 2014 23:41:48 +0100 Subject: [freetds] [unixODBC][FreeTDS][SQL Server]Only one between SERVER, SERVERNAME and DSN can be specified In-Reply-To: References: Message-ID: Finally I found some time to try a repro. The problem does no occurs on my machine either using master or 0.91 branch. Can I have access to one of your machine? Send details privately to me if required. Frediano Frediano 2014-09-22 18:07 GMT+01:00 venkata krishna Thaluru < venkatakrishnat1 at gmail.com>: > Hi Frediano, > Could you please check my configurations and update me ,i was struck on it > . I m not able to proceed further. > > Thanks > Venkata Krishna > > On Sat, Sep 20, 2014 at 7:46 PM, venkata krishna Thaluru < > venkatakrishnat1 at gmail.com> wrote: > > > Thanks for reply Frediano, > > I am done below steps.if i missed or done wrong please correct me . > > 1)I have downloaded 0.91 from freetds location. > > 2)copied to 64 bit dev machine OS is linux > > 3)i have the run following commands ./configure ,make ,make install > > 4)then copied following binaries. > > ./src/odbc/.libs/libtdsodbc.so > > ./src/dblib/.libs/libsybdb.so > > ./src/ctlib/.libs/libct.so > > > > 5)odbc.ini > > [DSNNAME] > > driver = > > ServerName = RemoteServer > > > > 6)freetds.conf > > > > host=IP address > > port =1433 > > tds version =8.0 > > > > Could you please let me know if i missed any thing . > > Thanks in advance. > > > > Thanks > > Venkata Krishna > > > > On Sat, Sep 20, 2014 at 6:00 PM, Frediano Ziglio > > wrote: > > > >> You can have only one between SERVERNAME, SERVER and DSN. > >> > >> If you post your configurations files surely the configuration you are > >> trying to use has such mistake. > >> > >> Frediano > >> > >> Frediano > >> > >> 2014-09-20 13:23 GMT+01:00 venkata krishna Thaluru < > >> venkatakrishnat1 at gmail.com>: > >> > >> > Thanks for reply Frediano, > >> > Could you please let me know ,what are the conflicting options. > >> > > >> > Thanks in advance . > >> > > >> > Thanks > >> > Venkata Krishna > >> > > >> > On Fri, Sep 19, 2014 at 11:48 PM, Frediano Ziglio > > >> > wrote: > >> > > >> > > 2014-09-19 19:00 GMT+01:00 venkata krishna Thaluru < > >> > > venkatakrishnat1 at gmail.com>: > >> > > > >> > > > Hi All, > >> > > > I am getting below error and while connecting to mssql. > >> > > > > >> > > > [unixODBC][FreeTDS][SQL Server]Only one between SERVER, SERVERNAME > >> and > >> > > DSN > >> > > > can be specified > >> > > > > >> > > > I have checked the code in freeTDs ,We are checking whether we > have > >> > > > configured one ,then we are throwing this error. > >> > > > > >> > > > Could you please let me know ,if i missed any configuration in any > >> > file. > >> > > > > >> > > > Thanks in advance > >> > > > > >> > > > > >> > > > Thanks > >> > > > Venkata Krishna > >> > > > > >> > > > > >> > > No missing configuration, only there are conflicting options. > >> > > > >> > > Frediano > >> > > _______________________________________________ > >> > > FreeTDS mailing list > >> > > FreeTDS at lists.ibiblio.org > >> > > http://lists.ibiblio.org/mailman/listinfo/freetds > >> > > > >> > > >> > > >> > > >> > -- > >> > > >> > *Thanks&RegardsVenkatakrishna.T* > >> > > >> > *HCL TECHNOLOGIES Ltd.09600185503/09908611807* > >> > _______________________________________________ > >> > 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 > >> > > > > > > > > -- > > > > *Thanks&RegardsVenkatakrishna.T* > > > > *HCL TECHNOLOGIES Ltd.09600185503/09908611807* > > > > > > -- > > *Thanks&RegardsVenkatakrishna.T* > > *HCL TECHNOLOGIES Ltd.09600185503/09908611807* > _______________________________________________ > FreeTDS mailing list > FreeTDS at lists.ibiblio.org > http://lists.ibiblio.org/mailman/listinfo/freetds > From venkatakrishnat1 at gmail.com Mon Sep 29 13:59:50 2014 From: venkatakrishnat1 at gmail.com (venkata krishna Thaluru) Date: Mon, 29 Sep 2014 23:29:50 +0530 Subject: [freetds] [unixODBC][FreeTDS][SQL Server]Only one between SERVER, SERVERNAME and DSN can be specified In-Reply-To: References: Message-ID: Thanks for reply Frediano, When i run the ldd command ,it is saying binary not found( libodbcinst.so.1 => not found) . ldd libtdsodbc.so linux-vdso.so.1 => (0x00007fffc7dc4000) libodbcinst.so.1 => not found librt.so.1 => /lib64/librt.so.1 (0x00007fa7427f0000) libdl.so.2 => /lib64/libdl.so.2 (0x00007fa7425ec000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fa7423cf000) libc.so.6 => /lib64/libc.so.6 (0x00007fa74203b000) /lib64/ld-linux-x86-64.so.2 (0x00007fa742c63000) Could you please tell me ,if i am missing anything .. Thanks Venkata Krishna On Fri, Sep 26, 2014 at 4:11 AM, Frediano Ziglio wrote: > Finally I found some time to try a repro. The problem does no occurs on my > machine either using master or 0.91 branch. > > Can I have access to one of your machine? > > Send details privately to me if required. > > Frediano > > Frediano > > 2014-09-22 18:07 GMT+01:00 venkata krishna Thaluru < > venkatakrishnat1 at gmail.com>: > > > Hi Frediano, > > Could you please check my configurations and update me ,i was struck on > it > > . I m not able to proceed further. > > > > Thanks > > Venkata Krishna > > > > On Sat, Sep 20, 2014 at 7:46 PM, venkata krishna Thaluru < > > venkatakrishnat1 at gmail.com> wrote: > > > > > Thanks for reply Frediano, > > > I am done below steps.if i missed or done wrong please correct me . > > > 1)I have downloaded 0.91 from freetds location. > > > 2)copied to 64 bit dev machine OS is linux > > > 3)i have the run following commands ./configure ,make ,make install > > > 4)then copied following binaries. > > > ./src/odbc/.libs/libtdsodbc.so > > > ./src/dblib/.libs/libsybdb.so > > > ./src/ctlib/.libs/libct.so > > > > > > 5)odbc.ini > > > [DSNNAME] > > > driver = > > > ServerName = RemoteServer > > > > > > 6)freetds.conf > > > > > > host=IP address > > > port =1433 > > > tds version =8.0 > > > > > > Could you please let me know if i missed any thing . > > > Thanks in advance. > > > > > > Thanks > > > Venkata Krishna > > > > > > On Sat, Sep 20, 2014 at 6:00 PM, Frediano Ziglio > > > wrote: > > > > > >> You can have only one between SERVERNAME, SERVER and DSN. > > >> > > >> If you post your configurations files surely the configuration you are > > >> trying to use has such mistake. > > >> > > >> Frediano > > >> > > >> Frediano > > >> > > >> 2014-09-20 13:23 GMT+01:00 venkata krishna Thaluru < > > >> venkatakrishnat1 at gmail.com>: > > >> > > >> > Thanks for reply Frediano, > > >> > Could you please let me know ,what are the conflicting options. > > >> > > > >> > Thanks in advance . > > >> > > > >> > Thanks > > >> > Venkata Krishna > > >> > > > >> > On Fri, Sep 19, 2014 at 11:48 PM, Frediano Ziglio < > freddy77 at gmail.com > > > > > >> > wrote: > > >> > > > >> > > 2014-09-19 19:00 GMT+01:00 venkata krishna Thaluru < > > >> > > venkatakrishnat1 at gmail.com>: > > >> > > > > >> > > > Hi All, > > >> > > > I am getting below error and while connecting to mssql. > > >> > > > > > >> > > > [unixODBC][FreeTDS][SQL Server]Only one between SERVER, > SERVERNAME > > >> and > > >> > > DSN > > >> > > > can be specified > > >> > > > > > >> > > > I have checked the code in freeTDs ,We are checking whether we > > have > > >> > > > configured one ,then we are throwing this error. > > >> > > > > > >> > > > Could you please let me know ,if i missed any configuration in > any > > >> > file. > > >> > > > > > >> > > > Thanks in advance > > >> > > > > > >> > > > > > >> > > > Thanks > > >> > > > Venkata Krishna > > >> > > > > > >> > > > > > >> > > No missing configuration, only there are conflicting options. > > >> > > > > >> > > Frediano > > >> > > _______________________________________________ > > >> > > FreeTDS mailing list > > >> > > FreeTDS at lists.ibiblio.org > > >> > > http://lists.ibiblio.org/mailman/listinfo/freetds > > >> > > > > >> > > > >> > > > >> > > > >> > -- > > >> > > > >> > *Thanks&RegardsVenkatakrishna.T* > > >> > > > >> > *HCL TECHNOLOGIES Ltd.09600185503/09908611807* > > >> > _______________________________________________ > > >> > 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 > > >> > > > > > > > > > > > > -- > > > > > > *Thanks&RegardsVenkatakrishna.T* > > > > > > *HCL TECHNOLOGIES Ltd.09600185503/09908611807* > > > > > > > > > > > -- > > > > *Thanks&RegardsVenkatakrishna.T* > > > > *HCL TECHNOLOGIES Ltd.09600185503/09908611807* > > _______________________________________________ > > 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 > -- *Thanks&RegardsVenkatakrishna.T* *HCL TECHNOLOGIES Ltd.09600185503/09908611807* From freddy77 at gmail.com Tue Sep 30 06:11:56 2014 From: freddy77 at gmail.com (Frediano Ziglio) Date: Tue, 30 Sep 2014 11:11:56 +0100 Subject: [freetds] [unixODBC][FreeTDS][SQL Server]Only one between SERVER, SERVERNAME and DSN can be specified In-Reply-To: References: Message-ID: Hi, you should install odbcinst1debian2 package on debian/ubuntu. Actually it's quite strange you got this error. Installing package should handle dependencies while compiling from sources should detect the file. Frediano 2014-09-29 18:59 GMT+01:00 venkata krishna Thaluru : > Thanks for reply Frediano, > > When i run the ldd command ,it is saying binary not found( libodbcinst.so.1 > => not found) . > > ldd libtdsodbc.so > linux-vdso.so.1 => (0x00007fffc7dc4000) > libodbcinst.so.1 => not found > librt.so.1 => /lib64/librt.so.1 (0x00007fa7427f0000) > libdl.so.2 => /lib64/libdl.so.2 (0x00007fa7425ec000) > libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fa7423cf000) > libc.so.6 => /lib64/libc.so.6 (0x00007fa74203b000) > /lib64/ld-linux-x86-64.so.2 (0x00007fa742c63000) > > Could you please tell me ,if i am missing anything .. > > Thanks > Venkata Krishna > > On Fri, Sep 26, 2014 at 4:11 AM, Frediano Ziglio wrote: > >> Finally I found some time to try a repro. The problem does no occurs on my >> machine either using master or 0.91 branch. >> >> Can I have access to one of your machine? >> >> Send details privately to me if required. >> >> Frediano >> >> Frediano >> >> 2014-09-22 18:07 GMT+01:00 venkata krishna Thaluru < >> venkatakrishnat1 at gmail.com>: >> >> > Hi Frediano, >> > Could you please check my configurations and update me ,i was struck on >> it >> > . I m not able to proceed further. >> > >> > Thanks >> > Venkata Krishna >> > >> > On Sat, Sep 20, 2014 at 7:46 PM, venkata krishna Thaluru < >> > venkatakrishnat1 at gmail.com> wrote: >> > >> > > Thanks for reply Frediano, >> > > I am done below steps.if i missed or done wrong please correct me . >> > > 1)I have downloaded 0.91 from freetds location. >> > > 2)copied to 64 bit dev machine OS is linux >> > > 3)i have the run following commands ./configure ,make ,make install >> > > 4)then copied following binaries. >> > > ./src/odbc/.libs/libtdsodbc.so >> > > ./src/dblib/.libs/libsybdb.so >> > > ./src/ctlib/.libs/libct.so >> > > >> > > 5)odbc.ini >> > > [DSNNAME] >> > > driver = >> > > ServerName = RemoteServer >> > > >> > > 6)freetds.conf >> > > >> > > host=IP address >> > > port =1433 >> > > tds version =8.0 >> > > >> > > Could you please let me know if i missed any thing . >> > > Thanks in advance. >> > > >> > > Thanks >> > > Venkata Krishna >> > > >> > > On Sat, Sep 20, 2014 at 6:00 PM, Frediano Ziglio >> > > wrote: >> > > >> > >> You can have only one between SERVERNAME, SERVER and DSN. >> > >> >> > >> If you post your configurations files surely the configuration you are >> > >> trying to use has such mistake. >> > >> >> > >> Frediano >> > >> >> > >> Frediano >> > >> >> > >> 2014-09-20 13:23 GMT+01:00 venkata krishna Thaluru < >> > >> venkatakrishnat1 at gmail.com>: >> > >> >> > >> > Thanks for reply Frediano, >> > >> > Could you please let me know ,what are the conflicting options. >> > >> > >> > >> > Thanks in advance . >> > >> > >> > >> > Thanks >> > >> > Venkata Krishna >> > >> > >> > >> > On Fri, Sep 19, 2014 at 11:48 PM, Frediano Ziglio < >> freddy77 at gmail.com >> > > >> > >> > wrote: >> > >> > >> > >> > > 2014-09-19 19:00 GMT+01:00 venkata krishna Thaluru < >> > >> > > venkatakrishnat1 at gmail.com>: >> > >> > > >> > >> > > > Hi All, >> > >> > > > I am getting below error and while connecting to mssql. >> > >> > > > >> > >> > > > [unixODBC][FreeTDS][SQL Server]Only one between SERVER, >> SERVERNAME >> > >> and >> > >> > > DSN >> > >> > > > can be specified >> > >> > > > >> > >> > > > I have checked the code in freeTDs ,We are checking whether we >> > have >> > >> > > > configured one ,then we are throwing this error. >> > >> > > > >> > >> > > > Could you please let me know ,if i missed any configuration in >> any >> > >> > file. >> > >> > > > >> > >> > > > Thanks in advance >> > >> > > > >> > >> > > > >> > >> > > > Thanks >> > >> > > > Venkata Krishna >> > >> > > > >> > >> > > > >> > >> > > No missing configuration, only there are conflicting options. >> > >> > > >> > >> > > Frediano >> > >> > > _______________________________________________ >> > >> > > FreeTDS mailing list >> > >> > > FreeTDS at lists.ibiblio.org >> > >> > > http://lists.ibiblio.org/mailman/listinfo/freetds >> > >> > > >> > >> > >> > >> > >> > >> > >> > >> > -- >> > >> > >> > >> > *Thanks&RegardsVenkatakrishna.T* >> > >> > >> > >> > *HCL TECHNOLOGIES Ltd.09600185503/09908611807* >> > >> > _______________________________________________ >> > >> > 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 >> > >> >> > > >> > > >> > > >> > > -- >> > > >> > > *Thanks&RegardsVenkatakrishna.T* >> > > >> > > *HCL TECHNOLOGIES Ltd.09600185503/09908611807* >> > > >> > >> > >> > >> > -- >> > >> > *Thanks&RegardsVenkatakrishna.T* >> > >> > *HCL TECHNOLOGIES Ltd.09600185503/09908611807* >> > _______________________________________________ >> > 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 >> > > > > -- > > *Thanks&RegardsVenkatakrishna.T* > > *HCL TECHNOLOGIES Ltd.09600185503/09908611807* > _______________________________________________ > FreeTDS mailing list > FreeTDS at lists.ibiblio.org > http://lists.ibiblio.org/mailman/listinfo/freetds