Skip to Content.
Sympa Menu

freetds - [freetds] RE: freeTDS unixODBC...Which one isn't working

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Daughterson, Adam [EPM/BOU/MMI]" <Adam.Daughterson1 AT EmersonProcess.com>
  • To: "'freetds AT lists.ibiblio.org'" <freetds AT lists.ibiblio.org>
  • Subject: [freetds] RE: freeTDS unixODBC...Which one isn't working
  • Date: Mon, 29 Dec 2003 13:37:34 -0600

I set the environment variable TDSDUMPCONFIG to /usr/local/freetds/dumpo and
ran:

root@USBOU1-DHDLINUX:~# cat /dev/null > /usr/local/freetds/dumpo
root@USBOU1-DHDLINUX:~# tsql -S usbou1-scallog -U esp_it
locale is "C"
charset is "ANSI_X3.4-1968"
Password:
Msg 5703, Level 0, State 1, Server USBOU1-SCALLOG, Line 0
Changed language setting to us_english.
1>
root@USBOU1-DHDLINUX:~#

No problem...
The contents of the dumpo file agrees:

root@USBOU1-DHDLINUX:~# cat /usr/local/freetds/dumpo
Starting log file for FreeTDS 0.61.2 with debug level 99.
2003-12-29 13:15:08.764752 Attempting to read conf files.
2003-12-29 13:15:08.764913 ...$FREETDSCONF not set. Trying $HOME.
2003-12-29 13:15:08.765570 Found conf file
'/usr/local/freetds/etc/freetds.conf' (default). Reading section
'usbou1-scallog'.
2003-12-29 13:15:08.765617 Looking for section global.
2003-12-29 13:15:08.765688 ... Found section global.
2003-12-29 13:15:08.765711 Got a match.
2003-12-29 13:15:08.765734 option = 'tds version' value = '4.2'.
2003-12-29 13:15:08.765767 option = 'initial block size' value = '512'.
2003-12-29 13:15:08.765803 option = 'swap broken dates' value = 'no'.
2003-12-29 13:15:08.765825 no is a 'no/off/false'.
2003-12-29 13:15:08.765849 option = 'swap broken money' value = 'no'.
2003-12-29 13:15:08.765870 no is a 'no/off/false'.
2003-12-29 13:15:08.765896 option = 'try server login' value = 'yes'.
2003-12-29 13:15:08.765917 yes is a 'yes/on/true'.
2003-12-29 13:15:08.765940 option = 'try domain login' value = 'no'.
2003-12-29 13:15:08.765961 no is a 'no/off/false'.
2003-12-29 13:15:08.765987 option = 'cross domain login' value = 'no'.
2003-12-29 13:15:08.766008 no is a 'no/off/false'.
2003-12-29 13:15:08.766038 option = 'text size' value = '64512'.
2003-12-29 13:15:08.766066 ... Found section mypool.
2003-12-29 13:15:08.766097 ... Found section usbou1-scallog.
2003-12-29 13:15:08.766140 Looking for section usbou1-scallog.
2003-12-29 13:15:08.766188 ... Found section global.
2003-12-29 13:15:08.766252 ... Found section mypool.
2003-12-29 13:15:08.766282 ... Found section usbou1-scallog.
2003-12-29 13:15:08.766302 Got a match.
2003-12-29 13:15:08.766324 option = 'host' value = 'usbou1-scallog'.
2003-12-29 13:15:08.766345 Found host entry usbou1-scallog.
2003-12-29 13:15:08.768006 IP addr is 155.177.99.17.
2003-12-29 13:15:08.768086 option = 'port' value = '1433'.
2003-12-29 13:15:08.768115 option = 'tds version' value = '8.0'.
2003-12-29 13:15:08.768157 ...Success.
root@USBOU1-DHDLINUX:~#

I tried using odbcinst to create a DSN, but that never seems to work, so
this time I used your documentation(much more informative that the 'live'
version on the freeTDS website!) to manually create all three types of
odbc.ini. I still get the same error with isql, but it doesn't seem to
write to the log file...

