It looks like you are mixing up UDB and ODBC facilities.
You've attempted to use UDB commands to gain access to PC1 from PC2. The
CATALOG ... NODE... commad, as you coded it, assumes that you have
DB2_db2inst1 defined in the services (usually /etc/services) file on
PC2. (The port number must match that being used on PC1.) CATALOG
DATABASE requires an AT NODE clause when the database is remote. Once
these have been completed successfully; you should be able to access the
remote database as follows (enter the password when prompted):
[]$ db2 connect to archiv user root
[]$ db2 "select count(*) from syscat.tables"
[]$ db2 terminate
If you can't access data in a specific table; root probably doesn't have
access privileges to the data in it.
If you need to access the data using ODBC; you must go into the ODBC
configurator (not part of UDB) and define the UDB database there. You
can define it so that PC2 users use the UDB definition of archiv on PC2
to get to PC1. You could also setup ODBC on PC1 and use an ODBC to ODBC
connection from PC2 to PC1. It may also be possible to make a direct
ODBC connection from PC2 to UDB on PC1 but I'd need to research that to
verify that it's possible.
CATALOG ODBC DATA ..... is a command that is Windows only. That's
explicitly stated in the Command Reference manual.
Phil Sherman
Fabian Knopf wrote:
Hi friends,
i have a unix machine PC1 where a database is running ( IBM DB2 V8.1 ) .
Then i have another machine PC2 i installed there also ( IBM DB2 V8.1 ). On
PC2 i installed unixODBC. To connect to the database over ODBC on unix i did
this:
on db2 console:
catalog tcpip node archiv remote PC1 server DB2_db2inst1
command successfull
then
catalog database archiv
command successfull
then
connect to archiv
command successfull
then is used the tool isql
isql -v archiv root password
command successfull
Now i am connect but i cant make this commands but there are there it exits
SELECT * FROM TABLE.
I also did this->
db2 => catalog odbc data source archiv
SQL1297N This command is currently not supported on this platform.
I dont know what i can do now to solve my problem.
Please can anyone help me with this.
Cu,
DB2NOOB