Skip to Content.
Sympa Menu

freetds - [freetds] what am I missing?

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Chris Bartram <chrisrbartram AT yahoo.com>
  • To: freetds AT lists.ibiblio.org
  • Subject: [freetds] what am I missing?
  • Date: Tue, 17 May 2011 19:30:17 -0700 (PDT)

Downloaded and built the current freedts and unixODBC (both using default
./configure) on a RHEL box that already had working Perl DBI functionality to
remote MySQL databases.When I try the ODBC connection in a Perl program I get
errors that the .so is not found; yet an ls shows the file(s) right where
it's
supposed to be looking. tsql looks like it might be working? I was getting
authentication errors (when I tried a domain account; once the DBA created a
SQl
account for me those errors stopped and tsql now give me a prompt.)

Remote MS SQL server is a SQL (2008?) cluster if that matters.

Config details below. Any help appreciated.

-Chris Bartram

"The purpose of life is not to be happy. It is to be useful, to be
honorable,
to be compassionate, to have it make some difference that you have lived and
lived well". (Ralph Waldo Emerson)



-bash-3.2$ uname -a
Linux hostname 2.6.18-194.17.1.el5 #1 SMP Mon Sep 20 07:12:06 EDT 2010 x86_64
x86_64 x86_64 GNU/Linux


-bash-3.2$ /usr/local/bin/tsql - S SQLServer -U user -P pass
locale is "en_US.UTF-8"
locale charset is "UTF-8"
1>


-bash-3.2$ isql -v SQLServer user
[S1000][unixODBC][FreeTDS][SQL Server]Unable to connect to data source
[01000][unixODBC][FreeTDS][SQL Server]Adaptive Server connection failed
[01000][unixODBC][FreeTDS][SQL Server]Unexpected EOF from the server
[ISQL]ERROR: Could not SQLConnect


-bash-3.2$ cat test.pl
#!/usr/bin/perl

use DBI;
use Socket;

$userpass='pass';

$dbh = DBI->connect("dbi:ODBC:SQLServer","user",$userpass);
if (!$dbh)
{
$dberror=$DBI::errstr;
print localtime()."DB Connect error:$dberror \n";
exit;
};


-bash-3.2$ ./test.pl
DBI connect('SQLServer','user',...) failed: [unixODBC][Driver Manager]Can't
open
lib '/usr/local/lib/libtdsodbc.so' : file not found (SQL-01000) at
./testscom.pl
line 11
Tue May 17 11:35:59 2011DB Connect error:[unixODBC][Driver Manager]Can't open
lib '/usr/local/lib/libtdsodbc.so' : file not found (SQL-01000)


-bash-3.2$ ls -la /usr/local/lib/libtds*
-rw-r--r-- 1 root root 1977476 May 12 17:44 /usr/local/lib/libtdsodbc.a
-rwxr-xr-x 1 root root 829 May 12 17:44 /usr/local/lib/libtdsodbc.la
lrwxrwxrwx 1 root root 19 May 12 17:44 /usr/local/lib/libtdsodbc.so ->
libtdsodbc.so.0.0.0
lrwxrwxrwx 1 root root 19 May 12 17:44 /usr/local/lib/libtdsodbc.so.0 ->
libtdsodbc.so.0.0.0
-rwxr-xr-x 1 root root 1018998 May 12 17:44 /usr/local/lib/libtdsodbc.so.0.0.0



-bash-3.2$ cat /usr/local/etc/odbcinst.ini
[FreeTDS]
Description=v with protovol v
Driver=/usr/local/lib/libtdsodbc.so
UsageCount=1


-bash-3.2$ cat /usr/local/etc/freetds.conf
# $Id: freetds.conf,v 1.12 2007/12/25 06:02:36 jklowden Exp $
#
# This file is installed by FreeTDS if no file by the same
# name is found in the installation directory.
#
# For information about the layout of this file and its settings,
# see the freetds.conf manpage "man freetds.conf".

# Global settings are overridden by those in a database
# server specific section
[global]
# TDS protocol version
; tds version = 4.2

# Whether to write a TDSDUMP file for diagnostic purposes
# (setting this to /tmp is insecure on a multi-user system)
; dump file = /tmp/freetds.log
; debug flags = 0xffff