root@USBOU1-DHDLINUX:~# isql -v esp_ms_sql esp_it real_passwd
[S1000][unixODBC]Client unable to establish connection
[ISQL]ERROR: Could not SQLConnect
root@USBOU1-DHDLINUX:~#

Here's what my /usr/local/etc/odbc.ini looks like(staight odbc connection):

[ODBC Data Sources]
esp_ms_sql = MS SQL Server

[esp_ms_sql]
Driver = /usr/local/freetds/lib/libtdsodbc.so
Description = MS SQL Server
Trace = No
Server = 155.177.99.17
Database = esp35_it
Port = 1433
TDS_Version = 8.0

[Default]
Driver = /usr/local/freetds/lib/libtdsodbc.so
root@USBOU1-DHDLINUX:~#

And here's what the logfile looks like after trying to connect:

root@USBOU1-DHDLINUX:~# cat /usr/local/freetds/dumpo
root@USBOU1-DHDLINUX:~#

(totally empty...)

I did also try DSNless, as well as combined ODBC/freeTDS configurations.
None seem to either connect, or write to the logfile.

Again, I truly appreciate this help.
Adam Daughterson

-----Original Message-----
From: freetds-bounces AT lists.ibiblio.org
[mailto:freetds-bounces AT lists.ibiblio.org] On Behalf Of
freetds-request AT lists.ibiblio.org
Sent: Friday, December 26, 2003 10:01 AM
To: freetds AT lists.ibiblio.org
Subject: FreeTDS Digest, Vol 11, Issue 70


Send FreeTDS mailing list submissions to
freetds AT lists.ibiblio.org

To subscribe or unsubscribe via the World Wide Web, visit
http://lists.ibiblio.org/mailman/listinfo/freetds
or, via email, send a message with subject or body 'help' to
freetds-request AT lists.ibiblio.org

You can reach the person managing the list at
freetds-owner AT lists.ibiblio.org

When replying, please edit your Subject line so it is more specific than
"Re: Contents of FreeTDS digest..."


Today's Topics:

1. Re: freetds and sqlrelay do not return result from stored
procedure (James K. Lowden)
2. Re: AW: AW: AW: AW: AW: [freetds] connect problem to mssql
7.0 (James K. Lowden)
3. Please help me - connect problem to mssql 7.0 (Pablo Aguilera)
4. Re: freeTDS unixODBC...Which one isn't working (James K. Lowden)
5. Re: Please help me - connect problem to mssql 7.0
(James K. Lowden)
6. AW: AW: AW: AW: AW: AW: [freetds] connect problem to mssql
7.0 (Roland Bole)
7. Re: AW: AW: AW: AW: AW: AW: [freetds] connect problem to
mssql 7.0 (James K. Lowden)


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

Message: 1
Date: Thu, 25 Dec 2003 16:36:51 -0500
From: "James K. Lowden" <jklowden AT schemamania.org>
Subject: Re: [freetds] freetds and sqlrelay do not return result from
stored procedure
To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
Message-ID: <20031225163651.616312bb.jklowden AT schemamania.org>
Content-Type: text/plain; charset=US-ASCII

On Tue, 23 Dec 2003 08:19:48 +0100, robert <robert AT redcor.ch> wrote:
> Hi there
> I am using the following setup:
> SuSE 9.0 and United Linux 1
> MS SQL 2000
> freetds 0.61
> rudiments 0.26.2
> sqlrelay 0.34.2
>
> I have the following problem:
> when I connect to SQLServer using any of the tds versions 4.2,7.0,8.0
> (5.0 fails to connect) I can execute select statements and they work
> fine. However a stored procedure that does return a selection set
> fails. sqlrsh reports: rows returned 0.
>
> If I execute the same statement from tsql I get the desired result. So
> the communication between tsql and sqlrelay seems not to work.

Does sqlrelay use the ct-lib interface?

0.61 has some problems with empty rowsets. Try a recent snapshot, please.
If that doesn't solve the problem, post a TDSDUMP log of the session.

--jkl

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

