Access to a DB2 table can be implemented even in the case of cross-database access. The following describes the methods for cross-database access to a DB2 table.
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
Technical Field: db2 joint database
Go to the command line:
- db2
- db2 =>update dbm cfg using Federated YES
- db2 =>db2stop force
- db2 =>db2start
- db2 =>conncet dbsrc user user using pwd
- db2 =>create wrapper drda library ’libdb2drda.a’
- db2 =>create server FP type db2/AIX version 8 wrapper drda authorization "usr" password "pwd" options(dbname ’dbtarget’)"
- db2 =>CREATE USER MAPPING FOR "usr" SERVER "FP" OPTIONS (REMOTE_AUTHID ’usr’ , REMOTE_PASSWORD ’pwd’)
- 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 the DB2 table.
DB2 tablespace size limit
Lotus Notes calls the DB2 Stored Procedure
Batch import of DB2 stored procedures
How to create a temporary DB2 table
DB2 connection Server Configuration