Remote Server via ODBC...
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Free Databases support forum > Sqlanywhere > SqlAnywhere on Linux > Remote Server via ODBC... Thread Rating: 1 votes, 4.00 average.




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Remote Server via ODBC...  
Michael Landon


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-05-04 12:48 PM

Xref: number1.nntp.dca.giganews.com sybase.public.sqlanywhere.linux:1124

ASA 8.0.2 (4402)
RH 7.3

Need some help getting Remote Server working via ODBC under Linux.  In our
testbed, I have been able to successfully create a remote server using JDBC.
(from my understanding, this would using something like jConnect to
establish the connection???)  However, I would like to be able to setup the
remote server w/out first enabling the "Java Option" on the engine and then
installing Java in my dB (plus, from what I read, isn't ODBC faster?).  So,
I've been messing around w/ ODBC on Linux.  I have tried using dbdsn to
create an odbc.ini file w/ the correct parameters (and then use that DSN via
Sybase Central to create a proxy table), but I just get the "cannot connect
to 'remote_db'" error message.  I've tried moving the .odbc.ini file all
over the place (to locations that are definitely in the PATH), but still no
luck.  I've tested the individual connection parameters under Windows & via
a Java app that I wrote & they work just fine.  What am I leaving out?

TIA.
Michael







[ Post a follow-up to this message ]



    Re: Remote Server via ODBC...  
David Fishburn


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-05-04 10:45 PM

"Michael Landon" <mlandon@i_removeme_bnads.com> wrote in
news:41110df8$1@forums-1-dub:

ML> ASA 8.0.2 (4402)
ML> RH 7.3
ML>
ML> Need some help getting Remote Server working via ODBC under Linux.
In
ML> our testbed, I have been able to successfully create a remote server
ML> using JDBC. (from my understanding, this would using something like
ML> jConnect to establish the connection???)  However, I would like to be
ML> able to setup the remote server w/out first enabling the "Java
Option"
ML> on the engine and then installing Java in my dB (plus, from what I
ML> read, isn't ODBC faster?).

As far as I am aware, this does *not* require Java *in* the database.
Did you try it?


ML> So, I've been messing around w/ ODBC on
ML> Linux.  I have tried using dbdsn to create an odbc.ini file w/ the
ML> correct parameters (and then use that DSN via Sybase Central to
create
ML> a proxy table), but I just get the "cannot connect to 'remote_db'"
ML> error message.  I've tried moving the .odbc.ini file all over the
ML> place (to locations that are definitely in the PATH), but still no
ML> luck.  I've tested the individual connection parameters under Windows
ML> & via a Java app that I wrote & they work just fine.  What am I
ML> leaving out?

Have you tried using the ODBC connection (outside of the CREATE SERVER
command) from an external application?

Show us the .odbc.ini values, maybe we can offer futher suggestions.

--
David Fishburn
Certified ASA Developer Version 8
iAnywhere Solutions - Sybase
Professional Services
Please only post to the newsgroup
Please ALWAYS include version and MORE importantly BUILD number with
EACH post (dbeng9 -v).

EBFs and Maintenance Releases
http://downloads.sybase.com/swx/sdmain.stm

Developer Community / Whitepapers
http://www.ianywhere.com/developer

CaseXpress - to report bugs
http://casexpress.sybase.com

CodeXchange - Free samples
http://ianywhere.codexchange.sybase...ectDocumentList






[ Post a follow-up to this message ]



    Re: Remote Server via ODBC...  
Michael Landon


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-05-04 10:45 PM

(sorry, emailed this the first time, instead of posting...)

>As far as I am aware, this does *not* require Java *in* the database.
>Did you try it?

Yes.  This is the process we went through:
- Via Sybase Central, tried to create a remote server but JDBC option
was grayed out
- Enabled Java option for the dB engine (restarted engine)
- Via Sybase Central, tried again to create a remote server but JDBC
option was still grayed out
- Ran "ALTER DATABASE UPGRADE Java ON" (Java classes loaded)
- Via Sybase Central, created a JDBC remote server (worked)
- Created external login mapping(s)
- Tried to create proxy table based on the remote server above (JVM
could not be started error)
- Restarted dB engine
- Created proxy table (worked)


>Have you tried using the ODBC connection (outside of the CREATE SERVER
>command) from an external application?

Not exactly.  I've never been able to get a DSN to work, however I've been
able to take the same ODBC parameters and use them w/ the iAnywhere
JDBC/ODBC driver and it always works.


>Show us the .odbc.ini values, maybe we can offer futher suggestions.

[ODBC Data Sources]
ASA8dsn=Adaptive Server Anywhere 8.0

[ASA8dsn]
CommLinks=tcpip(host=xxx.xxx.xxx.xxx;DoBroadcast=no)
Userid=myuid
Password=mypwd
ServerName=ASA8


(host, uid, & pwd have been changed to protect the innocent...)








[ Post a follow-up to this message ]



    Re: Remote Server via ODBC...  
David Fishburn


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-11-04 12:45 PM

"Michael Landon" <mlandon@i_removeme_bnads.com> wrote in
news:411265cf$1@forums-2-dub:

ML>>As far as I am aware, this does *not* require Java *in* the database.
ML>>Did you try it?
ML>
ML> Yes.  This is the process we went through:
ML>     - Via Sybase Central, tried to create a remote server but JDBC
ML>     option
ML>         was grayed out
ML>     - Enabled Java option for the dB engine (restarted engine)
ML>     - Via Sybase Central, tried again to create a remote server but
ML>     JDBC
ML>         option was still grayed out
ML>     - Ran "ALTER DATABASE UPGRADE Java ON" (Java classes loaded)
ML>     - Via Sybase Central, created a JDBC remote server (worked)
ML>     - Created external login mapping(s)
ML>     - Tried to create proxy table based on the remote server above
ML>     (JVM
ML>         could not be started error)
ML>     - Restarted dB engine
ML>     - Created proxy table (worked)

You are right, and I did find this in the documentation:

ASA SQL User's Guide
Server Classes for Remote Data Access
JDBC-based server classes

-------------------------------------------------------------------------
-------

JDBC-based server classes are used when Adaptive Server Anywhere
internally uses a Java virtual machine and jConnect 4.0 to connect to
the remote server. The JDBC-based server classes are:

asajdbc    Adaptive Server Anywhere (version 6 and later).
asejdbc    Adaptive Server Enterprise and SQL Server (version 10 and
later).

--
David Fishburn
Certified ASA Developer Version 8
iAnywhere Solutions - Sybase
Professional Services
Please only post to the newsgroup
Please ALWAYS include version and MORE importantly BUILD number with
EACH post (dbeng9 -v).

EBFs and Maintenance Releases
http://downloads.sybase.com/swx/sdmain.stm

Developer Community / Whitepapers
http://www.ianywhere.com/developer

CaseXpress - to report bugs
http://casexpress.sybase.com

CodeXchange - Free samples
http://ianywhere.codexchange.sybase...ectDocumentList






[ Post a follow-up to this message ]



    Re: Remote Server via ODBC...  
David Fishburn


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-11-04 12:45 PM

"Michael Landon" <mlandon@i_removeme_bnads.com> wrote in
news:411265cf$1@forums-2-dub:

ML>>Have you tried using the ODBC connection (outside of the CREATE
SERVER
ML>>command) from an external application?
ML>
ML> Not exactly.  I've never been able to get a DSN to work, however I've
ML> been able to take the same ODBC parameters and use them w/ the
ML> iAnywhere JDBC/ODBC driver and it always works.
ML>
ML>
ML>>Show us the .odbc.ini values, maybe we can offer futher suggestions.
ML>
ML> [ODBC Data Sources]
ML> ASA8dsn=Adaptive Server Anywhere 8.0
ML>
ML> [ASA8dsn]
ML> CommLinks=tcpip(host=xxx.xxx.xxx.xxx;DoBroadcast=no)
ML> Userid=myuid
ML> Password=mypwd
ML> ServerName=ASA8

I think the problem is you are missing the Driver line, that would make
sense that it works via the iAnywhere ODBC driver since it is already
loaded.

Also in this section of the docs:

ASA SQL Reference
SQL Statements
CREATE SERVER statement


...
On UNIX platforms, you need to reference the ODBC driver manager as
well. For example, using the supplied iAnywhere Solutions ODBC drivers,
the syntax is as follows:

USING 'driver=/opt/sybase/SYBSsa9/drivers/lib/libodbc.so;dsn=my_dsn'

I *suspect* you do not need to do this if you have the Driver line in
your .odbc.ini, but it sounds like you should try both.


--
David Fishburn
Certified ASA Developer Version 8
iAnywhere Solutions - Sybase
Professional Services
Please only post to the newsgroup
Please ALWAYS include version and MORE importantly BUILD number with
EACH post (dbeng9 -v).

EBFs and Maintenance Releases
http://downloads.sybase.com/swx/sdmain.stm

Developer Community / Whitepapers
http://www.ianywhere.com/developer

CaseXpress - to report bugs
http://casexpress.sybase.com

CodeXchange - Free samples
http://ianywhere.codexchange.sybase...ectDocumentList






[ Post a follow-up to this message ]



    Re: Remote Server via ODBC...  
Michael Landon


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-24-04 11:54 PM

Xref: number1.nntp.dca.giganews.com sybase.public.sqlanywhere.linux:1153

> ML>>Show us the .odbc.ini values, maybe we can offer futher suggestions.
> ML>
> ML> [ODBC Data Sources]
> ML> ASA8dsn=Adaptive Server Anywhere 8.0
> ML>
> ML> [ASA8dsn]
> ML> CommLinks=tcpip(host=xxx.xxx.xxx.xxx;DoBroadcast=no)
> ML> Userid=myuid
> ML> Password=mypwd
> ML> ServerName=ASA8
>
> I think the problem is you are missing the Driver line, that would make
> sense that it works via the iAnywhere ODBC driver since it is already
> loaded.
>
> USING 'driver=/opt/sybase/SYBSsa9/drivers/lib/libodbc.so;dsn=my_dsn'
>
> I *suspect* you do not need to do this if you have the Driver line in
> your .odbc.ini, but it sounds like you should try both.


I finally got around to testing this & it worked just fine after adding:

Driver=/opt/sybase/SYBSsa8/lib/libdbodbc8_r.so

to the odbc.ini file.  Thank you!

It would be nice if the docs related to UNIX & ODBC would include a little
blurb about this.  I couldn't find anything pertaining to dbdsn that
indicated that you'd need to add in the driver information.

Again, thank you.
Michael







[ Post a follow-up to this message ]



Chris V is offline     ODBC works but Remote server doesnt  
Chris V


View Ip Address Report This Message To A Moderator Edit/Delete Message


Click Here to See the Profile for Chris V Click here to Send Chris V a Private Message Find more posts by Chris V Add Chris V to your buddy list
 
08-31-04 03:05 PM

I check by me ODBC with a small C code, and it just works fine. But anytime 
I try to create my proxy table, I recieve :
[Sybase][ODBC Driver][Adaptive Server Anywhere]Unable to connect to server 'lpo':  
SQLCODE: -656
SQLSTATE: HY000

lpo is my name for the remote server.

lpo's connection information at Sybase Central, Remote Server Properties is 
the DSN name of my ODBC connection.

Any idea, what can be wrong?

Thanks

Chris




[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 07:35 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register