Message: 2
Date: Thu, 25 Dec 2003 17:04:57 -0500
From: "James K. Lowden" <jklowden AT schemamania.org>
Subject: Re: AW: AW: AW: AW: AW: [freetds] connect problem to mssql
7.0
To: TDS Development Group <freetds AT lists.ibiblio.org>
Message-ID: <20031225170457.02526153.jklowden AT schemamania.org>
Content-Type: text/plain; charset=US-ASCII

On Wed, 24 Dec 2003, "Roland Bole" <roland.bole AT gmx.at> wrote:
> 17:42:11.481018 processing row tokens. marker is fd(DONE)
> 17:42:11.481068 tds_process_end: more_results = 0
> was_cancelled = 0
> error = 0
> done_count_valid = 1
> 17:42:11.481125 tds_process_end() state set to TDS_IDLE
> 17:42:11.481172 rows_affected = 1
> 17:42:11.481219 leaving dbnextrow() returning -2
> pid: 21085:17:42:20.358919 UNIMPLEMENTED dbsettime()
> pid: 21085:17:42:20.359072 UNTESTED dbsetmaxprocs()
> pid: 21085:17:42:20.372803 dbuse()
> pid: 21085:17:42:20.372955 dbcmd() bufsz = 126
> pid: 21085:17:42:20.373068 in dbfreebuf()
> pid: 21085:17:42:20.373181 in dbsqlexec()
> pid: 21085:17:42:20.373290 in dbsqlsend()
> pid: 21085:17:42:20.373413 tds_put_string converting 8 bytes of "use
> ELBE" pid: 21085:17:42:20.373549 tds_put_string wrote 16 bytes
> pid: 21085:Sending packet @ 17:42:20.373665
> 0000 01 01 00 18 00 00 01 00-75 00 73 00 65 00 20 00 |........ u.s.e. .|
> 0010 45 00 4c 00 42 00 45 00- |E.L.B.E.|
>
>
> pid: 21085:TDS: Write failed in tds_write_packet
> Error: 104 (Connection reset by peer)
> pid: 21085:17:42:20.374033 tds_client_msg: #20006: "Write to SQL
> Server failed.". Connection state is now 0.

This log shows you're not calling dbresults() a final time before dbuse().
I don't know if that's the problem, but I know it's improper. If the
server's expecting you to read something and receives a packet instead, it
might well decide to disconnect.

In the log, just above the chunk you sent, is the data packet from the
server. Does it indicate there's more coming?

--jkl


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

Message: 3
Date: Thu, 25 Dec 2003 20:05:07 -0600 (CST)
From: Pablo Aguilera <p_a_aguilera_vargas AT yahoo.com>
Subject: [freetds] Please help me - connect problem to mssql 7.0
To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
Message-ID: <20031226020507.27421.qmail AT web41808.mail.yahoo.com>
Content-Type: text/plain; charset=iso-8859-1

I need configurate mssql 7.0 on Windows and PHP on Red Hat 9.0 please You
can help me?



---------------------------------
Do You Yahoo!?
Todo lo que quieres saber de Estados Unidos, América Latina y el resto del
Mundo. Visíta Yahoo! Noticias.

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

Message: 4
Date: Fri, 26 Dec 2003 01:54:14 -0500
From: "James K. Lowden" <jklowden AT schemamania.org>
Subject: Re: [freetds] freeTDS unixODBC...Which one isn't working
To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
Message-ID: <20031226015414.2f396a98.jklowden AT schemamania.org>
Content-Type: text/plain; charset=US-ASCII

On Wed, 24 Dec 2003, "Daughterson, Adam [EPM/BOU/MMI]"
<Adam.Daughterson1 AT EmersonProcess.com> wrote:
> I apologise in advance for my inexperience in a mail list. This is my
> first experience with this type of support.

Welcome, Adam.

> I configured/compiled unixODBC first, then configured/compiled freeTDS
> with:./configure --prefix=/usr/local/freetds(I've tried this using the
> default/usr/local) --with-unixodbc --with-tdsver=8.0(I've also tried
> 7.0) Make && make install
...
> adaughterson@USBOU1-DHDLINUX:~$ isql -v esp_ms_sql esp_it
> working_password[IM004][unixODBC][Driver Manager]Driver's
> SQLAllocHandle on SQL_HANDLE_HENV failed
> [ISQL]ERROR: Could not SQLConnect

