DB2创建联邦数据库
来源:互联网 发布:php中筛选变量的一部分 编辑:程序博客网 时间:2024/04/29 09:32
联邦数据库配置步骤:
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 usermapping #创建用户mapping
db2 create nickname #创建远程数据库对象nickname
*********************************************************************************
1.设置数据库属性
db2 update dbm cfg using federatedyes
db2stop
db2start
*********************************************************************************
2.编目节点
CATALOG TCPIP NODE db2_node REMOTE system42 SERVERdb2tcp42
where:db2_node is the name that you assign to thenode
system42 is the host name of the system where the data sourceresides
db2tcp42 is the service name or primary port number of the serverdatabase manager instance
*********************************************************************************
3.编目数据库
CATALOG DATABASE DB2DB390 AS CLIENTS390 AT NODE DB2NODEAUTHENTICATION SERVER
where:DB2DB390 is the name of the remote database tocatalog
CLIENTS390 is the alias for the remote database being cataloged. Ifyou do not specify an alias, the database manager uses the name ofthe remote database as thealias.
DB2NODE is the name of the node that you previouslycataloged
AUTHENTICATION SERVER specifies that authentication takes place onthe 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? andOS/390?, Version 7.1 data source. CRANDALL is the name assigned tothe DB2 for z/OS and OS/390 server definition. DRDA is the name ofthe wrapper used to access this data source. In addition, specifythat:
GERALD and drowssap are the authorization ID and password underwhich packages are bound at CRANDALL when this statement isprocessed.
The alias for the DB2 for z/OS and OS/390 database that wasspecified with the CATALOG DATABASE statement isCLIENTS390.
The authorization IDs and passwords under which CRANDALL can beaccessed are to be sent to CRANDALL inuppercase.
CLIENTS390 and the federated database use the same collatingsequence.
*********************************************************************************
6创建mapping
CREATE USER MAPPING FOR ETL SERVERCRANDALL
OPTIONS (REMOTE_AUTHID 'etl', REMOTE_PASSWORD'xxxxxx');
*********************************************************************************
7创建nickname
CREATE NICKNAME SCHEMA.TABLENAME FORSERVERNAME.SCHEMA.TABLENAME;
*********************************************************************************
相关参考:
db2 list node directory
db2 list db directory
DROP USER MAPPING FOR authorization_name SERVERserver_name
DROP NICKNAME nickname
DROP WRAPPER wrapper_name
DROP SERVER server_name[@more@]
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 usermapping #创建用户mapping
db2 create nickname #创建远程数据库对象nickname
*********************************************************************************
1.设置数据库属性
db2 update dbm cfg using federatedyes
db2stop
db2start
*********************************************************************************
2.编目节点
CATALOG TCPIP NODE db2_node REMOTE system42 SERVERdb2tcp42
where:db2_node is the name that you assign to thenode
system42 is the host name of the system where the data sourceresides
db2tcp42 is the service name or primary port number of the serverdatabase manager instance
*********************************************************************************
3.编目数据库
CATALOG DATABASE DB2DB390 AS CLIENTS390 AT NODE DB2NODEAUTHENTICATION SERVER
where:DB2DB390 is the name of the remote database tocatalog
CLIENTS390 is the alias for the remote database being cataloged. Ifyou do not specify an alias, the database manager uses the name ofthe remote database as thealias.
DB2NODE is the name of the node that you previouslycataloged
AUTHENTICATION SERVER specifies that authentication takes place onthe 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? andOS/390?, Version 7.1 data source. CRANDALL is the name assigned tothe DB2 for z/OS and OS/390 server definition. DRDA is the name ofthe wrapper used to access this data source. In addition, specifythat:
GERALD and drowssap are the authorization ID and password underwhich packages are bound at CRANDALL when this statement isprocessed.
The alias for the DB2 for z/OS and OS/390 database that wasspecified with the CATALOG DATABASE statement isCLIENTS390.
The authorization IDs and passwords under which CRANDALL can beaccessed are to be sent to CRANDALL inuppercase.
CLIENTS390 and the federated database use the same collatingsequence.
*********************************************************************************
6创建mapping
CREATE USER MAPPING FOR ETL SERVERCRANDALL
OPTIONS (REMOTE_AUTHID 'etl', REMOTE_PASSWORD'xxxxxx');
*********************************************************************************
7创建nickname
CREATE NICKNAME SCHEMA.TABLENAME FORSERVERNAME.SCHEMA.TABLENAME;
*********************************************************************************
相关参考:
db2 list node directory
db2 list db directory
DROP USER MAPPING FOR authorization_name SERVERserver_name
DROP NICKNAME nickname
DROP WRAPPER wrapper_name
DROP SERVER server_name[@more@]
0 0
- DB2创建联邦数据库
- DB2创建联邦数据库
- db2 创建联邦数据库 /nickname
- DB2数据库联邦创建步骤
- [DB2]联邦数据库访问远程DB2
- DB2联邦数据库的一个例子
- DB2联邦
- 利用db2联邦数据库轻松实现程序部署
- 使用联邦(FEDERATION)访问远程的DB2数据库
- 联邦数据库
- 创建 DB2 数据库
- DB2 创建数据库
- ubuntu DB2创建数据库
- db2创建数据库脚本
- DB2创建数据库
- DB2创建数据库
- db2创建数据库
- db2创建sample数据库
- python使用mysql数据库
- DoNet开源项目-基于Amaze UI的点餐系统
- python安装DB2模块
- python连接mssql
- 解决linux精简客户端下安装python…
- DB2创建联邦数据库
- python下编译py成pyc和pyo
- MySQL设置编码
- ubuntu下配置Objective-C(2.0)学习…
- ubuntu 下使用kvm
- Ubuntu下切换GCC版本
- [bzoj1030][JSOI2007]文本生成器
- Compiling Octave 3.8&n…
- ruby访问mysql