db2联邦数据库 linux,DB2创建联邦数据库

联邦数据库配置步骤:

db2 update dbm cfg using federated yes #参数配置

db2 catalog node #编目节点

db2 catalog database #编码远程数据库

db2 connect to db #连接本地数据库

db2 create wrapper drda #创建wrapper

db2 create server   #创建服务器

db2 create user mapping #创建用户mapping

db2 create nickname  #创建远程数据库对象nickname

*********************************************************************************

1.设置数据库属性

db2 update dbm cfg using federated yes

db2stop

db2start

*********************************************************************************

2.编目节点

CATALOG TCPIP NODE db2_node REMOTE system42 SERVER db2tcp42

where:db2_node is the name that you assign to the node

system42 is the host name of the system where the data source resides

db2tcp42 is the service name or primary port number of the server database manager instance

*********************************************************************************

3.编目数据库

CATALOG DATABASE DB2DB390 AS CLIENTS390 AT NODE DB2NODE AUTHENTICATION SERVER

where:DB2DB390 is the name of the remote database to catalog

CLIENTS390 is the alias for the remote database being cataloged. If you do not specify an alias, the database manager uses the name of the remote database as the alias.

DB2NODE is the name of the node that you previously cataloged

AUTHENTICATION SERVER specifies that authentication takes place on the DB2 data source node

*********************************************************************************

4.创建wrapper

db2 create wrapper drda

*********************************************************************************

5.创建server

CREATE SERVER CRANDALL

TYPE DB2/ZOS

VERSION 7.1

WRAPPER DRDA

AUTHORIZATION "GERALD"

PASSWORD drowssap

OPTIONS

(DBNAME 'CLIENTS390',

FOLD_ID 'U',

FOLD_PW 'U',

COLLATING_SEQUENCE 'Y')

where: Register a server definition to access a DB2 for z/OS? and OS/390?, Version 7.1 data source. CRANDALL is the name assigned to the DB2 for z/OS and OS/390 server definition. DRDA is the name of the wrapper used to access this data source. In addition, specify that:

GERALD and drowssap are the authorization ID and password under which packages are bound at CRANDALL when this statement is processed.

The alias for the DB2 for z/OS and OS/390 database that was specified with the CATALOG DATABASE statement is CLIENTS390.

The authorization IDs and passwords under which CRANDALL can be accessed are to be sent to CRANDALL in uppercase.

CLIENTS390 and the federated database use the same collating sequence.

*********************************************************************************

6创建mapping

CREATE USER MAPPING FOR ETL SERVER CRANDALL

OPTIONS (REMOTE_AUTHID 'etl', REMOTE_PASSWORD 'xxxxxx');

*********************************************************************************

7创建nickname

CREATE NICKNAME SCHEMA.TABLENAME FOR SERVERNAME.SCHEMA.TABLENAME;

*********************************************************************************

相关参考:

db2 list node directory

db2 list db directory

DROP USER MAPPING FOR authorization_name SERVER server_name

DROP NICKNAME nickname

DROP WRAPPER wrapper_name

DROP SERVER server_name[@more@]

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
ibm官方文档。 DRDA(Distributed Relational Database Architecture )分布式关系数据库体系结构。 分布式关系数据库体系结构(DRDA)是一个跨IBM平台访问、遵循SQL标准的数据库信息的IBM标准。它是IBM的信息仓库框架中的重要组成部分,该框架定义了庞大的后台服务器,客户机可通过较小的基于工作组的中介服务器来访问它。 DRDA具有下列功能:  1、定义了客户机和后台数据库之间的接口协议。   2、提供了IBM的DB2、DBM、SQL/DS和SQL/400数据库系统的互连框架。  3、支持多供应商提供的数据库系统。   4、支持分布式数据库上的事务(工作单元)处理。  在DRDA中,客户机叫做应用请求器(ARS),后台服务器叫做应用服务器(AS),协议叫做应用支持协议(ASP),提供AR和AS间的接口。整个过程操作在SNA网上,但也计划支持OSI和TCP/IP。有一个附加的协议叫做数据库支持协议(DSP),它使一个AS能对另一服务器扮演AR的角色。通过这种方法服务器之间能相互通话并传递来自客户AR的请求。最初的协议对一个数据库只支持一个结构化查询语言(SQL)的语句,但未来的版本将对一个或多个数据库提供多个语句的支持。   DRDA是IBM环境中建立客户机/服务器计算的基础之一。其它基础是高级的对等联网(APPN)和分布式数据管理(DDM)。通过信息仓库和DRDA,IBM计算机将它的企业中心组成部分的大型计算机,用作各种类型信息(包括多媒体信息)的存储平台。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值