Turn on TDSDUMPCONFIG and have a look at the log. Probably, your odbc.ini
is misconfigured; pay careful attention to the Server/Servername entries.


If you are using a recent snapshot, the User Guide included with it has a
new explanation about setting up the ODBC configuration files. As it's me
who wrote them, I have an interest in whether or not you find them helpful.


HTH.

--jkl

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

Message: 5
Date: Fri, 26 Dec 2003 01:56:52 -0500
From: "James K. Lowden" <jklowden AT schemamania.org>
Subject: Re: [freetds] Please help me - connect problem to mssql 7.0
To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
Message-ID: <20031226015652.10ffc4c5.jklowden AT schemamania.org>
Content-Type: text/plain; charset=US-ASCII

On Thu, 25 Dec 2003, Pablo Aguilera <p_a_aguilera_vargas AT yahoo.com> wrote:
> I need configurate mssql 7.0 on Windows and PHP on Red Hat 9.0 please
> You can help me?

Start a new thread; don't reply to an old, unrelated message. :-)

How did you configure PHP?
How did you configure FreeTDS?
Can you show us the TDSDUMP log?

--jkl

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

Message: 6
Date: Fri, 26 Dec 2003 08:34:42 +0100
From: "Roland Bole" <roland.bole AT gmx.at>
Subject: AW: AW: AW: AW: AW: AW: [freetds] connect problem to mssql
7.0
To: "'FreeTDS Development Group'" <freetds AT lists.ibiblio.org>
Message-ID: <20031226073444.A0727200A4 AT happyhouse.metalab.unc.edu>
Content-Type: text/plain; charset="iso-8859-1"

To solve my connection problems i use now mssql_connect instead
mssql_pconnect.

But for other usage we should found and fix this problem.

Roland





-----Ursprüngliche Nachricht-----
Von: freetds-bounces AT lists.ibiblio.org
[mailto:freetds-bounces AT lists.ibiblio.org] Im Auftrag von James K. Lowden
Gesendet: Donnerstag, 25. Dezember 2003 23:05
An: TDS Development Group
Betreff: Re: AW: AW: AW: AW: AW: [freetds] connect problem to mssql 7.0

On Wed, 24 Dec 2003, "Roland Bole" <roland.bole AT gmx.at> wrote:
> 17:42:11.481018 processing row tokens. marker is fd(DONE)
> 17:42:11.481068 tds_process_end: more_results = 0
> was_cancelled = 0
> error = 0
> done_count_valid = 1
> 17:42:11.481125 tds_process_end() state set to TDS_IDLE
> 17:42:11.481172 rows_affected = 1
> 17:42:11.481219 leaving dbnextrow() returning -2
> pid: 21085:17:42:20.358919 UNIMPLEMENTED dbsettime()
> pid: 21085:17:42:20.359072 UNTESTED dbsetmaxprocs()
> pid: 21085:17:42:20.372803 dbuse()
> pid: 21085:17:42:20.372955 dbcmd() bufsz = 126
> pid: 21085:17:42:20.373068 in dbfreebuf()
> pid: 21085:17:42:20.373181 in dbsqlexec()
> pid: 21085:17:42:20.373290 in dbsqlsend()
> pid: 21085:17:42:20.373413 tds_put_string converting 8 bytes of "use
> ELBE" pid: 21085:17:42:20.373549 tds_put_string wrote 16 bytes
> pid: 21085:Sending packet @ 17:42:20.373665
> 0000 01 01 00 18 00 00 01 00-75 00 73 00 65 00 20 00 |........ u.s.e. .|
> 0010 45 00 4c 00 42 00 45 00- |E.L.B.E.|
>
>
> pid: 21085:TDS: Write failed in tds_write_packet
> Error: 104 (Connection reset by peer)
> pid: 21085:17:42:20.374033 tds_client_msg: #20006: "Write to SQL
> Server failed.". Connection state is now 0.

