Access MS SQL data

G

Gene Leung

Hi all,

Is it possible for ruby to access Microsoft SQL Server data under linux
? Also for windows platform?

Thanks!!

B/R
Gene Leung
 
M

Michael Neumann

Gene said:
Hi all,

Is it possible for ruby to access Microsoft SQL Server data under linux
? Also for windows platform?

It is possible.
On Windows, you can use either Ruby/ODBC or Ruby/DBI with the ODBC or
ADO drivers (and SQLRelay?).

If you want to access the database from Linux, you need to run a
proxy-server on the windows-machine (ships with Ruby/DBI). But this
approach is of course not optimal, it might be too much overhead for
your purposes.

Regards,

Michael
 
N

Nathaniel Talbott

Is it possible for ruby to access Microsoft SQL Server data under
linux?

I've successfully used a combination of Ruby/ODBC, unixodbc and FreeTDS
to access SQL Server from Linux. I did have to track down and get fixes
for a few bugs in FreeTDS, though...


Nathaniel
Terralien, Inc.

<:((><
 
S

Shashank Date

Hi Nathaniel,

--- Nathaniel Talbott said:
I've successfully used a combination of Ruby/ODBC,
unixodbc and FreeTDS
to access SQL Server from Linux. I did have to track
down and get fixes for a few bugs in FreeTDS,

I am interested in learning the details of this
process ... what fixes did you track down ?

Thanks,
-- shanko




__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail
 
S

Shashank Date

--- Michael Neumann said:
It is possible. On Windows, you can use either
Ruby/ODBC or Ruby/DBI with the ODBC or ADO drivers

I have done all of the above and it works !
If you want to access the database from Linux, you
need to run a proxy-server on the windows-machine
ships with Ruby/DBI).

Hmmm ... never tried this. Will have to give it a
spin.

-- shanko



__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail
 
N

Nathaniel Talbott

I am interested in learning the details of this
process ... what fixes did you track down ?

Basically bugs (and/or omissions) in FreeTDS that my code in particular
triggered... all of the fixes have made their way back in to FreeTDS.


Nathaniel
Terralien, Inc.

<:((><
 
N

Nathaniel Talbott

Which of those modules calls FreeTDS and how does it plug in?

The link was (DBI is optional):

Ruby -> (DBI) -> Ruby/ODBC -> unixodbc -> FreeTDS -> MS SQL Server

Should Ruby or DBI have a direct wrapper for FreeTDS?

A Ruby wrapper for FreeTDS would be great, and adapting it to DBI would
be a cinch. I just didn't have the time, inclination, or skills to
write one when I needed access, and using ODBC worked OK.

I'm in the situation of needing to access MS SQL Server from Linux
also (not just Ruby), so I'm interested to know of any pitfalls with
FreeTDS, if you care to share.

The main issue with FreeTDS is one of maturity; the protocol is fairly
complex, especially since they're trying to support multiple versions
of it for multiple databases which have varying sets of functionality.
When I ran in to trouble, the FreeTDS list was pretty helpful, and the
code wasn't terrible to figure out either. Most the problems actually
had to do with the ODBC part of FreeTDS, so a direct wrapper would
probably be more stable.

I don't know that I can tell you much more than that, except to say
that out of all the pieces of the project I was working on, the link to
SQL Server produced the most headaches. I wouldn't do it lightly, and I
would write a direct FreeTDS wrapper if you can.

HTH,


Nathaniel
Terralien, Inc.

<:((><
 
M

Michael Neumann

Clifford said:
Which of those modules calls FreeTDS and how does it plug in?
Should Ruby or DBI have a direct wrapper for FreeTDS?

yes ;-)

Regards,

Michael
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,271
Latest member
BuyAtenaLabsCBD

Latest Threads

Top