[freetds] Problems with isql

Igor Korot ikorot at earthlink.net
Fri May 9 14:05:15 EDT 2008


Igor,

-----Original Message-----
>From: Igor <igorhmm at gmail.com>
>Sent: May 9, 2008 10:27 AM
>To: Igor Korot <ikorot at earthlink.net>, FreeTDS Development Group <freetds at lists.ibiblio.org>
>Subject: Re: [freetds] Problems with isql
>
>Hi Igor :)
>
>This server is my firewall... but this isn't the problem..
>
>I've installed bind to get /bin/host to work fine.. and now FreeTDS is
>trying to connect to correct server:
>
>[root at bsd ~]# osql -S LekkusLOJA -U $DBUSER -P $DBPASS
>looking for odbc.ini and odbcinst.ini in /usr/local/etc
>	reading "/root/.odbc.ini"
>[LekkusLOJA] not found in "/root/.odbc.ini"
>	reading "/usr/local/etc/odbc.ini"
>[LekkusLOJA] found in "/usr/local/etc/odbc.ini"
>found this section:
>	[LekkusLOJA]
>	Description = Lekkus LOJA
>	Driver = FreeTDS
>	Trace = No
>	Server = bzbraziline
>	Port = 1401
                ^^^^^

Are you sure that the server is listening on this port?

>	TDS_version = 8.0
>	Database = Lekkus
>	
>looking for driver for DSN [LekkusLOJA]
>driver "FreeTDS" found for [LekkusLOJA] in odbc.ini
>found driver named "FreeTDS"
>FreeTDS is not a readable file
>looking for entry named [FreeTDS] in /usr/local/etc/odbcinst.ini
>driver "/usr/local/lib/libtdsodbc.so" found for [FreeTDS] in odbcinst.ini
>/usr/local/lib/libtdsodbc.so is a readable file
>"Server" found, not using freetds.conf
>FreeTDS servername is "bzbraziline"
>bzbraziline has address 192.168.1.21
>
>                           DSN:	LekkusLOJA
>             Server's hostname:	bzbraziline
>                       Address:	192.168.1.21
>                        Driver:	/usr/local/lib/libtdsodbc.so
>
>Attempting connection as lekkus...
>[S1000][unixODBC][FreeTDS][SQL Server]Unable to connect to data source
>[ISQL]ERROR: Could not SQLConnect
>[root at bsd ~]#
>[root at bsd ~]# telnet 192.168.1.21 1401
>Trying 192.168.1.21...
>Connected to 192.168.1.21.
>Escape character is '^]'.
>
>The connection are allowed... DNS is working fine.. but still having
>problems to connect :-(
>
>Thanks

Also, what about firewall on the client side?

Thank you.

>
>Igor
>
>On Fri, May 9, 2008 at 2:06 PM, Igor Korot <ikorot at earthlink.net> wrote:
>> Igor,
>> Do you run any kind of firewall? Either on client or server?
>> Can you telnet to the machine?
>>
>> Thank you.
>>
>> -----Original Message-----
>>>From: Igor <igorhmm at gmail.com>
>>>Sent: May 9, 2008 9:51 AM
>>>To: FreeTDS Development Group <freetds at lists.ibiblio.org>
>>>Subject: Re: [freetds] Problems with isql
>>>
>>>Hi James, thanks for reply :)
>>>
>>>I guess now is easy to found error...
>>>
>>>I've installed 0.82 but I got the same error... looking with osql (a
>>>great tool, thanks) I can found the error but I don't know how to
>>>solve this...
>>>
>>>I guess the osql make a system call to /bin/host but on freebsd the
>>>returns is different from linux, take a look on error:
>>>
>>>[root at bsd ~]# osql -S LekkusLOJA -U $DBUSER -P $DBPASS
>>>looking for odbc.ini and odbcinst.ini in /usr/local/etc
>>>       reading "/root/.odbc.ini"
>>>[LekkusLOJA] not found in "/root/.odbc.ini"
>>>       reading "/usr/local/etc/odbc.ini"
>>>[LekkusLOJA] found in "/usr/local/etc/odbc.ini"
>>>found this section:
>>>       [LekkusLOJA]
>>>       Description = Lekkus LOJA
>>>       Driver = FreeTDS
>>>       Trace = No
>>>       Server = 192.168.1.21
>>>       Port = 1401
>>>       TDS_version = 8.0
>>>       Database = Lekkus
>>>
>>>looking for driver for DSN [LekkusLOJA]
>>>driver "FreeTDS" found for [LekkusLOJA] in odbc.ini
>>>found driver named "FreeTDS"
>>>FreeTDS is not a readable file
>>>looking for entry named [FreeTDS] in /usr/local/etc/odbcinst.ini
>>>driver "/usr/local/lib/libtdsodbc.so" found for [FreeTDS] in odbcinst.ini
>>>/usr/local/lib/libtdsodbc.so is a readable file
>>>"Server" found, not using freetds.conf
>>>FreeTDS servername is "192.168.1.21"
>>>192.168.1.21 has address Name: erp.braziline.com.br Address:
>>>192.168.1.21 Aliases: erp
>>>
>>>                           DSN:        LekkusLOJA
>>>             Server's hostname:        192.168.1.21
>>>                       Address:        Name:
>>>          erp.braziline.com.br:        Address:
>>>                  192.168.1.21:        Aliases:
>>>                           erp:
>>>                        Driver:        /usr/local/lib/libtdsodbc.so
>>>
>>>Attempting connection as lekkus...
>>>[S1000][unixODBC][FreeTDS][SQL Server]Unable to connect to data source
>>>[ISQL]ERROR: Could not SQLConnect
>>>
>>>Can you have any sugestion ?
>>>
>>>Thanks
>>>
>>>Igor
>>>
>>>On Fri, May 9, 2008 at 10:56 AM, James K. Lowden <jklowden at freetds.org> wrote:
>>>> Igor wrote:
>>>>>
>>>>> I've installed:
>>>>> - unixODBC-2.2.12
>>>>> - freetds-0.65.dev.20061107
>>>>>   (I've installed this versions because I get this working fine)
>>>>>
>>>>> The error:
>>>>>
>>>>> [root at bsd /usr/local/etc]# isql -v LekkusLOJA $DBUSER $DBPASS
>>>>> [S1000][unixODBC][FreeTDS][SQL Server]Unable to connect to data source
>>>>> [ISQL]ERROR: Could not SQLConnect
>>>>
>>>> Suggestions:
>>>>
>>>> 1.  Use 0.82.  It's what's for breakfast.
>>>> 2.  Try src/apps/osql to troubleshoot your ODBC setup.
>>>> 3.  TDSDUMP and TDSDUMPCONFIG will show how isql is trying to connect.
>>>>
>>>> HTH.
>>>>
>>>> --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
>>




More information about the FreeTDS mailing list