In order to provide access to a DB2 database, the DB2 Oracle Transparent Gateway must be installed and configured. The purpose of the transparent gateway is to allow the Oracle database access to DB2. Gateways make "foreign data stores" like DB2 look like Oracle databases to an Oracle client. The Gateway takes SQL in an internal format that Oracle expects, converts it to a format that DB2 expects, and presents that SQL to the server side of DB2. And if the server side of DB2 provides data in response, the Gateway does any conversions required so the Oracle client can work with it.
Another possibility is to use generic connectivity, the process architecture is essentially the same as in the non-generic case (where you use the specific DB2 gateway). The difference is that Oracle provides generic ODBC and OLE DB agents with the server--no transparent gateway is required. As long as the non-Oracle system supports these protocols, you can use them without purchasing a system-specific agent. To make the generic agents work, however, you must also configure a driver that can interface with the agent. However, for DB2 I don't generic connectivity will work unless DB2 on MVS supports ODBC/OLE.
So....the answer is yes (kind of)! You can access DB2 data via an Oracle session but it is not just a simple dblink. The use of either the DB2 Transparent Gateway or generic connectivity if possible is required. For more information on these topics see the Oracle Distributed Database Systems guide (chapter 6).
For More Information
- Dozens more answers to tough Oracle questions from Karen Morton are available.
- The Best Oracle Web Links: tips, tutorials, scripts, and more.
- Have an Oracle or SQL tip to offer your fellow DBAs and developers? The best tips submitted will receive a cool prize. Submit your tip today!
- Ask your technical Oracle and SQL questions -- or help out your peers by answering them -- in our live discussion forums.
- Ask the Experts yourself: Our SQL, database design, Oracle, SQL Server, DB2, metadata, object-oriented and data warehousing gurus are waiting to answer your toughest questions.
Dig Deeper on Oracle data and application integration
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.