Cross-database access to DB2 tables

Source: Internet
Author: User

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:

 
 
  1. db2  
  2. db2 =>update dbm cfg using Federated YES   
  3. db2 =>db2stop force  
  4. db2 =>db2start  
  5. db2 =>conncet dbsrc user user using pwd  
  6. db2 =>create wrapper drda library ’libdb2drda.a’  
  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 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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.