DB2 Connectivity

DB2 Connectivity Commands

IBM DB2 UDB for Linux, Unix and Windows Command Examples

To Enable connectivity from a DB2 client to a DB2 server

Catalog the DB2 server from a DB2 client:

=> db2 catalog tcpip node db2node remote hostname server service_name

where db2node is the name of the system where the DB2 database resides (which must be unique in your node directory list), hostname is the fully qualified name (or IP address) of the system where the DB2 server is installed, and service_name is the connection port name as defined in the services file. The service_name should match the DBM configuration parameter SVCENAME.

Catalog remote DB2 databases from a client

=> db2 catalog database db_name at node db2node

where db_name is the name of the remote database and db2node is the name you gave the node when you cataloged it.

Connect to the DB2 server from a client.

=> db2 connect to DBNAME user ID using PW

where database is the name or alias of the database in the system database directory, name is the user name of the instance owner of the database, and password is the password for the previous user.