Link to home
Start Free TrialLog in
Avatar of dttai
dttai

asked on

Creating a ODBC connection to Sybase ASE 12.5 db

hello experts,
I need to create an ODBC connection for Sybase.
Client machine: XP using DataDirect ODBC driver
Server machine: Redhat with Sybase ASE 12.5
I am a newbie to Sybase by the way, so please forgive my naiveness.
Anway, here is what I did to try to create a connection to my Sybase server
1) Start my db in Sybase. I think it is running ok, since I can do query in isql fine.
2) in my XP box: I added an ODBC data source by using DataDirect 5.0 Sybase Wire Protocol, and I used the following info for the pop up windows
Network Libarary Name: winsock
Network address: {the IP from my Linux box (I know for sure it's correct)}, {port number to connect to sybase} (e.x: x.x.x.x, 7543)
Database Name: SID for the running db in my linux box

However, when I run Test Connect (after entering sa/password) , it said
"Connection refused. Verify host name and port number"
Well, I double check the IP address and port number :), and it still didn't work?
Could you please give me some hints to sovle this problem?
thanks,
Do


SOLUTION
Avatar of grant300
grant300

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dttai
dttai

ASKER

Grant300,
Not quite understand your comments :).
dsedit is an utility of Sybase ASE??? In that case, it resides on my linux box (server) not XP box (client) right?
Thanks,
Do
Avatar of dttai

ASKER

Grant300,
I check my interfaces file (from $SYBASE_HOME/interfaces) in the Redhat server box, it has the following info

SYBASE
        master tcp ether myHOSTNAME 7543
        query tcp ether myHOSTNAME 7543
 
SYB_BACK
        master tcp ether myHOSTNAME 7544
        query tcp ether myHOSTNAME 7544

Note that: it uses the host name, not the IP. Is it the problem since in the XP box, I used the server IP to feed the ODBC connection. My linux box doesn't belong to the domain, where the XP resides though.
Thanks,
Do
Normally, ODBC drivers simply sit on top of the native database client network connectivity product, e.g. CTlib.  After a closer look at your question, I realized you are using DataDirect which works a bit differently.

The DataDirect Connect product does thing a bit differently.  It places the database-specific code on the server side and uses it's own, generic network connection and command protocol.  That way, each client need only have DataDirect installed, not the database-specific network component.

I guess the big question is, do you have DataDirect configured correctly on the server side?  From the error message, I would suggest that the problem is there rather than the client.

For instance, while the IPADDR is the same for both DataDirect and CTlib, the PORT number should be different.  One port connects directly to Sybase if you are a CTlib client.  The other port is for DataDirect wire protocol clients to connect to the DataDirect server component.  When you connect with ISQL, what arguments are you using and what is the setup in the interfaces file?

Avatar of dttai

ASKER

1) I didn't realize that I need to install and configure DataDirect on my server side. I thought that to set up an ODBC connection, I just need to create the connection string on the client side :).
I'll look at DataDirect website for Linux version of the software so that I can install on the server side.
2) When I connect with ISQL:
+ if from the server machine itself, it's as simple as >isql -U{username} -P{pass}
+ if from the XP client through SSH for example, IP is same, port is 23 for ssh, then connect to isql same as above
3) The setup in the interface file is posted in my previous comment.
Thanks,
Do
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial