Solved

Creating a ODBC connection to Sybase ASE 12.5 db

Posted on 2004-09-12
6
3,007 Views
Last Modified: 2012-08-14
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


0
Comment
Question by:dttai
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 19

Assisted Solution

by:grant300
grant300 earned 20 total points
ID: 12040522
Have you used the dsedit facility on the XP box to setup the interfaces file?  Run it and make sure you can do a dbPing.  Then you have narrowed the problem down to the ODBC portion of the environment.

Also, once you have the interfaces file straightened out, it should only be necessary to specify the SID, not the IP address and port.

Bill
0
 

Author Comment

by:dttai
ID: 12045665
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
0
 

Author Comment

by:dttai
ID: 12045795
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
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 19

Expert Comment

by:grant300
ID: 12046041
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?

0
 

Author Comment

by:dttai
ID: 12046182
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
0
 
LVL 14

Accepted Solution

by:
Jan_Franek earned 30 total points
ID: 12052933
AFAIK, you don't need any server side instalation to use ODBC Sybase Wire Protocol.

Check, what IP address is bound to myHOSTNAME on your server - I suspect, that it's localhost (127.0.0.1). If it's true, it means, that your ASE listens only to connection from this local address. You have to change your interfaces on server to use the same IP address that you enter in ODBC connection.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will be converting StringData saved within a text file into a hash table. This can be further used in a PowerShell script for replacing settings that are dynamic in nature from environment to environment.
Gain an elementary understanding of Blockchain technology.
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question