Skip to Content.
Sympa Menu

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

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: jun_chen AT bankone.com
  • To: freetds AT lists.ibiblio.org
  • Subject: [freetds] RE: [ISQL]ERROR: Could not SQLConnect
  • Date: Mon, 7 Jun 2004 15:29:15 -0400

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.





Archive powered by MHonArc 2.6.24.

Top of Page