Testing the CLPPlus database connectivity with the db2dsdriver.cfg file

You can test the CLPPlus database connectivity with the db2dsdriver.cfg file to ensure that the db2dsdriver.cfg file is valid and the CLPPlus component is installed correctly.

Before you begin

You must ensure that the IBM® data server client or IBM Data Server Driver Package software is installed and the db2dsdriver.cfg file is created in your environment with a required data source name (DSN) entry. You can use the contents of the db2dsdriver.cfg.sample file to create the db2dsdriver.cfg file.

The CLPPlus command requires the IBM JDBC Universal driver (JCC) in the db2jcc.jar file. You must ensure that the db2jcc.jar file is specified in the CLASSPATH environment variable.


To test the CLPPlus connectivity with the db2dsdriver.cfg file:

  1. Issue the clpplus <username>@<dsn_name> command. The <dsn_name> is the DSN in the db2dsdriver.cfg file that you are testing the connection to. The <username> is the valid user ID that is used to connect to the target data source.
  2. When prompted, enter the valid password that is associated with the specified user ID.


The clpplus <username>@<dsn_name> command output displays the host name, database server information, user ID, local database alias, and port number upon successful connection.


The following command output shows a successful connection to the sampledsn DSN entry in the db2dsdriver.cfg file:
$ clpplus db2admin@sampledsn

CLPPlus: Version 1.X
Copyright (c) 2009, 20XX, IBM CORPORATION.  All rights reserved.

Enter password: **********

Database Connection Information:
Hostname = samplehost.domain.com
Database server = DB2/LINUXX8664 SQL10011
SQL authorization ID = db2admin
Local database alias = SAMPLEDSN
Port = 19766