?
Solved

Creating a ODBC connection to Sybase ASE 12.5 db

Posted on 2004-09-12
6
Medium Priority
?
3,022 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 80 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
Get MySQL database support online, now!

At Percona’s web store you can order your MySQL database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card.

 
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 120 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Active Directory can easily get cluttered with unused service, user and computer accounts. In this article, I will show you the way I like to implement ADCleanup..
If you're a modern-day technology professional, you may be wondering if certifications are really necessary. They are. Here's why.
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

770 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