on 10-16-2015 7:28 PM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Claudio,
In my case it´s the opposite, Sybase is running in Linux and SQL express needs to access it.
Server\> odbcinst -j
unixODBC 2.3.0
DRIVERS............: /etc/unixODBC/odbcinst.ini
SYSTEM DATA SOURCES: /etc/unixODBC/odbc.ini
FILE DATA SOURCES..: /etc/unixODBC/ODBCDataSources
USER DATA SOURCES..: /root/.odbc.ini
SQLULEN Size.......: 8
SQLLEN Size........: 8
SQLSETPOSIROW Size.: 8
I think I have to adjust odbc.ini and odbcinst.ini but I´m not sure if I have to download any other library...
Server\> rpm -q unixODBC
unixODBC-2.3.0-258.1
Thanks,
Maverick
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.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.