I was wondering does anyone know if it is possible in Zend to run one query which will connect to two different databases on two different servers and combine the results in one result set?
Asked
Active
Viewed 188 times
-1
-
Have a look at [this question](http://stackoverflow.com/questions/15126560/can-i-join-data-from-2-different-db2-databases-like-sql-server-linked-database), particularly the stuff about federation. – Benny Hill Mar 20 '13 at 13:29
1 Answers
0
You can federate one database in the other one, via a wrapper. You reference table via nicknames, and then you execute a query normally, as both tables were in the same database (joining, sorting, etc.)
Federation is free between DB2 databases or with Informix (because is from IBM). If you want to federate another data source (Oracle, Excel, flat files), you have to buy that separately.
With federation, you do not need to do the join at application level, but at database level.

AngocA
- 7,655
- 6
- 39
- 55