Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

DB2 CATALOG database command

Why should anyone catalog a Db2 database when it automatically catalogs databases when they are created?

It catalogs an entry for the database in the local database directory and another entry in the system database directory. If the database is created from a remote client (or a client which is executing from a different instance on the same machine), an entry is also made in the system database directory at the client instance.

0 votes



One answer

Permanent link

The most likely reason would be to enable a connection to a remote database within your 'local' instance   One example in RTC + Cognos would be where one catalogs the jazz warehouse db "adjacent" to the databases used by cognos as cognos seemingly cannot use jdbc to connect.

Another is to enable db2 cli access to a 'remote' database.  The mechanism is the same for each.

example.   somehost.your.dom contains a db2 database instance and you'd like to execute db2 queries using db2.  In your 'local' instance run these

  1. db2 catalog tcpip node XYZ remote somehost.your.dom server NNNNNN
  2. db2 catalog database remote_db as remote_db at node XYZ
NNNNNN is some port# or symbol in /etc/services.  Now one can connect on that instance to the datbase 'remote_db' with credentials and run db2 interactively ( as far as your authorization will permit )  e.g.
db2 connect to remote_db user dbuser using dbpassword

0 votes

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 7,512
× 6,132

Question asked: Aug 20 '18, 10:42 a.m.

Question was seen: 3,356 times

Last updated: Aug 21 '18, 9:57 a.m.

Confirmation Cancel Confirm