LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 06-10-2005, 03:06 PM   #1
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Colombia
Distribution: Kubuntu, Debian, Knoppix
Posts: 1,982
Blog Entries: 1

Rep: Reputation: 83
unixODBC and sybase


I'm trying to connect to a sybase DB, but i've been unable to.

This is my .odbc.ini file:
Code:
[ODBC Data Sources]
Smile=DB de Smile

[Smile]
Driver=/opt/sybase/SYBSsa9/lib/libdbodbc9_r.so
UID=x
PWD=y
CommLinks=tcpip
ServerName=fhep_cluster01

[ODBC]
InstallDir=/opt/sybase/SYBSsa9/drivers
When I try to connect with isql, I get this:
Code:
$ isql Smile -v
[08001][unixODBC][Sybase][ODBC Driver][Adaptive Server Anywhere]Unable to connect to database server: Database server not found
[ISQL]ERROR: Could not SQLConnect
I know I've always had to setup JDBC connections giving the IP address and the port of the service, and that normally doesn't fail. This is the first time I try with ODBC, but haven't been able to.
Is there a way I can tell it to use a ip address and a port?
What are the things that I can setup in the ODBC file? I didn't get much information in the ASA Documentation.

Is there a way to ask isql (or unixODBC) to be more verbose on the things that are happening? I noticed that there is no traffic going to the DB server form my host (with tcpdump).

Maybe I can setup a ODBC DSN that uses a JDBC connection, which I know won't fail. Is this possible?
 
Old 06-13-2005, 10:22 AM   #2
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Colombia
Distribution: Kubuntu, Debian, Knoppix
Posts: 1,982
Blog Entries: 1

Original Poster
Rep: Reputation: 83
Well... I've been able to make a step forward (finally).

It turns out that the odbc driver is trying to stablish a remote connection through localhost. Take a look at the log:


Code:
mon jun 13 2005 11:17:41
11:17:41 Application information:
11:17:41 "IP=127.0.0.1;HOST=galileo;OS=Linux 2.6.3-7mdk #1 Wed Mar 17 15:56:42 CET 2004;PID=0xef3;THREAD=0x402962a0;VERSION=9.0.0.1120;API=ODBC;TIMEZONEADJUSTMENT=-240"
11:17:41 Attempting to connect using:
********PWD=********;ENG=192.168.0.3;CON=SQL_DBC_8084c18;LOG=/home/antoranz/odbc.smile.log;LINKS=tcpip
11:17:41 Attempting to connect to a running server...
11:17:41 Trying to start TCPIP link ...
11:17:41 My IP address is 127.0.0.1
11:17:41 My IP address is 127.0.0.1
11:17:41     TCPIP link started successfully
11:17:41 Attempting TCPIP connection (no .asasrv.ini cached address)
11:17:41 LDAP routines could not be found, LDAP support disabled
11:17:41 Looking for server with name 192.168.0.3
11:17:41 I am in a class A network
11:17:41 Sending broadcast to find server
11:17:41 Using broadcast address of: 127.255.255.255:2638
11:17:41 I am in a class A network
11:17:41 Sending broadcast to find server
11:17:41 Using broadcast address of: 127.255.255.255:2638
11:17:42 Resending
11:17:43 Resending
11:17:44 Resending
11:17:45 Resending
11:17:46     Server not found (no reply received)
11:17:46 Failed to connect over TCPIP
11:17:46 Not attempting to autostart server
11:17:46 Cannot connect to server
What's the missing point here? Why is it broadcasting the 127/24 segment? Shouldn't it realize I'm trying to reach 192.0.0/8? (look at the server address in the log file).

Maybe there's a way to force unixODBC to use my IP adress. Is there any?
 
Old 06-13-2005, 10:43 AM   #3
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Colombia
Distribution: Kubuntu, Debian, Knoppix
Posts: 1,982
Blog Entries: 1

Original Poster
Rep: Reputation: 83
was afiannly able to connect to the DB server.

I had to set some parameters at the CommLinks parameter:
Code:
CommLinks=tcpip(MyIP=192.168.0.240;IP=192.168.0.3:2638; )
 
Old 12-20-2005, 01:54 PM   #4
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Colombia
Distribution: Kubuntu, Debian, Knoppix
Posts: 1,982
Blog Entries: 1

Original Poster
Rep: Reputation: 83
It's been quite a while since the last post... but I'm back in trouble. :'(

I have switched my box tu ubuntu (kubuntu, as a matter of fact) beezy. Just installed unixodbc, and have to make a little modification for the config file, but I only get this message when I run isql:

Code:
$ isql Smile -v
[01000]▒
[ISQL]ERROR: Could not SQLConnect
And that's it. And not even the log is written, so I guess it's not a problem of the Driver but odbc itself. Any ideas what I'm doing wrong?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
myODBC and unixODBC LandRoverMan Programming 2 04-21-2009 06:14 AM
unixODBC - Error amorzaria Debian 0 07-12-2005 04:01 PM
PHP and Sybase snickers Programming 2 03-02-2005 08:23 PM
sybase with perl Xris718 Programming 0 02-18-2005 02:17 PM
unixODBC ottavio78 Linux - Software 1 12-15-2003 07:26 AM


All times are GMT -5. The time now is 04:42 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration