How to catalog a database in DB2 LUW


In this post,I will show how to catalog and access remote databases on Linux/unix machine.

 

Below are the details of Instance,database name & port number

 

Remote Instance name : db2inst1

Remote Database name : Test

Remote Instance port    : 50000

Local Instance name  : db2inst3

Local Database name : Abc

 

I will make an attempt to catalog Remote Database Test Residing in db2inst1 instance and will establish a connection to the remote database from my Local instance.

 

For cataloging the database,we need

 

1.Hostname for the Remote Server

2.Port number for the Remote Server

3.Database name for the Remote Server

 

The Syntax for cataloging the Database as  below

Db2 catalog tcpip node <nodename> remote <hostname> server<portno>

 

Here Nodename is the local nickname(You can use anyname>)

 

Db2 catalog db <databasename> at node <nodename>

 

Db2 “catalog tctip node node_abc remote  typdsa.com server 50000”

 

Db2 “catalog db Test at node node_abc”

 

Here node_abc is the nodename

Comments

Popular posts from this blog

Db2 export command example using file format (del , ixf)

How to fix DB2 Tablespace OFFLINE state issue?

Phases of a load operation