1

In a single box environment spinning 2 db2 containers running at different ports, how to setup federation ?

How can I use the command similar to the below

create nickname myschema.Table1 for <remotehost.remoteschema.remoteTable>

Pod names are fed-database-somehash-blah format and it seems - dash are not acceptable

Error: unexpected token -database was found

Setup:

Minikube
DB2 version 11.5.5

please advice.

Kris Swat
  • 788
  • 1
  • 10
  • 39
  • The documentation ( https://www.ibm.com/docs/en/db2/11.5?topic=sources-configuring-federated-server ) covers this configuration quite well. Is there some particular step you have trouble with? – mao Mar 08 '22 at 19:10
  • I don't see where nickname is created, or a query that demonstrates accessing data (table) from another database. Please can you point me where the command is in the documentation ? Note both hostnames are localhost or podnames and only ports are different 50000 and 55000 – Kris Swat Mar 08 '22 at 19:18
  • `create nickname ` command depends on several other prior steps being completed successfully first (federation yes configured/remote node and db catalogued/drda wrapper created, logicalServer created, userMappings created, and finally nicknames created. It does not matter that both containers are on the same host. For the purposes of federation they are considered as if they were on different machines. – mao Mar 08 '22 at 19:22
  • Already verified dbm cfg | grep Federated = yes etc. How to verify - configured/remote node ? Not aware of DRDA wrapper. will check this link https://www.ibm.com/docs/en/db2/11.5?topic=wrapper-configuring-access-db2-data-sources Sadly I am not a DBA, so looking for help with steps. – Kris Swat Mar 09 '22 at 00:53
  • How to run this command CATALOG TCPIP NODE db2_node REMOTE system42 SERVER db2tcp42 when the instances are on localhost – Kris Swat Mar 09 '22 at 09:13
  • 1
    Get a DBA. Normally this stuff is scripted by a DBA and runs in minutes. Each container must be able to see the other (with IP-address or hostname) before you start, and the underlying host operating-system must allow TCP traffic inbound and outbound on the relevant externalised Db2 ports. Use this IP-address or hostname and externalised port number when cataloging the remote-host. – mao Mar 09 '22 at 09:56

0 Answers0