RE: Accessing data from different database on different location

RE: Accessing data from different database on different location

 

  

Hi,

I've come across a few links that suggest that it might be possible. Not
sure about DB2 though. There is sample code that says how to connect to
two databases. And there's some evidence to support that you can fetch
data from two sources. I'm not sure. I'll give you the links. It'll be
great if you can find something.

http://publib.boulder.ibm.com/infocenter/db2luw/v8/topic/com.ibm.db2.udb
.doc/ad/samples/c/s-dbmcon-sqc.htm
http://www.databasejournal.com/features/mssql/article.php/1442101 (look
at the sample code)
http://forum.java.sun.com/thread.jspa?threadID=171905


-----Original Message-----
From: Jitendra Kumar Prajapati
[mailto:db2udbdba-ezmlmshield-x68231816.[Email address protected]
Sent: Friday, July 28, 2006 5:35 PM
To: LazyDBA Discussion
Subject: Accessing data from different database on different location


Hi DBAs,



I've joined LazyDBA once again.



I have two different databases on two different locations and I want to
query data from both the database servers.



Select * from db1.tab1 tab1, db2.tab2 tab2

Where tab1.col1 = tab2.col1;





So, kindly advise me the better way to achieve it.



Any help would be highly appreciated.



Thanks and Regards,

Jitendra Kumar Prajapati











========================================================================
====================================================

Tech Mahindra, formerly Mahindra-British Telecom.

Disclaimer:

This message and the information contained herein is proprietary and
confidential and subject to the Tech Mahindra policy statement, you may
review at <a
href="http://www.techmahindra.com/Disclaimer.html">http://www.techmahind
ra.com/Disclaimer.html</a> externally and <a
href="http://tim.techmahindra.com/Disclaimer.html">http://tim.techmahind
ra.com/Disclaimer.html</a> internally within Tech Mahindra.

========================================================================
====================================================


---------------------------------------------------------------------
PLEASE CLICK REPLY-ALL TO SEND A REPLY TO EVERYONE
website: http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html




DB2 & UDB email list listserv db2-l LazyDBA home page