Before you issue a CLPPlus command, you must first start a CLPPlus session and establish
a connection to the database.
Procedure
To start a CLPPlus session and establish a connection to the
database:
-
If Kerberos is not enabled, issue the CLPPLUS command in the command line processor (CLP) or the Command
Window. When prompted, enter your password.
For example, issue the following CLPPlus command to start the CLPPlus session and use the
user ID
db2admin to connect to a local SAMPLE database that is listening on port
50000:
clpplus db2admin@localhost:50000/sample
-
If Kerberos is enabled, launch CLPPLUS from the client container:
-
From inside the client container, modify the
/mnt/clientdir/clienthome/db2inst1/sqllib/cfg/db2dsdriver.cfg file to reflect
the fully-qualified host name of the core container.
In the following example, this host name is
vm1.fyre.ibm.com:
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<configuration>
<dsncollection>
<dsn alias="BLUDB" host="vm1.fyre.ibm.com" name="BLUDB" port="50000"/>
</dsncollection>
<databases>
<database host="vm1.fyre.ibm.com" name="BLUDB" port="50000"/>
</databases>
<parameters>
<parameter name="Authentication" value="KERBEROS"/>
</parameters>
</configuration>
-
From outside the client container, issue the following commands in the order shown here:
docker exec -it client cli
java com.ibm.security.krb5.internal.tools.Kinit your_userID
clpplus
connect
BLUDB
Results
The CLPPlus prompt (SQL>) is available,
and you are connected to the specified database.
What to do next
You can now use CLPPlus commands and related features. Specify the commands at the CLPPlus
prompt.
To end the CLPPLus session, issue the EXIT or QUIT CLPPlus
command.