Skip to Content.
Sympa Menu

freetds - [freetds] DBD::Sybase not connecting - acts like it is not using FreeTDS

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Darrell Cormier <Darrell.Cormier AT xfab.com>
  • To: "freetds AT lists.ibiblio.org" <freetds AT lists.ibiblio.org>
  • Subject: [freetds] DBD::Sybase not connecting - acts like it is not using FreeTDS
  • Date: Wed, 13 Feb 2013 19:58:26 +0000

I have searched the archives and did not find an answer to my issue.
I have installed FreeTDS 0.91 on a SLES 11 server. 
This install works fine because I can connect and query the MS-SQL database
(dlus2) using tsql.

As root, I set my SYBASE environment variable to /usr/local:

# echo $SYBASE
/usr/local

since the FreeTDS libs are in /usr/local/lib.

la /usr/local/lib
total 9928
drwxr-xr-x  2 root root    4096 Feb 13 11:56 .
drwxr-xr-x 16 root root    4096 Feb 13 10:58 ..
-rw-r--r--  1 root root 1995840 Feb 13 11:56 libct.a
-rwxr-xr-x  1 root root     925 Feb 13 11:56 libct.la
lrwxrwxrwx  1 root root      14 Feb 13 11:56 libct.so -> libct.so.4.0.0
lrwxrwxrwx  1 root root      14 Feb 13 11:56 libct.so.4 -> libct.so.4.0.0
-rwxr-xr-x  1 root root 1040101 Feb 13 11:56 libct.so.4.0.0
-rw-r--r--  1 root root 2189636 Feb 13 11:56 libsybdb.a
-rwxr-xr-x  1 root root     946 Feb 13 11:56 libsybdb.la
lrwxrwxrwx  1 root root      17 Feb 13 11:56 libsybdb.so -> libsybdb.so.5.0.0
lrwxrwxrwx  1 root root      17 Feb 13 11:56 libsybdb.so.5 ->
libsybdb.so.5.0.0
-rwxr-xr-x  1 root root 1179261 Feb 13 11:56 libsybdb.so.5.0.0
-rw-r--r--  1 root root 2376384 Feb 13 11:56 libtdsodbc.a
-rwxr-xr-x  1 root root     996 Feb 13 11:56 libtdsodbc.la
lrwxrwxrwx  1 root root      19 Feb 13 11:56 libtdsodbc.so ->
libtdsodbc.so.0.0.0
lrwxrwxrwx  1 root root      19 Feb 13 11:56 libtdsodbc.so.0 ->
libtdsodbc.so.0.0.0
-rwxr-xr-x  1 root root 1236836 Feb 13 11:56 libtdsodbc.so.0.0.0
lrwxrwxrwx  1 root root      30 Feb  1 11:28 libtds++.so ->
/usr/local/lib/libtds++.so.1.0
-rw-r--r--  1 root bin    89952 Feb  1 11:28 libtds++.so.1.0

I built the DBD::SYBASE (I tried this with "EXTRA_LIBS= " and
"EXTRA_LIBS=-lnsck -lnsl" in CONFIG).
Everything seemed to go fine through the make install.
However, when I attempt a connection to the same server used for the tsql
test mentioned above, I get the following message when the statement handle
is executed:

DBD::Sybase::st execute failed: Server message number=7202 severity=11
state=2 line=1 server=DLUS2-SQL text=Could not find server 'dlus2' in
sys.servers. Verify that the correct server name was specified. If necessary,
execute the stored procedure sp_addlinkedserver to add the server to
sys.servers. at <path to perl script>/devices.pl line 19.
Can't Execute the shipping data SQL statement: Server message number=7202
severity=11 state=2 line=1 server=DLUS2-SQL text=Could not find server
'dlus2' in sys.servers. Verify that the correct server name was specified. If
necessary, execute the stored procedure sp_addlinkedserver to add the server
to sys.servers. at <path to perl script>/devices.pl line 19.

I have never experienced this on other Linux installs.  Have you experienced
this and can you give me an idea why it is looking for the sys.servers rather
than using the server config in /usr/local/etc/freetds.conf?
Contents of /usr/local/etc/freetds.conf:

> 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


#Microsoft Manufacturing server
[dlus2]
        host = dlus2.<domain>
        port = 1433
        tds version = 7.0

#Microsoft Test server
[dlus9]
        host = dlus9.<domain>
        port = 1433
        tds version = 7.0


Thanks,
DC


SPAM and Virus prevention by Barracuda Network Solutions




Archive powered by MHonArc 2.6.24.

Top of Page