如何从 AIX 上的另一个 DB2 实例连接远程 DB2 服务器? [英] How to connect with a remote DB2 Server from another DB2 instance on AIX?

查看:60
本文介绍了如何从 AIX 上的另一个 DB2 实例连接远程 DB2 服务器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在两个独立的 AIX 服务器上有两个实例.两个 DB2 数据库都配备了它们的示例数据库.我想从另一个实例连接一个 DB2 实例.

I have two instances on two separate AIX servers. Both DB2 databases are up with their sample databases. I want to connect with one DB2 instance from the other instance.

我是 DB2 的新手,想知道我该怎么做.

I am new on DB2 and want to know how can I do that.

我已经执行了以下命令:

I have executed following commands:

此路径是客户端实例:

#.  /home/db2inst2/sqllib/db2profile
db2 catalog tcpip node db2serverinst remote lpar1 server 50005 remote_instance ctginst1
db2 => terminate
DB20000I  The TERMINATE command completed successfully.
# db2 connect to db2serverinst user ctginst1
Enter current password for ctginst1: SQL1031N  The database directory cannot be found on the indicated file system.
SQLSTATE=58031

推荐答案

您只对 DB2 实例进行了编目.您需要在远程服务器上对数据库进行编目:

You have only cataloged DB2 instance. You need to catalog the database at the remote server:

db2 catalog database XXXX at node db2serverinst

显然,您需要将 XXXX 替换为远程数据库的实际名称.对数据库进行编目后,您就可以连接了:

Obviously, you'll need to replace the XXXX with the actual name of the remote database. Once you've cataloged the database, you can then connect:

db2 connect to XXXX user ctginst1

注意,这仅定义连接.如果不配置联合,您将无法从本地实例中的其他数据库访问此远程数据库中的对象.

Note, this only defines the connection. You won't be able to access objects within this remote database from other databases within the local instance without configuring federation.

这篇关于如何从 AIX 上的另一个 DB2 实例连接远程 DB2 服务器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