[freetds] RE: [ISQL]ERROR: Could not SQLConnect

jun_chen at bankone.com jun_chen at bankone.com
Mon Jun 7 15:29:15 EDT 2004


Thanks a lot for your help, Freddy77.

I tried what you suggested below, it works for MS SQL Server, but it 
doesn't work for Sybase.
visdb is a Sybase database server. The entry for visdb in freetds.conf is
[visdb]
        host = 155.180.196.173
        port = 2638
        tds version = 5.0

The entry for TDS in odbcinst.ini is
[TDS]
Description             = v0.62
Driver          = /usr/local/freetds/lib/libtdsodbc.so
FileUsage               = 1

The entry for visdb in odbc.ini is
[visdb]
Driver          = TDS
Description     = SAN Point Sybase DB
Servername      = visdb

When I run isql -v visdb <username> <password>, I got the following error:
[S1000][unixODBC][FreeTDS][SQL Server]Unable to connect to data source
[28000][unixODBC][FreeTDS][SQL Server]Login incorrect.
[08W10][unixODBC][FreeTDS][SQL Server]ASA Error -83: Specified database 
not found
[ISQL]ERROR: Could not SQLConnect

The same configuration works fine for MS SQL Server.

I installed the sybase client into the same machine and I used the same 
username and password to connect to the sybase server without any issue.
So I know the username and password I used are good ones.

Any idea, Freddy77?

Jun Chen




freetds-request at lists.ibiblio.org
Sent by: freetds-bounces at lists.ibiblio.org
05/19/2004 12:06 PM
Please respond to freetds

 
        To:     freetds at lists.ibiblio.org
        cc: 
        Subject:        FreeTDS Digest, Vol 16, Issue 24

   1. RE: [ISQL]ERROR: Could not SQLConnect (ZIGLIO, Frediano, VF-IT)


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

Message: 1
Date: Wed, 19 May 2004 17:31:46 +0200
From: "ZIGLIO, Frediano, VF-IT" <Frediano.Ziglio at vodafone.com>
Subject: RE: [freetds] [ISQL]ERROR: Could not SQLConnect
To: "FreeTDS Development Group" <freetds at lists.ibiblio.org>
Message-ID:
 <F7F148C986A2A84F930FEB8C3B169EA02504F5 at OPDMEXO01.omnitel.it>
Content-Type: text/plain;                charset="us-ascii"

> 
> Hi,
> 
> I were trying to setup unixODBC and freetds in Redhat 
> Advanced Server 2.1 
> to access Sybase and MS SQL Server.
> The freetds version is 0.62.3 and unixODBC's is 2.2.8.
> 
> I used the following to configure freetds:
> ./configure --prefix=/usr/local/freetds --disable-threadsafe 
> --with-tdsver=7.0 --with-unixodbc=/usr/local/unixODBC
> 
> After I configured freetds.conf,  I can use Perl DBI and Perl 
> DBD::Sybase 
> to access a Sybase database and
> MS SQL Server. I can also use tsql (tsql -S views -U <username> -P 
> <password> to access those databases without any issue.
> 
> I configured odbcinst.ini and odbc.ini by using odbcinst. 
> Here are the 
> file odbcinst.ini:
> 
> [DB2]
> Description             = DB2 Driver
> Driver          = /usr/IBMdb2/V7.1/lib/libdb2.so
> FileUsage               = 1
> 
> [TDS]
> Description             = v0.62
> Driver          = /usr/local/freetds/lib/libtdsodbc.so
> FileUsage               = 1
> 
> Here is odbc.ini:
> 
> [inv]
> Description             = Tivoli Production Inventory DB2
> Driver          = DB2
> 
> [views]
> Description             = CSIRT MS SQL Server
> Driver          = TDS
> 
> [peregrine]
> Description             = Peregrine MS SQL Server
> Driver          = TDS
> 
> [visdb]
> Driver          = TDS
> Description             = SAN Point Sybase DB
> Trace           = No
> Servername              = 204.151.176.177

Servername do not point do a real server (DNS or ip) but to freetds.conf
servername. If you use DBD::Sybase I would suggest to specify Servername
with entry in freetds.conf (or you can use Server with ip address).

> Database                = visdb
> Trace           = Yes
> TraceFile       = visdb.log
> UID             = DBA
> 
...


bye
  freddy77


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

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


End of FreeTDS Digest, Vol 16, Issue 24
***************************************




This transmission may contain information that is privileged, confidential and/or exempt from disclosure under applicable law. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein (including any reliance thereon) is STRICTLY PROHIBITED. If you received this transmission in error, please immediately contact the sender and destroy the material in its entirety, whether in electronic or hard copy format. Thank you.




More information about the FreeTDS mailing list