James K. Lowden | 27 Jan 03:48 2015

chapter next

Greetings All, 

I want to let everyone know just a little news about the FreeTDS
project from my perspective.  

Frediano has agreed to be the Project Maintainer and is in the process
of acquiring the requisite keys to the kingdom.  It's fitting; no one
has done more to make FreeTDS what it is today.  

I have faith that Frediano won't pull up the drawbridge, not that I mean
to cross it very much.  I know he's interested in fixing the overnight
snapshot process, and in more frequent releases.  There's quite a bit
of new functionality in the current development branch that I'm sure
will be welcome in a new release.  

It's been quite a ride.  The oldest FreeTDS message in my personal
archive dates from 2001, the first year of the Bush administration.  In
those days FreeTDS was very much a work in progress.  There was only
primitive BCP (no freebcp), incomplete type conversion, just the most
essential functions.  The most frequent error was a TDS parsing error
about invalid stream state, leading immediately to exit(3).  

I remember an early bug report that said char-> int conversion failed
to read the last character, leading to the mother of all off-by-one
errors: off by one order of magnitude.  I think that was the day I
decided to jump in with both feet, starting with an all-to-all db-lib
type conversion test.  :-)

Even though my name is on a lot of email messages, I don't lay claim to
most of the code.  Much, much more was done by Brian & company in the
(Continue reading)

LacaK | 19 Jan 11:56 2015
Picon

Next stable release

Hi,
is there any plan, or time estimation for next (post 0.91) stable 
release of FreeTDS ?
(as it is more than 3 years after 0.91 was released)
If not, then is current git master stable enough?
(or are there any work in progress changes?)
Thanks
-Laco.
Gregory Holtorf | 16 Jan 23:17 2015
Picon

Adding NVARCHAR columns causes ct_cancel (ctlib) to hang

When calling ct_cancel in the freetds library, on unix, ct_cancel()
sometimes takes several minutes to run. This is bad because it usually
takes a few milliseconds to run. This bug works on freetds-0.91 and
freetds-0.64 In order to reproduce the bug, I needed to:

1. Run a select statement on a large table

2. The table has to contain nvarchar columns. varchar columns do not
trigger the bug.

3. The select statement must contain an order by clause

  select <nvarchar columns>

  from <table name>

  order by <nvarchar column>

After completing the select statement, call ct_cancel(). For instance,
before you make another select statement or when you log out.

  ct_cancel(m_pCtConnection, NULL, CS_CANCEL_ALL);

When I turn on logging I can see that after I call ct_cancel() for the last
time, it is followed by an absolutely huge number of packets received.  I
attached a log file, but I had to force quit the program or else the log
file ends up being several thousand megabytes long.

Is there a way to fix this issue? Is freetds unable to make select
statements on nvarchar columns or is it something I did in my code?
(Continue reading)

Velichko Yuriy | 16 Jan 08:12 2015
Picon

How to hash of the password string for query?

Hello! Sorry if this question is offtop in this list, but I hope that you
can help me.

I use freetds to communicate with SQL Server.
To create a server login I should to use query

CREATE LOGIN ... PASSWORD hashed_password HASHED

Advise me, please, how should I get the hashed_password properly? May be
there is a particular function in freetds for this purpose?

Thanks!
Adrian.Nye@dimensional.com | 6 Jan 16:32 2015

Unexpected EOF


Hello, I’m a first time poster to this list.

I am having a problem running TDS 0.91 on Mac OSX 10.9 (Mavericks) using a homebrew installation, where I can
no longer connect to Microsoft SQL.    The connection was working fine, but some unknown change broke it, and
I cannot seem to recover.

I did a brew update, then reinstalled unixodbc first, then reinstalled freetds with the —with-unixodbc option.

The output of tsql –C is:

                            Version: freetds v0.91
             freetds.conf directory: /usr/local/Cellar/freetds/0.91_2/etc
     MS db-lib source compatibility: no
        Sybase binary compatibility: no
                      Thread safety: yes
                      iconv library: yes
                        TDS version: 7.1
                              iODBC: no
                           unixodbc: yes
              SSPI "trusted" logins: no
                           Kerberos: no

I am using the following command for testing:

TDSVER=7.1 TDSDUMP=/tmp/freetds.log tsql -H <host> -p 1433 -U <username> -P  <pw>

I have confirmed using telnet that I can connect to the MSSQL server on port 1433.

The TDSVER, host, username, password, and port are all known correct because this command line works on
(Continue reading)

venkata krishna Thaluru | 1 Jan 13:28 2015
Picon

FreeTds crashing

Hi All,
I have downloaded the following version(freetds-0.92.812)  and stable
 version for 64 bit and compiled the source code.
While connecting from sybase to MSSQL ,it is crashing .

Could you please let me know whether we have addressed this issue in any
versions and please share the exact version details.

Thanks
Venkata Krishna
venkata krishna Thaluru | 26 Dec 18:17 2014
Picon

Regarding 32 bit and 64 bit RPMS

Hi All,
We are using 32 bit CentOS 5.8 and 64 bit for Redhat linux 5 .
Could you please share the name of the rpms for 32 bit and 64 bit .

Thanks in advance .

Thanks
Venkata Krishna
venkata krishna Thaluru | 26 Dec 17:37 2014
Picon

Only one between SERVER, SERVERNAME and DSN

Hi All,
I am getting the below exception ,when i try to connect to MSSQL Server.

Only one between SERVER, SERVERNAME and DSN

I have checked the code ,we are thowing the below exception . Please see
the details below.

