In my words:
When you access a remote DB2 from java you do not need to install anything: the JDBC type 4 is enough.
When you access a remote DB2 with CLI and/or ODBC you need to install (at least) the db2-client package.
Lets suppose that your databaseserver is at 192.168.0.100, the instance is called "db2inst1" (you use the default port 50000) and the database is called "sample". This is pretty standard in DB2land.
is your client windows? never use the "cmd" window, use "db2cmd" instead
From the client you must first make contact to the instance, so you type:
Code:
db2 catalog tcpip node dbservI remote 192.168.0.100 server 50000
Now you can perform your 1st test, type:
Code:
db2 attach to dbservI user db2inst1
you will be prompted for the password of the db2inst1 user.
If that was successful type:
Code:
db2 catalog database sample at node dbservI
Now you can perform your 2nd test, type:
Code:
db2 connect to sample user db2inst1
you will be prompted for the password of the db2inst1 user.
If that was successful and your client is windows you can optionally type:
Code:
db2 catalog system odbc data source sample
Now you should be able to access the database thru ODBC
Please understand that the "dbservI" on your client is now an alias for the "db2inst1" on the databaseserver .
That's basically all. Want deeper? Google for "db2cli.ini"