Solved

Creating a ODBC connection to Sybase ASE 12.5 db

Posted on 2004-09-12
6
2,999 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: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Not everyone has adapted to a rapid advancement in technology; there are people who are reluctant or afraid to delve into this brave new world of IT. If you have a friend or a family member who suffers from the so-called technophobia, here is how yo…
CTAs encourage people to do something specific to show interest in your company, product or service. Keep reading to learn why CTAs should always be thought of as extremely important, albeit small, sections of websites.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

739 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