Topic
  • 5 replies
  • Latest Post - ‏2013-02-07T07:09:18Z by SystemAdmin
SystemAdmin
SystemAdmin
1283 Posts

Pinned topic FreeTDS on windows?

‏2013-02-06T11:12:30Z |
Hi,

I'm trying to setup FreeTDS on my windows machine to query objectserver (via perl) but unable to setup. Perhaps something is missing. Here is what I've done

1> installed FreeTDS at C:\IBM\Tivoli\FreeTDS
2> set env variable FREETDS as C:\IBM\Tivoli\FreeTDS\etc, the freetds.conf file is there
3> my freetds.conf file located at %FREETDS%

global
host = localhost
instance = .
port = 4100
client charset = UTF-8
dump file = C:\IBM\Tivoli\FreeTDS\etc\freeTDS.log
tds version = 8.0
text size = 20971520

AGG_P
host = 127.0.0.1
port = 4100
tds version = 7.0

4> But when I do tsql.exe -C I get

C:\IBM\Tivoli\FreeTDS>tsql.exe -C
Compile-time settings (established with the "configure" script)
Version: freetds v0.91RC2
freetds.conf directory: /mingw/etc
MS db-lib source compatibility: no
Sybase binary compatibility: no
Thread safety: yes
iconv library: yes
TDS version: 7.0
iODBC: no
unixodbc: yes
SSPI "trusted" logins: no
Kerberos: no

5> when i try to run tsql and connect
C:\IBM\Tivoli\FreeTDS>tsql.exe -H localhost -p 4100 -U root
Password:

locale is "English_United States.1252"
locale charset is "CP1252"
using default charset "CP1252"

From there I need to disconnect ..nothing happens.

Can someone throw some light as to where I'm going wrong, since in step 5 I should be getting the sql prompt "1>" where I can run omnibus sql

Much appreciated!

Regards,
Abhishek
Updated on 2013-02-07T07:09:18Z at 2013-02-07T07:09:18Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    1283 Posts

    Re: FreeTDS on windows?

    ‏2013-02-06T11:24:25Z  
    6> Also this error, unknown host machine

    C:\IBM\Tivoli\FreeTDS>tsql.exe -S AGG_P -p 4100 -U root
    Password:

    Error 20012 (severity 2):
    Server name not found in configuration files.
    locale is "English_United States.1252"
    locale charset is "CP1252"
    using default charset "CP1252"
    Error 20013 (severity 2):
    Unknown host machine name.
    There was a problem connecting to the server
  • Venkat_GulfSoft
    Venkat_GulfSoft
    5 Posts

    Re: FreeTDS on windows?

    ‏2013-02-06T13:21:45Z  
    Hi,

    I am not sure about the FreeTDS Perl method, but we have developed a free Java based FreeTDS client that is real easy to setup and can be used to run Objectserver SQLs just like you're are trying to do.

    http://blog.gulfsoft.com/2010/01/gbsncosql-user-guide.html

    It is free and I can send you a copy if you are interested.

    Thanks,
    with warm regards,
    Venkat Saranathan.
    Gulf Breeze Software.
  • gulfsoft
    gulfsoft
    25 Posts

    Re: FreeTDS on windows?

    ‏2013-02-06T17:18:29Z  
    6> Also this error, unknown host machine

    C:\IBM\Tivoli\FreeTDS>tsql.exe -S AGG_P -p 4100 -U root
    Password:

    Error 20012 (severity 2):
    Server name not found in configuration files.
    locale is "English_United States.1252"
    locale charset is "CP1252"
    using default charset "CP1252"
    Error 20013 (severity 2):
    Unknown host machine name.
    There was a problem connecting to the server
    You should look in your \windows\system32\drivers\etc\hosts file to make sure that there's an entry that looks like:

    127.0.0.1 localhost

    It looks like the above line doesn't exist in your hosts file, and that's the cause of the "unknown host" error.

    Frank
    We can make Tivoli software work for you!
    www.gulfsoft.com
  • SystemAdmin
    SystemAdmin
    1283 Posts

    Re: FreeTDS on windows?

    ‏2013-02-07T02:28:18Z  
    Hi,

    I am not sure about the FreeTDS Perl method, but we have developed a free Java based FreeTDS client that is real easy to setup and can be used to run Objectserver SQLs just like you're are trying to do.

    http://blog.gulfsoft.com/2010/01/gbsncosql-user-guide.html

    It is free and I can send you a copy if you are interested.

    Thanks,
    with warm regards,
    Venkat Saranathan.
    Gulf Breeze Software.
    Hi Venkat,
    I am not able to find the download link, it gives me the document link, could you please send me a copy at isp.suresh@gmail.com .
    Thanks..
  • SystemAdmin
    SystemAdmin
    1283 Posts

    Re: FreeTDS on windows?

    ‏2013-02-07T07:09:18Z  
    Hi Venkat,
    I am not able to find the download link, it gives me the document link, could you please send me a copy at isp.suresh@gmail.com .
    Thanks..
    Got the error fixed. It was the 'tds version' property which was causing trouble. Searched online and found '5' to be the right value for sybase type db. Here is the freetds.conf file
    Then the 'text size' line was giving syntax error, not sure why. Just commented that and its running fine.

    Thanks for support!

    AGG_P
    host = 127.0.0.1
    port = 4100
    tds version = 5.0
    C:\IBM\Tivoli\FreeTDS>tsql -S AGG_P -U root
    Password:

    locale is "English_United States.1252"
    locale charset is "CP1252"
    using default charset "UTF-8"
    1> select count(*) from alerts.status
    2> go
    COUNT( * )
    31
    (1 row affected)
    1>