# Command and connection timeouts
; timeout = 10
; connect timeout = 10

# If you get out-of-memory errors, it may mean that your client
# is trying to allocate a huge buffer for a TEXT field.
# Try setting 'text size' to a more reasonable limit
text size = 64512

[SQLServer]
host = sqlclus
port = 1433
tds version = 8.0



-bash-3.2$ cat .odbc.ini
[SQLServer]
Driver=FreeTDS
Description=test Database
Trace=No
TraceFile=/tmp/odbc.trace
Server=SQLCLUS
Port=1433
Database=OperationsManager
>From john AT capps.com Wed May 18 04:20:25 2011
Return-Path: <john AT capps.com>
X-Original-To: freetds AT lists.ibiblio.org
Delivered-To: freetds AT lists.ibiblio.org
Received: by lists.ibiblio.org (Postfix, from userid 20217)
id 19379E8B84; Wed, 18 May 2011 04:20:25 -0400 (EDT)
X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on
mailman1.ibiblio.org
X-Spam-Level:
X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00 autolearn=ham
version=3.2.5
X-Greylist: delayed 492 seconds by postgrey-1.33 at mailman1.ibiblio.org;
Wed, 18 May 2011 04:20:24 EDT
Received: from qmta06.emeryville.ca.mail.comcast.net
(qmta06.emeryville.ca.mail.comcast.net [76.96.30.56])
by lists.ibiblio.org (Postfix) with ESMTP id 79970E8B82
for <freetds AT lists.ibiblio.org>; Wed, 18 May 2011 04:20:24 -0400 (EDT)
Received: from omta06.emeryville.ca.mail.comcast.net ([76.96.30.51])
by qmta06.emeryville.ca.mail.comcast.net with comcast
id kwBj1g00316AWCUA6wCC2J; Wed, 18 May 2011 08:12:12 +0000
Received: from [10.0.1.7] ([24.5.2.231])
by omta06.emeryville.ca.mail.comcast.net with comcast
id kwCB1g0044z2uns8SwCBMG; Wed, 18 May 2011 08:12:11 +0000
From: John Kendall <john AT capps.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Date: Wed, 18 May 2011 01:12:10 -0700
Message-Id: <5D7479D3-2429-4944-BA8D-AAB37B6BE13D AT capps.com>
To: freetds AT lists.ibiblio.org
Mime-Version: 1.0 (Apple Message framework v1084)
X-Mailer: Apple Mail (2.1084)
Subject: [freetds] Windows ODBC Driver
X-BeenThere: freetds AT lists.ibiblio.org
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
List-Id: FreeTDS Development Group <freetds.lists.ibiblio.org>
List-Unsubscribe: <http://lists.ibiblio.org/mailman/listinfo/freetds>,
<mailto:freetds-request AT lists.ibiblio.org?subject=unsubscribe>
List-Archive: <https://lists.ibiblio.org/sympa/arc/freetds>
List-Post: <mailto:freetds AT lists.ibiblio.org>
List-Help: <mailto:sympa AT lists.ibiblio.org?subject=HELP>
List-Subscribe: <http://lists.ibiblio.org/mailman/listinfo/freetds>,
<mailto:freetds-request AT lists.ibiblio.org?subject=subscribe>
X-List-Received-Date: Wed, 18 May 2011 08:20:25 -0000


I've used the Windows ODBC driver Installer on:

http://freetds.sourceforge.net

with great success. It installs a 0.64 driver, so I wanted to look into
compiling my own with the latest source.

My problem is that I develop on a Mac. I don't have access to a Windows
machine with a compiler.

So: can I, using only freely and legally downloadable tools, cross-compile
and create a Windows ODBC driver like the one the installer above installs
on my Mac (Intel). (I've already build the Mac ODBC drivers--easy!)

Or if I were to borrow a Windows machine, what tools (free ones) would
people recommend I load on it to do it?

I'd really rather do this on the Mac if it's doable.

I apologize if this has been answered many times before, I *did* read
the archives for about two hours before posting.

Many thanks,
John








Archive powered by MHonArc 2.6.24.

Top of Page