DB2 创建联邦
6.创建联邦注意:登录总会的数据库不要保存密码。
1.1.省局的联邦
CATALOG TCPIP NODE resoft REMOTE <总会数据库所在的远程主机的IP地址> SERVER 50000;
CATALOG DB <总会数据库名> AS fxjc AT NODE resoft;
CREATE WRAPPER DRDA OPTIONS (DB2_FENCED 'N');
CREATE SERVER resoft TYPE DB2/UDB VERSION '8.2' WRAPPER DRDA AUTHID "fxjc" PASSWORD "fxjc" OPTIONS(ADD NODE 'resoft',ADD DBNAME 'fxjc');
CREATE USER MAPPING FOR fxjc SERVER resoft OPTIONS (ADD REMOTE_AUTHID 'fxjc',ADD REMOTE_PASSWORD 'fxjc');
在控制中心,停止数据库后,重新启动数据库。
CREATE NICKNAME FXJC.DQ_STANDARDLIBRARY FOR RESOFT.FXJC.DQ_STANDARDLIBRARY;
CREATE NICKNAME FXJC.A_SPECIAL_MEMBER FOR RESOFT.FXJC.A_SPECIAL_MEMBER;
CREATE NICKNAME FXJC.DIM_ORG FOR RESOFT.FXJC. DIM_ORG;
CREATE NICKNAME FXJC. M_LEGAL_ORG FOR RESOFT.FXJC. M_LEGAL_ORG;
CREATE NICKNAME FXJC. M_ORGCLS FOR RESOFT.FXJC. M_ORGCLS;
CREATE NICKNAME FXJC. BANK_ORG_LEVEL FOR RESOFT.FXJC. BANK_ORG_LEVEL;
CREATE NICKNAME FXJC. BANK_REGION_LEVEL FOR RESOFT.FXJC. BANK_REGION_LEVEL;
CREATE NICKNAME FXJC. DIM_REGION FOR RESOFT.FXJC. DIM_REGION;
1.2.单列市级别的联邦(只需5个单列市做)
在省局级别部署,1.2略过。
CATALOG TCPIP NODE shengju REMOTE <省局数据库所在的远程主机的IP地址> SERVER 50000;
CATALOG DB <省局数据库实例名> AS fxjc_sj AT NODE RESOFT;
CREATE SERVER shengju TYPE DB2/UDB VERSION '8.2' WRAPPER DRDA AUTHID "fxjc" PASSWORD "fxjc" OPTIONS(ADD NODE ' shengju ',ADD DBNAME ' fxjc_sj ');
CREATE USER MAPPING FOR fxjc_sj SERVER shengju OPTIONS (ADD REMOTE_AUTHID 'fxjc',ADD REMOTE_PASSWORD 'fxjc');
在控制中心,停止数据库后,重新启动数据库。
CREATE NICKNAME FXJC.C_INDIVIDUATION_CONFIG FOR RESOFT.FXJC.C_INDIVIDUATION_CONFIG;
下面建立与总会的联邦。
CATALOG TCPIP NODE resoft_zh REMOTE <总会数据库所在的远程主机的IP地址> SERVER 50000;
catalog db <总会数据库实例名> as fxjc_zh at node resoft_zh;
CREATE SERVER resoft_zh TYPE DB2/UDB VERSION '8.2' WRAPPER DRDA AUTHID "fxjc" PASSWORD "fxjc" OPTIONS(add node 'RESOFT_ZH',ADD DBNAME 'fxjc_zh');
CREATE USER MAPPING FOR fxjc_zh SERVER resoft_zh OPTIONS (ADD REMOTE_AUTHID 'fxjc',ADD REMOTE_PASSWORD 'fxjc');
在控制中心,停止数据库后,重新启动数据库。
CREATE NICKNAME FXJC.DQ_STANDARDLIBRARY FOR RESOFT.FXJC.DQ_STANDARDLIBRARY;
CREATE NICKNAME FXJC.A_SPECIAL_MEMBER FOR RESOFT.FXJC.A_SPECIAL_MEMBER;
CREATE NICKNAME FXJC.DIM_ORG FOR RESOFT.FXJC. DIM_ORG;
CREATE NICKNAME FXJC. M_LEGAL_ORG FOR RESOFT.FXJC. M_LEGAL_ORG;
CREATE NICKNAME FXJC. M_ORGCLS FOR RESOFT.FXJC. M_ORGCLS;
CREATE NICKNAME FXJC. BANK_ORG_LEVEL FOR RESOFT.FXJC. BANK_ORG_LEVEL;
CREATE NICKNAME FXJC. BANK_REGION_LEVEL FOR RESOFT.FXJC. BANK_REGION_LEVEL;
CREATE NICKNAME FXJC. DIM_REGION FOR RESOFT.FXJC. DIM_REGION;
建立完毕。
页:
[1]