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. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 1/22/07, Jenson Rollen <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> 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 Donald http://destiney.com/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Jenson Rollen
2007-Jan-22 23:04 UTC
Re: Copying data from SQL Server to MySQL for Rails app
Greg Donald wrote:> > http://wiki.rubyonrails.com/rails/pages/HowtoUseMultipleDatabases >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. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---