DB2 linking schemas across multiple instances

戏子无情 提交于 2019-12-12 06:27:06

问题


I have a few instances of DB2 10.5 server running on one physical Linux machine, let name them INST1 and INST2.

All of them contain multiple schemas, however schema-naming is unique accross whole machine, for example INST1_SCHEMA_A, INST2_SCHEMA_A etc.

What I would like to do is to somehow create a user that can access all of those schemas as they were on one instance, so it would be possible to make a queries like: SELECT ID FROM INST1_SCHEMA_A UNION SELECT ID FROM INST2_SCHEMA_A

How can I achieve that? Should I just link databases and alias schemas?


回答1:


Federation

is the keyword for your request. DB2 LUW to DB2 LUW is included in the license and this could be done across multiple databases - not matter if they reside within the same instance, another instance on the same server or even a different server.

Set FEDERATED = YES in the DBM CFG, define a server and set up Nicknames for remote tables. For details refer to this article or this one or the IBM Knowledge Center.



来源:https://stackoverflow.com/questions/38185569/db2-linking-schemas-across-multiple-instances

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!