Skip to Content
avatar image
Former Member

How to access Sybase ASE16 with ODBC?

Hello,

I have a SAP System 7.4 running under LinuX Suse and Sybase ASE 16. My developers need to access Sybase using OBDC, these external database runs under Windows and it´s SQL Express. I think the way to go is using unixODBC, but I don´t know how to set it. unixODBC is already install, but I´m not sure if I need an additional library or how to set it.

Any clue?

Thanks,

Maverick

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Nov 04, 2015 at 08:06 AM

    Hello,

    My problem is solved. The solution was to install the unixODBC and the driver for SQL server for Linux directly from Microsoft. Make sure to fix any possible error when you run the SQL driver...

    If it is installed correctly, you can test executing something like this:

    sqlcmd -S<IP> -U<user> -P<password> <---This is the info for the SQL Server you want to connect.

    1> select @@version

    2> go

    Regards,

    Miguel

    Add comment
    10|10000 characters needed characters exceeded

    • Miguel

      Great that you got the connection working.

      So you are accessing SQL Express on Windows from ASE on Linux using unixODBC.

      For benefit of SCN members why don't you create document and publish it ?

      Details of steps to get ODBC working across two flavors of OS's and two flavors of databases will be interesting.

      Also the sqlcmd you ran was it on Windows or Linux ?

      Regards

      Avinash

  • avatar image
    Former Member
    Oct 16, 2015 at 08:10 PM

    Hi,

    If you have ASE running on Windows and want to access it from Linux, you can install ASE ct-lib client library or freeTDS (www.freetds.org) in Linux. Then configure a Odbc Data Source in /etc/odbc.ini :

    [ASEWIN]

    Driver = /usr/lib64/libtdsodbc.so

    Description = ASE

    Trace = No

    Server = 192.168.01.140 (windows machine's IP)

    Port = 5000

    Database = master

    UID = sa

    Use isql from unixODBC to access ASE:

    isql ASEWIN sa 'password'

    +---------------------------------------+

    | Connected! |

    | |

    | sql-statement |

    | help [tablename] |

    | quit |

    | |

    +--------------------------------------

    SQL> sp_spaceused

    +--------------+--------------+

    | database_name| database_size|

    +--------------+--------------+

    | master | 26.0 MB |

    +--------------+--------------+

    SQLRowCount returns -1

    1 rows fetched

    +---------+--------+-----------+--------+

    | reserved| data | index_size| unused |

    +---------+--------+-----------+--------+

    | 12272 KB| 6292 KB| 1124 KB | 4856 KB|

    +---------+--------+-----------+--------+

    SQLRowCount returns -1

    1 rows fetched

    SQL>

    Add comment
    10|10000 characters needed characters exceeded

    • So if I understood the scenario, you have SAP ASE running on Linux system and some Windows machines/clients need to access it using ODBC? If so, you would need to download "SDK for SAP ASE" for Windows platform and install it to obtain ASE ODBC Driver for Windows. Since this is Windows, the ASE ODBC Driver will use the ODBC Driver manager on Windows, no unixODBC needed.