Solved

Creating a ODBC connection to Sybase ASE 12.5 db

Posted on 2004-09-12
6
2,963 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
  • 3
  • 2
6 Comments
 
LVL 19

Assisted Solution

by:grant300
grant300 earned 20 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 19

Expert Comment

by:grant300
Comment Utility
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
Comment Utility
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
Comment Utility
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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
A procedure for exporting installed hotfix details of remote computers using powershell
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

762 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now