|
Q and A
Asked and Answered
How do I query databases located on two different servers (for example, DB01 on SRVR1 and DB02 on
SRVR2)?
Robert Catterall responds:
If you are using a PC-based query tool such as
IBM's QMF for Windows, you simply connect to the
instance of DB2 that you wish to query. If you are talking about DB2 for OS/390, and if you are
logged on to TSO on SRVR1 and want to query DB02 on SRVR2, you can do so via SPUFI and 3-part table
names if the DB2 subsystems in question are set up for DRDA communication through DDF (3-part names,
with the high-level qualifier referring to location, were supported for DRDA access beginning, I
believe, with DB2 for OS/390 Version 5). For more information on the
DB2 for OS/390 distributed
data facility, refer to the IBM manual, "An Introduction to DB2 for OS/390," particularly Chapter
11, "Accessing Distributed Data." Here is the URL for an HTML version of the manual:
http://publib.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/DSNITH11/CCONTENTS
.
If you want to reference data at two DB2 locations with one SQL statement, you'll need a software
tool. An
IBM product called DataJoiner used to provide this functionality it may now be part of
the functionality provided by IBM's DB2 Connect product.
See a
complete archive of reader/author Q&As
.
|