Using QMF


Accessing data at a remote database using distributed unit of work

If you are using a DB2 V2R2 (or later) database, you can access data in another DB2 database by using distributed unit of work. With distributed unit of work, you do not need to connect to the remote database. Instead, you specify the location name as part of the table name when you select the table.

The following example selects all the rows from a table that is named STAFF that is owned by Q and located in NEW_YORK.

SELECT * FROM NEW_YORK.Q.STAFF

You can retrieve data from more than one table only when each table is at the same location. For example, you cannot retrieve data from NEW_YORK.Q.STAFF and ATLANTA.Q.ORG in the same query.

You can update tables that are located at remote locations, but you can only create tables at your own location.

Your installation can also assign an alias for the three-part name when querying a remote table. For example, your installation might assign the alias NYSTAFF for NEW_YORK.Q.STAFF. For more information on using remote tables and aliases, see the DB2 publications that are listed in the bibliography at page Bibliography. You can also contact your information center.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]