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 .

CAREER CENTER
Ready to take that job and shove it?
SEARCH JOBS
RECENT JOB POSTINGS
CAREER NEWS
10 Search Engines You Don't Know About
Go beyond Google and get vertical. These specialized search sites will help you find the business information you need -- fast.

Subscribe to the new digital version of IBM Database Magazine
New Digital Version

Sponsored links:



Subscribe to the IBM Database Magazine Newsletter

Email Address *
First Name
Last Name
HTML Preference
HTML Text
 

Fields with * are required.

 




Visit these other IBM and TechWeb Partner Sites: :
Maximizing ROI Through Business Process Management (BPM) and Service-Oriented Architecture (SOA)
Internet Evolution – The Macrosite for News, Analysis, & Opinion About the Future of the Internet
Business Innovation – Technology Strategies and Solutions for Driving Business Success


:: IBM Database Magazine ::