similar to: Separate databases for reads and writes?

Displaying 20 results from an estimated 1000 matches similar to: "Separate databases for reads and writes?"

2006 Mar 09
3
How to copy between databases?
I want to copy data from one database to another using rails. But, it seems that rails only will talk to one database at a time. Is there a way around this? Any help would be greatly appreciated. -- Best Regards, -Larry "Work, work, work...there is no satisfactory alternative." --- E.Taft Benson -------------- next part -------------- An HTML attachment was scrubbed...
2006 Mar 16
5
Multiple databases + switching databases
Hello, I have an application that access two different DBMS - Firebird and Postgres. So far, that''s ok. The problem is, depending on the customer logged, a different database (Firebird) must be selected. To make the things clearer: Postgres: 1 database shared by all customers with these tables: - user - vehicle - driver Firebird: several databases with different names and identical
2006 Feb 08
8
Strategies for Unit testing 2 databases
Hi, My application spans 2 (or more) databases for some very specific reasons... My models are working fine, even dynamically establishing connections as needed at runtime, and spanning relationships across the databases (which really impressed me). The problem is, I can''t seem to force Units for these models (that use a secondary db) to load their fixtures into and use the
2006 Nov 17
5
configure a rails app for multiple databases
Hello Rails community I cannot seem to find via Google what I had hoped would be a simple issue On a single DB system (currently, postgres 8.1.4), I have two databases, each containing multiple tables. I would like to configure my app and database.yml to recognize these two databases. What is the corrrect config for the database.yml ? Is it something like: > production: > adapter:
2006 Jan 19
4
multiple database in the same actions?
Hi, I read the example in http://wiki.rubyonrails.com/rails/pages/HowtoUseMultipleDatabases, it show us how to connect to other database, each time we start a new action, however, this doesn''t work while you try to connect to two different database within the same action. SO I wonder is it possible to bind to two or more database within the same action???? Thanks you very much Saiho
2006 Jan 18
1
Helps!!!!! Rails database connection guru needed!!!!!!!
Hi, I really need help to understand what is happening while Rails connect to a database, (we area actually using postgresql, so my example will be with postgresql) What I understand is Rails is able to connect to different DB. Actually, this is what we want, and we have made some tests, everything is juste fine. However, all these tests lead us to some important questions that we did find the
2006 Sep 21
10
Can I use 2 DB connections in my app?
Hi there! How can i use 2 database connections in my rails application ( if it''s possible of course ): one for reading from DB and one for writing to DB? Thanks, Dmitry -- 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
2007 Apr 24
2
remote database ActiveRecord model
Does anyone know how to make a model connect to a remote database and only for that specific model? That way I can do the typical CRUD functions on a remote server? -- 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,
2007 Mar 13
6
comparing two databases with Active Record.
I have two databases in SQLite with the same schema. The other database was populated by an external customer and then returned. I want to use ActiveRecord to do the comparison. I am not sure of the best way to access the tables in each database with ActiveRecord models. I could change the connection dynamically whenever I want to switch between the databases, but this would seem to be clumsy
2006 Apr 18
7
Connecting to multiple databases
Hi Everyone, I am trying to connect to multiple databases and followed along the Recipe in Chad Fowlers ''Rails Recipes'' book (which basically is about establishing the connection in a subclass of ActiveRecord::Base, and inheriting all classes in need of this connection from this class) Chad Fowler says: "You won''t be able to instantiate an External, of course,
2006 Jan 13
1
How to disconnect to a database????
Hi, We have experienced some problems with ActiveRecord::Base class of Ruby-Rails. We are building a web-application based on the Ruby-rails framework and the web-application needs to access to difference databases, so we do not pre-define our database accesses in the database.yml file. In fact, we are using the ActiveRecord::Base.establish_connection() to connect to our database, the function
2006 Jan 09
4
Switching databases in Rails v1.0 app
Hello, I need some guidance. I have a need to: a) Login, validating against a "system-level" user database - no big deal, then b) Depending upon the login, select a customer database for processing. For instance, assume that my login profile lists an area of interest: cars, motorcycles or boats. Each of these has a database, with identical table formats. If my login shows my area of
2007 Apr 04
4
joining across databases in a find statement with include (legacy db)
Hi, I have a legacy database ''old'' and a new database ''new'' which rails uses. I set up models using old with establish_connection(old), and this works well, except for include: class OldModel < ActiveRecord::Base establish_connection(old) end class NewModel < ActiveRecord::Base has_one :old_model end a = OldModel.find :first NewModel.find(:all,
2009 Aug 24
1
problem with BRugs
Hello, I am sorry, I have this problem before and Uwe send me the answer but I misplaced it and can not find it. writing a model for BRugs > library(BRugs) Loading required package: coda Loading required package: lattice Welcome to BRugs running on OpenBUGS version 3.0.3 > setwd("c:/tmp") Error in setwd("c:/tmp") : cannot change working directory > mo <-
2006 Mar 27
5
Fake ActiveRecord model?
Hi all, I have a legacy table which I cannot get to work with ActiveRecord (no ids etc). All I want is to create a class which opens a connection manually and allows me to execute some plain SQL statements. What I can''t figure out is how to either build up a connection and execute queries from a non-AR inherited class, or how to create a AR-inherited class minus all the AR magic and
2006 Apr 18
2
Connecting to multiple databases with multiple database users
Hi everyone, I was wondering what the common practice for handling multiple db users with fine grained privileges on multiple databases is. Against the often read guideline for rails users to keep with a single db as "more dbs don''t really make sense anyway", my opinion is that it DOES make sense to use more than one db schema for a number of reasons that I won''t
2009 Mar 17
11
Refactoring module
Dear all Please see the following module, In module SX3 SX4 and SX5 have similar class Tasklist, but inherit from different class. I will use the following code to connect to different data sources RemoteSX3Model.establish_connection sx3_hash RemoteSX4Model.establish_connection sx4_hash RemoteSX5Model.establish_connection sx5_hash How can I refactor my code in module to look simpler? Thank you
2006 Feb 27
5
Database connections...so many connections!
Hello all. I am currently running a very simple ruby app. It connects to an Oracle server using the OCI8 adapter. I have two controllers, each one connects to a different schema on the server, I looked at the WIKI that had details of multiple database connections (http://wiki.rubyonrails.com/rails/pages/HowtoUseMultipleDatabases), I moved the code from the application controller into each
2006 Jul 14
2
Per Session Database Connection
Hi, I am creating a Rails front-end for a legacy application. For this application the username and password for the database must be provided by the user. i.e. each session needs a separate connection to the database using the credentials of the user logged in to that session. Does anyone have any idea where to even start? It seems like Rails won''t boot without a database
2006 Jun 15
1
multple sqlite connections from single rails application
Please help to work out solution for the following task : There are several users of my application and I want to allow each one to have personal sqlite database. It''s going to be very useful for me when all user''s data incapsulated in one single file. All users can be logged-in at one time. Is it possible to implement it with ruby on rails? If so what is the best way to