When you have finished configuring the DB2 Connect workstation for communications, you need to test the connection to the remote database.
Enter the following command at the DB2 Connect workstation, remembering to substitute the db_alias value you defined in Step 3. Catalog the APPC or APPN Node :
connect to db_alias user userid using password
For example, enter the following command:
connect to nyc3 user userid using password
The userid and password values required are those defined at the host or AS/400 system, and must be provided to you by your DB2 Administrator. For more information, refer to the DB2 Connect User's Guide.
If the connection is successful, you will get a message showing the name of the database to which you have connected. You are now able to retrieve data from that database. For example, to retrieve a list of all the table names listed in the system catalog table, enter the following command:
"select tabname from syscat.tables"
When you are finished using the database connection, enter the connect reset command to end the database connection.
If the connection fails, check the following items at the DB2 connect workstation:
__ 1. | The node was cataloged with the correct symbolic destination name (sym_dest_name). |
__ 2. | The node name (node_name) that was specified in the database directory points to the correct entry in the node directory. |
__ 3. | The database was cataloged properly, using the correct real_host_dbname for the database on the host or AS/400 server.
|
If the connection still fails after you verify these items, refer to the Troubleshooting Guide.