DB2 graphic  QMF Version 8

Accessing data at a remote database using distributed unit of work

If you are using a DB2 Version 2 Release 2 (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, 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 Bibliography. You can also contact your information center.


Go to the previous page Go to the next page

Downloads | Library | Support | Support Policy | Terms of use | Feedback
Copyright IBM Corporation 1982,2004 Copyright IBM Corporation 1982, 2004
timestamp Last updated: March, 2004