DB2 创建联邦

1.设置FEDERATED参数

DB2 UPDATE DBM CFG USING FEDERATED YES


DB2STOP


DB2START



2.连接数据库


DB2 connect to dbname user 用户 using 密码


3.创建WRAPPER


 DB2 CREATE WRAPPER "WRAPPER"  LIBRARY 'db2drda.dll' OPTIONS (DB2_FENCED  'N')


4.创建SERVER



DB2 create server "SERVER" type db2/udb version '8.1' wrapper "WRAPPER" authid "USER"   password "PASSWORD" options (dbname 'sample')


5.创建USER MAPPING


DB2 CREATE USER MAPPING FOR gc SERVER "SERVER" OPTIONS (REMOTE_AUTHID  'USER', REMOTE_PASSWORD  'PASSWORD')

你可能感兴趣的:(DB2)