if (CHK_PARAM(Server)) {
                        /* error if servername or DSN specified */
                        if ((cfgs & (CFG_DSN|CFG_SERVERNAME)) != 0) {
                                tds_dstr_free(&value);
                                odbc_errs_add(errs, "HY000", "Only one
between SERVER, SERVERNAME and DSN can be specified");
                                return 0;
                        }

} else if (CHK_PARAM(Servername)) {
                        if ((cfgs & (CFG_DSN|CFG_SERVER)) != 0) {
                                tds_dstr_free(&value);
                                odbc_errs_add(errs, "HY000", "Only one
between SERVER, SERVERNAME and DSN can be specified");
                                return 0;
                        }
 else if (CHK_PARAM(DSN)) {
                        if ((cfgs & (CFG_SERVER|CFG_SERVERNAME)) != 0) {
                                tds_dstr_free(&value);
                                odbc_errs_add(errs, "HY000", "Only one
between SERVER, SERVERNAME and DSN can be specified");
                                return 0;
(Continue reading)

Michael Koch | 15 Dec 18:59 2014
Picon

Problem with FreeTDS 0.91 and Sybase ASA 9

Hello List,

in addition to my last post I have made much more tests. At least under 
Gentoo with FreeTDS 0.91 und unixODBX 2.3.2-r1 I could confirm my 
problems with SQLPrepare.

I turned on trace logging for FreeTDS and unixODBC and take isql todo a 
simple SELECT-Query. isql tries to build the query with SQLPrepare and 
the Sybase ASA9 gives a error value back, that the procedur that it 
tries to create is already existing.

I've made the following log files. I hope anyone has an ideas?

Thanks in advance! Best regards

Michael

---------------------------------------------------------------------------------------------------------------------------------------------------------

[ODBC][27626][1418664265.425550][/var/tmp/portage/dev-db/unixODBC-2.3.2-r1/work/unixODBC-2.3.2/DriverManager/__handles.c][460]
                 Exit:[SQL_SUCCESS]
                         Environment = 0x60d830
[ODBC][27626][1418664265.425623][/var/tmp/portage/dev-db/unixODBC-2.3.2-r1/work/unixODBC-2.3.2/DriverManager/SQLAllocHandle.c][375]
                 Entry:
                         Handle Type = 2
                         Input Handle = 0x60d830
[ODBC][27626][1418664265.425664][/var/tmp/portage/dev-db/unixODBC-2.3.2-r1/work/unixODBC-2.3.2/DriverManager/SQLAllocHandle.c][493]
                 Exit:[SQL_SUCCESS]
                         Output Handle = 0x60e130
[ODBC][27626][1418664265.425708][/var/tmp/portage/dev-db/unixODBC-2.3.2-r1/work/unixODBC-2.3.2/DriverManager/SQLConnect.c][3727]
(Continue reading)

m.jablonski | 13 Dec 09:25 2014

problems with UTF-8


Hi everyone,

I have problem with UTF-8.
in config client charset is set to utf-8

Why  charset is changed to cp1250 by freetds ? My sql is send with utf-8.

this is log:

net.c:1057:instance port is 49618
net.c:205:Connecting to 10.5.2.2 port 49618 (TDS version 4.2)
net.c:270:tds_open_socket: connect(2) returned "Operation now in
progress"
net.c:310:tds_open_socket() succeeded
util.c:156:Changed query state from DEAD to IDLE
net.c:741:Sending packet
0000 02 00 02 00 00 00 00 00-62 61 63 6b 75 70 00 00 |........ backup..|
0010 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0020 00 00 00 00 00 00 06 73-61 00 00 00 00 00 00 00 |.......s a.......|
0030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0040 00 00 00 00 00 02 54 72-75 64 6e 65 68 61 73 6c |......********|
0050 6f 31 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |o1...... ........|
0060 00 00 00 00 0c 39 36 37-00 00 00 00 00 00 00 00 |.....967 ........|
0070 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0080 00 00 00 03 03 01 06 0a-09 01 00 00 00 00 02 00 |........ ........|
0090 00 00 00 00 50 48 50 20-35 00 00 00 00 00 00 00 |....PHP  5.......|
00a0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
00b0 00 00 05 31 30 2e 35 2e-32 2e 32 5c 4f 50 54 49 |...10.5. 2.2\OPTI|
00c0 4d 41 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |MA...... ........|
(Continue reading)

Michael Koch | 8 Dec 14:04 2014
Picon

Problem with SQLPrepare and Sybase ASA 9

Hello all,

In a table which has 3 varchar(...) fields I try to INSERT the following 
statement with the released FreeTDS 0.92:

INSERT INTO dba.michaelstest (dNummer, DateinameBild, Unterschrift) 
VALUES ('00002', 'lalala.bmp', 'abc')

We use:
retcode = SQLPrepare(stmt, "INSERT INTO dba.michaelstest (dNummer, 
DateinameBild, Unterschrift) VALUES ('00002', 'lalala.bmp', 'abc')", 
SQL_NTS);
recode is here SQL_SUCCESS!
then we use:
recode = SQLExecute(stmt);
The recode here is 100 (SQL_NO_DATA).

We also use a Statement with one ? for testing and SQLBindParameter, 
SQLPrepare, SQLExecute, SQLParam, SQLPutData << it always all returned 
SUCCESFULL return code, the right code that is needed.

Form the 1. example (without ?) we geht on Sybase ASA 9.0.2 the 
following Debuglog:

08 12:22:02.394 ** DONE    conn: 1     CONNECT Conn=1
12/08 12:22:02.394 ** REQUEST conn: 1     DO_NOTHING
12/08 12:22:02.427 ** REQUEST conn: 1     STMT_EXECUTE_ANY_IMM "set 
textsize 64512 "
12/08 12:22:02.427 ** DONE    conn: 1     STMT_EXECUTE_ANY_IMM
12/08 12:22:02.459 ** REQUEST conn: 1     STMT_EXECUTE_ANY_IMM "WHILE 
(Continue reading)


Gmane