# Connect Another Database

**URL:** <https://www.ruby-forum.com/t/connect-another-database/164818>\
**Category:** Ruby\
**Created:** [April 6, 2009, 10:42am UTC](https://www.ruby-forum.com/t/connect-another-database/164818 "2009-04-06T10:42:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![saurabhpurnaye](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ee59a6/32.png) [@saurabhpurnaye](https://www.ruby-forum.com/u/saurabhpurnaye)\
**Post date:** [April 6, 2009, 10:42am UTC](https://www.ruby-forum.com/t/connect-another-database/164818/1 "2009-04-06T10:42:23Z")

</div>

Hi All,

I’m trying to connect another database using rails

I made changes in database.yml file

I succeed in that but with same table name,

I’m having two issues regarding that:

1. How to connect the specific table of another database (suppose table  
name is Arthur and it is in database2, I’m working in database1)

2. How to connect database without making changes in database.yml file.

Any feedback appreciated,  
Thanks  
Saurabh

---

<div class="post-metadata">

**Author:** ![saurabhpurnaye](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ee59a6/32.png) [@saurabhpurnaye](https://www.ruby-forum.com/u/saurabhpurnaye)\
**Post date:** [April 6, 2009, 10:46am UTC](https://www.ruby-forum.com/t/connect-another-database/164818/2 "2009-04-06T10:46:07Z")

</div>

2009/4/6 Saurabh P. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> 1. How to connect the specific table of another database (suppose table  
> name is Arthur and it is in database2, I’m working in database1)
> 
> 2. How to connect database without making changes in database.yml file.

Hi, you should ask in a RubyOnRails maillist better than here (a pure  
Ruby maillist).  
However, Google shows lot of documentation about what you need:  
[rails two databases - Google Search](http://www.google.com/search?q=rails+two+databases)