This log shows you're not calling dbresults() a final time before dbuse().
I don't know if that's the problem, but I know it's improper. If the
server's expecting you to read something and receives a packet instead, it
might well decide to disconnect.

In the log, just above the chunk you sent, is the data packet from the
server. Does it indicate there's more coming?

--jkl

_______________________________________________
FreeTDS mailing list
FreeTDS AT lists.ibiblio.org http://lists.ibiblio.org/mailman/listinfo/freetds



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

Message: 7
Date: Fri, 26 Dec 2003 09:00:10 -0500
From: "James K. Lowden" <jklowden AT schemamania.org>
Subject: Re: AW: AW: AW: AW: AW: AW: [freetds] connect problem to
mssql 7.0
To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
Message-ID: <20031226090010.6183bd0f.jklowden AT schemamania.org>
Content-Type: text/plain; charset=ISO-8859-1

On Fri, 26 Dec, "Roland Bole" <roland.bole AT gmx.at> wrote:
> To solve my connection problems i use now mssql_connect instead
> mssql_pconnect.
>
> But for other usage we should found and fix this problem.

I'm glad you found a solution for your situation.

The last problem you reported appears to stem from an error in PHP's use of
the db-lib interface when connecting with mssql_pconnect. You might
consider sending them a bug report, with a full FreeTDS log.

--jkl

> -----Ursprüngliche Nachricht-----
> Von: freetds-bounces AT lists.ibiblio.org
> [mailto:freetds-bounces AT lists.ibiblio.org] Im Auftrag von James K.
> Lowden Gesendet: Donnerstag, 25. Dezember 2003 23:05
> An: TDS Development Group
> Betreff: Re: AW: AW: AW: AW: AW: [freetds] connect problem to mssql
> 7.0
>
> On Wed, 24 Dec 2003, "Roland Bole" <roland.bole AT gmx.at> wrote:
> > 17:42:11.481018 processing row tokens. marker is fd(DONE)
> > 17:42:11.481068 tds_process_end: more_results = 0
> > was_cancelled = 0
> > error = 0
> > done_count_valid = 1
> > 17:42:11.481125 tds_process_end() state set to TDS_IDLE
> > 17:42:11.481172 rows_affected = 1
> > 17:42:11.481219 leaving dbnextrow() returning -2
> > pid: 21085:17:42:20.358919 UNIMPLEMENTED dbsettime()
> > pid: 21085:17:42:20.359072 UNTESTED dbsetmaxprocs()
> > pid: 21085:17:42:20.372803 dbuse()
> > pid: 21085:17:42:20.372955 dbcmd() bufsz = 126
> > pid: 21085:17:42:20.373068 in dbfreebuf()
> > pid: 21085:17:42:20.373181 in dbsqlexec()
> > pid: 21085:17:42:20.373290 in dbsqlsend()
> > pid: 21085:17:42:20.373413 tds_put_string converting 8 bytes of "use
> > ELBE" pid: 21085:17:42:20.373549 tds_put_string wrote 16 bytes
> > pid: 21085:Sending packet @ 17:42:20.373665
> > 0000 01 01 00 18 00 00 01 00-75 00 73 00 65 00 20 00 |........ u.s.e.
> > .| 0010 45 00 4c 00 42 00 45 00- |E.L.B.E.|
> >
> >
> > pid: 21085:TDS: Write failed in tds_write_packet
> > Error: 104 (Connection reset by peer)
> > pid: 21085:17:42:20.374033 tds_client_msg: #20006: "Write to SQL
> > Server failed.". Connection state is now 0.
>
> This log shows you're not calling dbresults() a final time before
> dbuse(). I don't know if that's the problem, but I know it's
> improper. If the server's expecting you to read something and
> receives a packet instead, it might well decide to disconnect.
>
> In the log, just above the chunk you sent, is the data packet from the
> server. Does it indicate there's more coming?
>
> --jkl
>
> _______________________________________________
> 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


End of FreeTDS Digest, Vol 11, Issue 70
***************************************




Archive powered by MHonArc 2.6.24.

Top of Page