# Hurdles moving ruby programs from NT to Linux

**URL:** <https://rubytalk.org/t/hurdles-moving-ruby-programs-from-nt-to-linux/1923>\
**Category:** ruby-talk\
**Created:** [23 September 2002 12:15 UTC](https://rubytalk.org/t/hurdles-moving-ruby-programs-from-nt-to-linux/1923 "2002-09-23T12:15:22Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andrew\_Queisser1](https://avatars.discourse-cdn.com/v4/letter/a/a88e57/32.png) [@Andrew\_Queisser1](https://rubytalk.org/u/Andrew_Queisser1)\
**Post date:** [23 September 2002 12:15 UTC](https://rubytalk.org/t/hurdles-moving-ruby-programs-from-nt-to-linux/1923/1 "2002-09-23T12:15:22Z")

</div>

I’ve been using some Ruby programs on NT to access data on Oracle and  
MS SQLServer databases on two servers on our network. I’ve been using  
ADO but I’d be happy with ODBC or some other interface as well. The  
queries aren’t fancy and there’s not a whole lot of data being sent  
around so speed isn’t the primary concern.

Now I’d like to run the same scripts on a Linux box. Of course I don’t  
have ADO anymore but I can’t seem to find a direct way to access  
SQLServer. I’ve done some Google searches and found iODBC and unixODBC  
but they don’t seem to allow me to go to SQLServer directly.

What are my options?

Thanks much,  
Andrew Queisser

---

<div class="post-metadata">

**Author:** ![Shashank\_Date](https://avatars.discourse-cdn.com/v4/letter/s/dc4da7/32.png) [@Shashank\_Date](https://rubytalk.org/u/Shashank_Date)\
**Post date:** [23 September 2002 12:17 UTC](https://rubytalk.org/t/hurdles-moving-ruby-programs-from-nt-to-linux/1923/2 "2002-09-23T12:17:43Z")

</div>

Not speaking out of experience here, but have you looked at Ruby \>\> JRuby \>\>  
JDBC path ?

“andrew queisser” [andrew\_queisser@hp.com](mailto:andrew_queisser@hp.com) wrote in message  
[news:ad2f1094.0209200937.55d7d3fa@posting.google.com](mailto:news:ad2f1094.0209200937.55d7d3fa@posting.google.com)…

> **···**
>
> > I’ve been using some Ruby programs on NT to access data on Oracle and  
> > MS SQLServer databases on two servers on our network. I’ve been using  
> > ADO but I’d be happy with ODBC or some other interface as well. The  
> > queries aren’t fancy and there’s not a whole lot of data being sent  
> > around so speed isn’t the primary concern.
> > 
> > Now I’d like to run the same scripts on a Linux box. Of course I don’t  
> > have ADO anymore but I can’t seem to find a direct way to access  
> > SQLServer. I’ve done some Google searches and found iODBC and unixODBC  
> > but they don’t seem to allow me to go to SQLServer directly.
> > 
> > What are my options?
> > 
> > Thanks much,  
> > Andrew Queisser

---

<div class="post-metadata">

**Author:** ![Shashank\_Date](https://avatars.discourse-cdn.com/v4/letter/s/dc4da7/32.png) [@Shashank\_Date](https://rubytalk.org/u/Shashank_Date)\
**Post date:** [23 September 2002 12:30 UTC](https://rubytalk.org/t/hurdles-moving-ruby-programs-from-nt-to-linux/1923/3 "2002-09-23T12:30:48Z")

</div>

Also, take a look at :  
[www.freetds.org](http://www.freetds.org)  
[www.sqsh.org](http://www.sqsh.org).

HTH,

– shanko

“andrew queisser” [andrew\_queisser@hp.com](mailto:andrew_queisser@hp.com) wrote in message  
[news:ad2f1094.0209200937.55d7d3fa@posting.google.com](mailto:news:ad2f1094.0209200937.55d7d3fa@posting.google.com)…

> **···**
>
> > I’ve been using some Ruby programs on NT to access data on Oracle and  
> > MS SQLServer databases on two servers on our network. I’ve been using  
> > ADO but I’d be happy with ODBC or some other interface as well. The  
> > queries aren’t fancy and there’s not a whole lot of data being sent  
> > around so speed isn’t the primary concern.
> > 
> > Now I’d like to run the same scripts on a Linux box. Of course I don’t  
> > have ADO anymore but I can’t seem to find a direct way to access  
> > SQLServer. I’ve done some Google searches and found iODBC and unixODBC  
> > but they don’t seem to allow me to go to SQLServer directly.
> > 
> > What are my options?
> > 
> > Thanks much,  
> > Andrew Queisser

---

<div class="post-metadata">

**Author:** ![Ben\_Schumacher](https://avatars.discourse-cdn.com/v4/letter/b/e480ec/32.png) [@Ben\_Schumacher](https://rubytalk.org/u/Ben_Schumacher)\
**Post date:** [23 September 2002 13:28 UTC](https://rubytalk.org/t/hurdles-moving-ruby-programs-from-nt-to-linux/1923/4 "2002-09-23T13:28:56Z")

</div>

Andrew-

You might want to check out FreeTDS ([http://freetds.org/](http://freetds.org/)). Its a set of  
libraries developed under LGPL that is designed to natively support the  
protocol used by MS SQLServer on \*nix boxes. I don’t think there is a Ruby  
library for this yet, so you’d have to write it yourself.

You might, also, be able to use the Sybase-CT library available from the  
RAA at: [http://www.ruby-lang.org/en/raa-list.rhtml?name=sybase-ctlib](http://www.ruby-lang.org/en/raa-list.rhtml?name=sybase-ctlib)

The protocol that MSSQL uses is the same as the Sybase one.

Cheers,

bs.

> **···**
>
> On Mon, 23 Sep 2002, andrew queisser wrote:
> 
> > I’ve been using some Ruby programs on NT to access data on Oracle and  
> > MS SQLServer databases on two servers on our network. I’ve been using  
> > ADO but I’d be happy with ODBC or some other interface as well. The  
> > queries aren’t fancy and there’s not a whole lot of data being sent  
> > around so speed isn’t the primary concern.
> > 
> > Now I’d like to run the same scripts on a Linux box. Of course I don’t  
> > have ADO anymore but I can’t seem to find a direct way to access  
> > SQLServer. I’ve done some Google searches and found iODBC and unixODBC  
> > but they don’t seem to allow me to go to SQLServer directly.
> > 
> > What are my options?
> > 
> > Thanks much,  
> > Andrew Queisser

---

<div class="post-metadata">

**Author:** ![Chris\_Morris](https://avatars.discourse-cdn.com/v4/letter/c/6de8d8/32.png) [@Chris\_Morris](https://rubytalk.org/u/Chris_Morris)\
**Post date:** [23 September 2002 14:02 UTC](https://rubytalk.org/t/hurdles-moving-ruby-programs-from-nt-to-linux/1923/5 "2002-09-23T14:02:04Z")

</div>

> Now I’d like to run the same scripts on a Linux box. Of course I don’t  
> have ADO anymore but I can’t seem to find a direct way to access  
> SQLServer. I’ve done some Google searches and found iODBC and unixODBC  
> but they don’t seem to allow me to go to SQLServer directly.
> 
> What are my options?

Have you seen Ruby/ODBC [[ODBC Binding for Ruby](http://www.ch-werner.de/rubyodbc/)] … ? I used it  
for a while, worked well for me.

Chris

---

<div class="post-metadata">

**Author:** ![Andrew\_Queisser1](https://avatars.discourse-cdn.com/v4/letter/a/a88e57/32.png) [@Andrew\_Queisser1](https://rubytalk.org/u/Andrew_Queisser1)\
**Post date:** [23 September 2002 17:21 UTC](https://rubytalk.org/t/hurdles-moving-ruby-programs-from-nt-to-linux/1923/6 "2002-09-23T17:21:47Z")

</div>

“Shashank Date” [ADATE@kc.rr.com](mailto:ADATE@kc.rr.com) wrote in message news:[22uj9.28617$Xl5.200109@twister.rdc-kc.rr.com](mailto:22uj9.28617$Xl5.200109@twister.rdc-kc.rr.com)…

> Also, take a look at :  
> [www.freetds.org](http://www.freetds.org)  
> [www.sqsh.org](http://www.sqsh.org).
> 
> HTH,
> 
> – shanko  
> Thanks, I got that running, I think that was the major step.  
> Next I’ll try to get Ruby to talk to freetds.

Andrew
