Copying data from SQL Server to MySQL for Rails app

I have a Rails application in which I use MySQL on the backend. My
client has a SQL Server database where they store customer information
via a third party program. I don’t want to touch that database (other
than reading) but I want to copy it’s contents from two tables out to
the MySQL database. In fact, I’ll have a job run on a weekly basis to
keep the two databases in-sync (with updates for existing changed
records and inserts for new records). The amount of changes are very
small on a weekly basis. My issue is I’d like to use ActiveRecord to
connect to the SQL Server grab the data and then write the results from
that back to the MySQL database. This doesn’t seem possible from what
I’ve read regarding ActiveRecord so I need some advice here please on
how best to do this.

Thanks for any help.

On 1/22/07, Jenson R. [email protected] wrote:

My issue is I’d like to use ActiveRecord to
connect to the SQL Server grab the data and then write the results from
that back to the MySQL database. This doesn’t seem possible from what
I’ve read regarding ActiveRecord so I need some advice here please on
how best to do this.

http://wiki.rubyonrails.com/rails/pages/HowtoUseMultipleDatabases


Greg D.
http://destiney.com/

Greg D. wrote:

Peak Obsession

The wiki was my first stop actually. It does nothing to answer my
particular question. I want to have a connection open to SQL Server and
MySQL at the same time and copy ActiveRecord records between the two, or
insert new ones, etc.