Testing the client-to-server connection using the CLP
If you do not test the client-to-server connection, you might not be able to retrieve information from the database. You should test your client-to-server connection every time you update the authentication type to ensure that the new value is being used.
Before you begin
- The database node and database must be cataloged.
- The values for userid and password must be valid for the system on which they are authenticated. The authentication parameter on the client is be set to match the value on the server or it can be left unspecified. If an authentication parameter is not specified, the client will default to SERVER_ENCRYPT. If the server does not accept SERVER_ENCRYPT, then the client retries using the value returned from the server. If the client specifies an authentication parameter value that doesn't match what is configured on the server, you will receive an error.
- The database manager must be started with the correct protocol defined in the DB2COMM registry variable. If it is not started, then you can start the database manager by entering the db2start command on the database server.
Procedure
To test the client to server connection:
Example
Database Connection Information
Database server = DB2/LINUXX8664 11.5.0.0
SQL authorization ID = JTRIS
Local database alias = mysample
You can now work with the
database. For example, to retrieve a list of all the table names listed in the system catalog table,
enter the following SQL statement:
select tabname from syscat.tables