This document describes how to access table 1 of the target database dbtarget in the source database dbsrc in the same database instance.
Username: usr, password: pwd
Db2 version: udb for aix 8.2.2
Technical Field: db2 joint database
Go to the command line: 1. db2
2. db2 => update dbm cfg using Federated YES
3. db2 => db2stop force
4. db2 => db2start
5. db2 => conncet dbsrc user using pwd
6. db2 => create wrapper drda library 'libdb2drda.'
7. db2 => create server FP type db2/AIX version 8 wrapper drda authorization "usr" password "pwd" options (dbname 'dbtarget ')"
8. db2 => create user mapping for "usr" SERVER "FP" OPTIONS (REMOTE_AUTHID 'usr', REMOTE_PASSWORD 'pwd ')
9. db2 => create nickname FP_TABLE1 for FP. USR. table
In this way, the cross-database access environment is created,
You can use "select * from FP_TABLE1" to access table 1 in dbtarget.
(